lsteamclient: Import SDK version 1.43

This commit is contained in:
Andrew Eikum 2019-02-25 09:44:23 -06:00
parent ee7717eed1
commit 2054bb97a9
160 changed files with 24429 additions and 3803 deletions

View file

@ -1,5 +1,12 @@
case 0x00100098: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_MicroTxnAuthorizationResponse_t_24(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x000c0201: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_LobbyCreated_t_16(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x000c145b: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RequestPlayersForGameProgressCallback_t_16(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x0038145c: win_msg->m_cubParam = 64; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RequestPlayersForGameResultCallback_t_64(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x0014145d: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RequestPlayersForGameFinalResultCallback_t_24(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x0014145e: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_SubmitPlayerResultResultCallback_t_24(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x000c145f: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_EndGameResultCallback_t_16(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x011414b5: win_msg->m_cubParam = 280; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_JoinPartyCallback_t_280(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x000c14b6: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_CreateBeaconCallback_t_16(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x01180517: win_msg->m_cubParam = 288; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RemoteStorageAppSyncProgress_t_288(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x0110051b: win_msg->m_cubParam = 280; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RemoteStorageFileShareResult_t_280(lin_msg.m_pubParam, win_msg->m_pubParam); break;
case 0x0010051d: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RemoteStoragePublishFileResult_t_24(lin_msg.m_pubParam, win_msg->m_pubParam); break;

View file

@ -2,6 +2,20 @@ extern void cb_MicroTxnAuthorizationResponse_t_24(void *l, void *w);
extern void cb_LobbyCreated_t_16(void *l, void *w);
extern void cb_RequestPlayersForGameProgressCallback_t_16(void *l, void *w);
extern void cb_RequestPlayersForGameResultCallback_t_64(void *l, void *w);
extern void cb_RequestPlayersForGameFinalResultCallback_t_24(void *l, void *w);
extern void cb_SubmitPlayerResultResultCallback_t_24(void *l, void *w);
extern void cb_EndGameResultCallback_t_16(void *l, void *w);
extern void cb_JoinPartyCallback_t_280(void *l, void *w);
extern void cb_CreateBeaconCallback_t_16(void *l, void *w);
extern void cb_RemoteStorageAppSyncProgress_t_288(void *l, void *w);
extern void cb_RemoteStorageFileShareResult_t_280(void *l, void *w);

View file

@ -46,12 +46,16 @@ case 1327: /* RemoteStorageSetUserPublishedFileActionResult_t_24 */
return 16;
case 1330: /* RemoteStoragePublishedFileUpdated_t_24 */
return 20;
case 5301: /* JoinPartyCallback_t_280 */
return 276;
case 5302: /* CreateBeaconCallback_t_16 */
return 12;
case 2103: /* HTTPRequestDataReceived_t_24 */
return 20;
case 2101: /* HTTPRequestCompleted_t_32 */
return 24;
case 2102: /* HTTPRequestHeadersReceived_t_16 */
return 12;
case 2103: /* HTTPRequestDataReceived_t_24 */
return 20;
case 3402: /* SteamUGCRequestUGCDetailsResult_t_9784 */
return 9768;
case 3403: /* CreateItemResult_t_24 */
@ -76,6 +80,16 @@ case 1112: /* PS3TrophiesInstalled_t_24 */
return 20;
case 3417: /* DeleteItemResult_t_16 */
return 12;
case 5211: /* RequestPlayersForGameProgressCallback_t_16 */
return 12;
case 5212: /* RequestPlayersForGameResultCallback_t_64 */
return 56;
case 5213: /* RequestPlayersForGameFinalResultCallback_t_24 */
return 20;
case 5214: /* SubmitPlayerResultResultCallback_t_24 */
return 20;
case 5215: /* EndGameResultCallback_t_16 */
return 12;
case 4704: /* SteamInventoryStartPurchaseResult_t_24 */
return 20;
case 4516: /* HTML_FileOpenDialog_t_12 */

View file

@ -148,6 +148,24 @@ case 1330:
case 24: cb_RemoteStoragePublishedFileUpdated_t_24(lin_callback, callback); break;
}
break;
case 5301:
switch(callback_len){
default:
case 280: cb_JoinPartyCallback_t_280(lin_callback, callback); break;
}
break;
case 5302:
switch(callback_len){
default:
case 16: cb_CreateBeaconCallback_t_16(lin_callback, callback); break;
}
break;
case 2103:
switch(callback_len){
default:
case 24: cb_HTTPRequestDataReceived_t_24(lin_callback, callback); break;
}
break;
case 2101:
switch(callback_len){
default:
@ -161,12 +179,6 @@ case 2102:
case 16: cb_HTTPRequestHeadersReceived_t_16(lin_callback, callback); break;
}
break;
case 2103:
switch(callback_len){
default:
case 24: cb_HTTPRequestDataReceived_t_24(lin_callback, callback); break;
}
break;
case 3402:
switch(callback_len){
default:
@ -241,6 +253,36 @@ case 3417:
case 16: cb_DeleteItemResult_t_16(lin_callback, callback); break;
}
break;
case 5211:
switch(callback_len){
default:
case 16: cb_RequestPlayersForGameProgressCallback_t_16(lin_callback, callback); break;
}
break;
case 5212:
switch(callback_len){
default:
case 64: cb_RequestPlayersForGameResultCallback_t_64(lin_callback, callback); break;
}
break;
case 5213:
switch(callback_len){
default:
case 24: cb_RequestPlayersForGameFinalResultCallback_t_24(lin_callback, callback); break;
}
break;
case 5214:
switch(callback_len){
default:
case 24: cb_SubmitPlayerResultResultCallback_t_24(lin_callback, callback); break;
}
break;
case 5215:
switch(callback_len){
default:
case 16: cb_EndGameResultCallback_t_16(lin_callback, callback); break;
}
break;
case 4704:
switch(callback_len){
default:

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamAppList_STEAMAPPLIST_INTERFACE_VERSION001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
uint32 cppISteamAppList_STEAMAPPLIST_INTERFACE_VERSION001_GetNumInstalledApps(void *linux_side)
{
return ((ISteamAppList*)linux_side)->GetNumInstalledApps();

View file

@ -1,12 +1,12 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_142/isteamappticket.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamworks_sdk_143/isteamappticket.h"
#include "steamclient_private.h"
#include "cppISteamAppTicket_STEAMAPPTICKET_INTERFACE_VERSION001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
uint32 cppISteamAppTicket_STEAMAPPTICKET_INTERFACE_VERSION001_GetAppOwnershipTicketData(void *linux_side, uint32 nAppID, void * pvBuffer, uint32 cbBufferLength, uint32 * piAppId, uint32 * piSteamId, uint32 * piSignature, uint32 * pcbSignature)
{
return ((ISteamAppTicket*)linux_side)->GetAppOwnershipTicketData((uint32)nAppID, (void *)pvBuffer, (uint32)cbBufferLength, (uint32 *)piAppId, (uint32 *)piSteamId, (uint32 *)piSignature, (uint32 *)pcbSignature);

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamApps_STEAMAPPS_INTERFACE_VERSION008.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
bool cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_BIsSubscribed(void *linux_side)
{
return ((ISteamApps*)linux_side)->BIsSubscribed();
@ -136,6 +136,16 @@ SteamAPICall_t cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_GetFileDetails(void
return ((ISteamApps*)linux_side)->GetFileDetails((const char *)pszFileName);
}
int cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_GetLaunchCommandLine(void *linux_side, char * pszCommandLine, int cubCommandLine)
{
return ((ISteamApps*)linux_side)->GetLaunchCommandLine((char *)pszCommandLine, (int)cubCommandLine);
}
bool cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_BIsSubscribedFromFamilySharing(void *linux_side)
{
return ((ISteamApps*)linux_side)->BIsSubscribedFromFamilySharing();
}
#ifdef __cplusplus
}
#endif

View file

@ -27,6 +27,8 @@ extern bool cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_GetDlcDownloadProgress(
extern int cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_GetAppBuildId(void *);
extern void cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_RequestAllProofOfPurchaseKeys(void *);
extern SteamAPICall_t cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_GetFileDetails(void *, const char *);
extern int cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_GetLaunchCommandLine(void *, char *, int);
extern bool cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_BIsSubscribedFromFamilySharing(void *);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,211 @@
#include "steam_defs.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamClient_SteamClient018.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_143.h"
HSteamPipe cppISteamClient_SteamClient018_CreateSteamPipe(void *linux_side)
{
return ((ISteamClient*)linux_side)->CreateSteamPipe();
}
bool cppISteamClient_SteamClient018_BReleaseSteamPipe(void *linux_side, HSteamPipe hSteamPipe)
{
return ((ISteamClient*)linux_side)->BReleaseSteamPipe((HSteamPipe)hSteamPipe);
}
HSteamUser cppISteamClient_SteamClient018_ConnectToGlobalUser(void *linux_side, HSteamPipe hSteamPipe)
{
return ((ISteamClient*)linux_side)->ConnectToGlobalUser((HSteamPipe)hSteamPipe);
}
HSteamUser cppISteamClient_SteamClient018_CreateLocalUser(void *linux_side, HSteamPipe * phSteamPipe, EAccountType eAccountType)
{
return ((ISteamClient*)linux_side)->CreateLocalUser((HSteamPipe *)phSteamPipe, (EAccountType)eAccountType);
}
void cppISteamClient_SteamClient018_ReleaseUser(void *linux_side, HSteamPipe hSteamPipe, HSteamUser hUser)
{
((ISteamClient*)linux_side)->ReleaseUser((HSteamPipe)hSteamPipe, (HSteamUser)hUser);
}
void *cppISteamClient_SteamClient018_GetISteamUser(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamUser((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamGameServer(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamGameServer((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void cppISteamClient_SteamClient018_SetLocalIPBinding(void *linux_side, uint32 unIP, uint16 usPort)
{
((ISteamClient*)linux_side)->SetLocalIPBinding((uint32)unIP, (uint16)usPort);
}
void *cppISteamClient_SteamClient018_GetISteamFriends(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamFriends((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamUtils(void *linux_side, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamUtils((HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamMatchmaking(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamMatchmaking((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamMatchmakingServers(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamMatchmakingServers((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void * cppISteamClient_SteamClient018_GetISteamGenericInterface(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamGenericInterface((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamUserStats(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamUserStats((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamGameServerStats(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamGameServerStats((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamApps(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamApps((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamNetworking(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamNetworking((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamRemoteStorage(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamRemoteStorage((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamScreenshots(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamScreenshots((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamGameSearch(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamGameSearch((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void cppISteamClient_SteamClient018_RunFrame(void *linux_side)
{
((ISteamClient*)linux_side)->RunFrame();
}
uint32 cppISteamClient_SteamClient018_GetIPCCallCount(void *linux_side)
{
return ((ISteamClient*)linux_side)->GetIPCCallCount();
}
void cppISteamClient_SteamClient018_SetWarningMessageHook(void *linux_side, SteamAPIWarningMessageHook_t pFunction)
{
((ISteamClient*)linux_side)->SetWarningMessageHook((SteamAPIWarningMessageHook_t)pFunction);
}
bool cppISteamClient_SteamClient018_BShutdownIfAllPipesClosed(void *linux_side)
{
return ((ISteamClient*)linux_side)->BShutdownIfAllPipesClosed();
}
void *cppISteamClient_SteamClient018_GetISteamHTTP(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamHTTP((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void * cppISteamClient_SteamClient018_DEPRECATED_GetISteamUnifiedMessages(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->DEPRECATED_GetISteamUnifiedMessages((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamController(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamController((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamUGC(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamUGC((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamAppList(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamAppList((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamMusic(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamMusic((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamMusicRemote(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamMusicRemote((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamHTMLSurface(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamHTMLSurface((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void cppISteamClient_SteamClient018_DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess(void *linux_side, void * _a)
{
((ISteamClient*)linux_side)->DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess((void (*)())_a);
}
void cppISteamClient_SteamClient018_DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess(void *linux_side, void * _a)
{
((ISteamClient*)linux_side)->DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess((void (*)())_a);
}
void cppISteamClient_SteamClient018_Set_SteamAPI_CCheckCallbackRegisteredInProcess(void *linux_side, SteamAPI_CheckCallbackRegistered_t func)
{
((ISteamClient*)linux_side)->Set_SteamAPI_CCheckCallbackRegisteredInProcess((SteamAPI_CheckCallbackRegistered_t)func);
}
void *cppISteamClient_SteamClient018_GetISteamInventory(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamInventory((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamVideo(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamVideo((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamParentalSettings(void *linux_side, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamParentalSettings((HSteamUser)hSteamuser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamInput(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamInput((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
void *cppISteamClient_SteamClient018_GetISteamParties(void *linux_side, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion)
{
return ((ISteamClient*)linux_side)->GetISteamParties((HSteamUser)hSteamUser, (HSteamPipe)hSteamPipe, (const char *)pchVersion);
}
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,46 @@
#ifdef __cplusplus
extern "C" {
#endif
extern HSteamPipe cppISteamClient_SteamClient018_CreateSteamPipe(void *);
extern bool cppISteamClient_SteamClient018_BReleaseSteamPipe(void *, HSteamPipe);
extern HSteamUser cppISteamClient_SteamClient018_ConnectToGlobalUser(void *, HSteamPipe);
extern HSteamUser cppISteamClient_SteamClient018_CreateLocalUser(void *, HSteamPipe *, EAccountType);
extern void cppISteamClient_SteamClient018_ReleaseUser(void *, HSteamPipe, HSteamUser);
extern void *cppISteamClient_SteamClient018_GetISteamUser(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamGameServer(void *, HSteamUser, HSteamPipe, const char *);
extern void cppISteamClient_SteamClient018_SetLocalIPBinding(void *, uint32, uint16);
extern void *cppISteamClient_SteamClient018_GetISteamFriends(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamUtils(void *, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamMatchmaking(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamMatchmakingServers(void *, HSteamUser, HSteamPipe, const char *);
extern void * cppISteamClient_SteamClient018_GetISteamGenericInterface(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamUserStats(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamGameServerStats(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamApps(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamNetworking(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamRemoteStorage(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamScreenshots(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamGameSearch(void *, HSteamUser, HSteamPipe, const char *);
extern void cppISteamClient_SteamClient018_RunFrame(void *);
extern uint32 cppISteamClient_SteamClient018_GetIPCCallCount(void *);
extern void cppISteamClient_SteamClient018_SetWarningMessageHook(void *, SteamAPIWarningMessageHook_t);
extern bool cppISteamClient_SteamClient018_BShutdownIfAllPipesClosed(void *);
extern void *cppISteamClient_SteamClient018_GetISteamHTTP(void *, HSteamUser, HSteamPipe, const char *);
extern void * cppISteamClient_SteamClient018_DEPRECATED_GetISteamUnifiedMessages(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamController(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamUGC(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamAppList(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamMusic(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamMusicRemote(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamHTMLSurface(void *, HSteamUser, HSteamPipe, const char *);
extern void cppISteamClient_SteamClient018_DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess(void *, void *);
extern void cppISteamClient_SteamClient018_DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess(void *, void *);
extern void cppISteamClient_SteamClient018_Set_SteamAPI_CCheckCallbackRegisteredInProcess(void *, SteamAPI_CheckCallbackRegistered_t);
extern void *cppISteamClient_SteamClient018_GetISteamInventory(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamVideo(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamParentalSettings(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamInput(void *, HSteamUser, HSteamPipe, const char *);
extern void *cppISteamClient_SteamClient018_GetISteamParties(void *, HSteamUser, HSteamPipe, const char *);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,176 @@
#include "steam_defs.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamController_SteamController007.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_143.h"
bool cppISteamController_SteamController007_Init(void *linux_side)
{
return ((ISteamController*)linux_side)->Init();
}
bool cppISteamController_SteamController007_Shutdown(void *linux_side)
{
return ((ISteamController*)linux_side)->Shutdown();
}
void cppISteamController_SteamController007_RunFrame(void *linux_side)
{
((ISteamController*)linux_side)->RunFrame();
}
int cppISteamController_SteamController007_GetConnectedControllers(void *linux_side, ControllerHandle_t * handlesOut)
{
return ((ISteamController*)linux_side)->GetConnectedControllers((ControllerHandle_t *)handlesOut);
}
ControllerActionSetHandle_t cppISteamController_SteamController007_GetActionSetHandle(void *linux_side, const char * pszActionSetName)
{
return ((ISteamController*)linux_side)->GetActionSetHandle((const char *)pszActionSetName);
}
void cppISteamController_SteamController007_ActivateActionSet(void *linux_side, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle)
{
((ISteamController*)linux_side)->ActivateActionSet((ControllerHandle_t)controllerHandle, (ControllerActionSetHandle_t)actionSetHandle);
}
ControllerActionSetHandle_t cppISteamController_SteamController007_GetCurrentActionSet(void *linux_side, ControllerHandle_t controllerHandle)
{
return ((ISteamController*)linux_side)->GetCurrentActionSet((ControllerHandle_t)controllerHandle);
}
void cppISteamController_SteamController007_ActivateActionSetLayer(void *linux_side, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle)
{
((ISteamController*)linux_side)->ActivateActionSetLayer((ControllerHandle_t)controllerHandle, (ControllerActionSetHandle_t)actionSetLayerHandle);
}
void cppISteamController_SteamController007_DeactivateActionSetLayer(void *linux_side, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle)
{
((ISteamController*)linux_side)->DeactivateActionSetLayer((ControllerHandle_t)controllerHandle, (ControllerActionSetHandle_t)actionSetLayerHandle);
}
void cppISteamController_SteamController007_DeactivateAllActionSetLayers(void *linux_side, ControllerHandle_t controllerHandle)
{
((ISteamController*)linux_side)->DeactivateAllActionSetLayers((ControllerHandle_t)controllerHandle);
}
int cppISteamController_SteamController007_GetActiveActionSetLayers(void *linux_side, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t * handlesOut)
{
return ((ISteamController*)linux_side)->GetActiveActionSetLayers((ControllerHandle_t)controllerHandle, (ControllerActionSetHandle_t *)handlesOut);
}
ControllerDigitalActionHandle_t cppISteamController_SteamController007_GetDigitalActionHandle(void *linux_side, const char * pszActionName)
{
return ((ISteamController*)linux_side)->GetDigitalActionHandle((const char *)pszActionName);
}
InputDigitalActionData_t cppISteamController_SteamController007_GetDigitalActionData(void *linux_side, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle)
{
return ((ISteamController*)linux_side)->GetDigitalActionData((ControllerHandle_t)controllerHandle, (ControllerDigitalActionHandle_t)digitalActionHandle);
}
int cppISteamController_SteamController007_GetDigitalActionOrigins(void *linux_side, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin * originsOut)
{
return ((ISteamController*)linux_side)->GetDigitalActionOrigins((ControllerHandle_t)controllerHandle, (ControllerActionSetHandle_t)actionSetHandle, (ControllerDigitalActionHandle_t)digitalActionHandle, (EControllerActionOrigin *)originsOut);
}
ControllerAnalogActionHandle_t cppISteamController_SteamController007_GetAnalogActionHandle(void *linux_side, const char * pszActionName)
{
return ((ISteamController*)linux_side)->GetAnalogActionHandle((const char *)pszActionName);
}
InputAnalogActionData_t cppISteamController_SteamController007_GetAnalogActionData(void *linux_side, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle)
{
return ((ISteamController*)linux_side)->GetAnalogActionData((ControllerHandle_t)controllerHandle, (ControllerAnalogActionHandle_t)analogActionHandle);
}
int cppISteamController_SteamController007_GetAnalogActionOrigins(void *linux_side, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin * originsOut)
{
return ((ISteamController*)linux_side)->GetAnalogActionOrigins((ControllerHandle_t)controllerHandle, (ControllerActionSetHandle_t)actionSetHandle, (ControllerAnalogActionHandle_t)analogActionHandle, (EControllerActionOrigin *)originsOut);
}
const char * cppISteamController_SteamController007_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
{
return ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
}
const char * cppISteamController_SteamController007_GetStringForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
{
return ((ISteamController*)linux_side)->GetStringForActionOrigin((EControllerActionOrigin)eOrigin);
}
void cppISteamController_SteamController007_StopAnalogActionMomentum(void *linux_side, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction)
{
((ISteamController*)linux_side)->StopAnalogActionMomentum((ControllerHandle_t)controllerHandle, (ControllerAnalogActionHandle_t)eAction);
}
InputMotionData_t cppISteamController_SteamController007_GetMotionData(void *linux_side, ControllerHandle_t controllerHandle)
{
return ((ISteamController*)linux_side)->GetMotionData((ControllerHandle_t)controllerHandle);
}
void cppISteamController_SteamController007_TriggerHapticPulse(void *linux_side, ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec)
{
((ISteamController*)linux_side)->TriggerHapticPulse((ControllerHandle_t)controllerHandle, (ESteamControllerPad)eTargetPad, (unsigned short)usDurationMicroSec);
}
void cppISteamController_SteamController007_TriggerRepeatedHapticPulse(void *linux_side, ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags)
{
((ISteamController*)linux_side)->TriggerRepeatedHapticPulse((ControllerHandle_t)controllerHandle, (ESteamControllerPad)eTargetPad, (unsigned short)usDurationMicroSec, (unsigned short)usOffMicroSec, (unsigned short)unRepeat, (unsigned int)nFlags);
}
void cppISteamController_SteamController007_TriggerVibration(void *linux_side, ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed)
{
((ISteamController*)linux_side)->TriggerVibration((ControllerHandle_t)controllerHandle, (unsigned short)usLeftSpeed, (unsigned short)usRightSpeed);
}
void cppISteamController_SteamController007_SetLEDColor(void *linux_side, ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags)
{
((ISteamController*)linux_side)->SetLEDColor((ControllerHandle_t)controllerHandle, (uint8)nColorR, (uint8)nColorG, (uint8)nColorB, (unsigned int)nFlags);
}
bool cppISteamController_SteamController007_ShowBindingPanel(void *linux_side, ControllerHandle_t controllerHandle)
{
return ((ISteamController*)linux_side)->ShowBindingPanel((ControllerHandle_t)controllerHandle);
}
ESteamInputType cppISteamController_SteamController007_GetInputTypeForHandle(void *linux_side, ControllerHandle_t controllerHandle)
{
return ((ISteamController*)linux_side)->GetInputTypeForHandle((ControllerHandle_t)controllerHandle);
}
ControllerHandle_t cppISteamController_SteamController007_GetControllerForGamepadIndex(void *linux_side, int nIndex)
{
return ((ISteamController*)linux_side)->GetControllerForGamepadIndex((int)nIndex);
}
int cppISteamController_SteamController007_GetGamepadIndexForController(void *linux_side, ControllerHandle_t ulControllerHandle)
{
return ((ISteamController*)linux_side)->GetGamepadIndexForController((ControllerHandle_t)ulControllerHandle);
}
const char * cppISteamController_SteamController007_GetStringForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
{
return ((ISteamController*)linux_side)->GetStringForXboxOrigin((EXboxOrigin)eOrigin);
}
const char * cppISteamController_SteamController007_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
{
return ((ISteamController*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
}
EControllerActionOrigin cppISteamController_SteamController007_GetActionOriginFromXboxOrigin(void *linux_side, ControllerHandle_t controllerHandle, EXboxOrigin eOrigin)
{
return ((ISteamController*)linux_side)->GetActionOriginFromXboxOrigin((ControllerHandle_t)controllerHandle, (EXboxOrigin)eOrigin);
}
EControllerActionOrigin cppISteamController_SteamController007_TranslateActionOrigin(void *linux_side, ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin)
{
return ((ISteamController*)linux_side)->TranslateActionOrigin((ESteamInputType)eDestinationInputType, (EControllerActionOrigin)eSourceOrigin);
}
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,39 @@
#ifdef __cplusplus
extern "C" {
#endif
extern bool cppISteamController_SteamController007_Init(void *);
extern bool cppISteamController_SteamController007_Shutdown(void *);
extern void cppISteamController_SteamController007_RunFrame(void *);
extern int cppISteamController_SteamController007_GetConnectedControllers(void *, ControllerHandle_t *);
extern ControllerActionSetHandle_t cppISteamController_SteamController007_GetActionSetHandle(void *, const char *);
extern void cppISteamController_SteamController007_ActivateActionSet(void *, ControllerHandle_t, ControllerActionSetHandle_t);
extern ControllerActionSetHandle_t cppISteamController_SteamController007_GetCurrentActionSet(void *, ControllerHandle_t);
extern void cppISteamController_SteamController007_ActivateActionSetLayer(void *, ControllerHandle_t, ControllerActionSetHandle_t);
extern void cppISteamController_SteamController007_DeactivateActionSetLayer(void *, ControllerHandle_t, ControllerActionSetHandle_t);
extern void cppISteamController_SteamController007_DeactivateAllActionSetLayers(void *, ControllerHandle_t);
extern int cppISteamController_SteamController007_GetActiveActionSetLayers(void *, ControllerHandle_t, ControllerActionSetHandle_t *);
extern ControllerDigitalActionHandle_t cppISteamController_SteamController007_GetDigitalActionHandle(void *, const char *);
extern InputDigitalActionData_t cppISteamController_SteamController007_GetDigitalActionData(void *, ControllerHandle_t, ControllerDigitalActionHandle_t);
extern int cppISteamController_SteamController007_GetDigitalActionOrigins(void *, ControllerHandle_t, ControllerActionSetHandle_t, ControllerDigitalActionHandle_t, EControllerActionOrigin *);
extern ControllerAnalogActionHandle_t cppISteamController_SteamController007_GetAnalogActionHandle(void *, const char *);
extern InputAnalogActionData_t cppISteamController_SteamController007_GetAnalogActionData(void *, ControllerHandle_t, ControllerAnalogActionHandle_t);
extern int cppISteamController_SteamController007_GetAnalogActionOrigins(void *, ControllerHandle_t, ControllerActionSetHandle_t, ControllerAnalogActionHandle_t, EControllerActionOrigin *);
extern const char * cppISteamController_SteamController007_GetGlyphForActionOrigin(void *, EControllerActionOrigin);
extern const char * cppISteamController_SteamController007_GetStringForActionOrigin(void *, EControllerActionOrigin);
extern void cppISteamController_SteamController007_StopAnalogActionMomentum(void *, ControllerHandle_t, ControllerAnalogActionHandle_t);
extern InputMotionData_t cppISteamController_SteamController007_GetMotionData(void *, ControllerHandle_t);
extern void cppISteamController_SteamController007_TriggerHapticPulse(void *, ControllerHandle_t, ESteamControllerPad, unsigned short);
extern void cppISteamController_SteamController007_TriggerRepeatedHapticPulse(void *, ControllerHandle_t, ESteamControllerPad, unsigned short, unsigned short, unsigned short, unsigned int);
extern void cppISteamController_SteamController007_TriggerVibration(void *, ControllerHandle_t, unsigned short, unsigned short);
extern void cppISteamController_SteamController007_SetLEDColor(void *, ControllerHandle_t, uint8, uint8, uint8, unsigned int);
extern bool cppISteamController_SteamController007_ShowBindingPanel(void *, ControllerHandle_t);
extern ESteamInputType cppISteamController_SteamController007_GetInputTypeForHandle(void *, ControllerHandle_t);
extern ControllerHandle_t cppISteamController_SteamController007_GetControllerForGamepadIndex(void *, int);
extern int cppISteamController_SteamController007_GetGamepadIndexForController(void *, ControllerHandle_t);
extern const char * cppISteamController_SteamController007_GetStringForXboxOrigin(void *, EXboxOrigin);
extern const char * cppISteamController_SteamController007_GetGlyphForXboxOrigin(void *, EXboxOrigin);
extern EControllerActionOrigin cppISteamController_SteamController007_GetActionOriginFromXboxOrigin(void *, ControllerHandle_t, EXboxOrigin);
extern EControllerActionOrigin cppISteamController_SteamController007_TranslateActionOrigin(void *, ESteamInputType, EControllerActionOrigin);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,376 @@
#include "steam_defs.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamFriends_SteamFriends017.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_143.h"
const char * cppISteamFriends_SteamFriends017_GetPersonaName(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetPersonaName();
}
SteamAPICall_t cppISteamFriends_SteamFriends017_SetPersonaName(void *linux_side, const char * pchPersonaName)
{
return ((ISteamFriends*)linux_side)->SetPersonaName((const char *)pchPersonaName);
}
EPersonaState cppISteamFriends_SteamFriends017_GetPersonaState(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetPersonaState();
}
int cppISteamFriends_SteamFriends017_GetFriendCount(void *linux_side, int iFriendFlags)
{
return ((ISteamFriends*)linux_side)->GetFriendCount((int)iFriendFlags);
}
CSteamID cppISteamFriends_SteamFriends017_GetFriendByIndex(void *linux_side, int iFriend, int iFriendFlags)
{
return ((ISteamFriends*)linux_side)->GetFriendByIndex((int)iFriend, (int)iFriendFlags);
}
EFriendRelationship cppISteamFriends_SteamFriends017_GetFriendRelationship(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendRelationship((CSteamID)steamIDFriend);
}
EPersonaState cppISteamFriends_SteamFriends017_GetFriendPersonaState(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendPersonaState((CSteamID)steamIDFriend);
}
const char * cppISteamFriends_SteamFriends017_GetFriendPersonaName(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendPersonaName((CSteamID)steamIDFriend);
}
bool cppISteamFriends_SteamFriends017_GetFriendGamePlayed(void *linux_side, CSteamID steamIDFriend, FriendGameInfo_t * pFriendGameInfo)
{
return ((ISteamFriends*)linux_side)->GetFriendGamePlayed((CSteamID)steamIDFriend, (FriendGameInfo_t *)pFriendGameInfo);
}
const char * cppISteamFriends_SteamFriends017_GetFriendPersonaNameHistory(void *linux_side, CSteamID steamIDFriend, int iPersonaName)
{
return ((ISteamFriends*)linux_side)->GetFriendPersonaNameHistory((CSteamID)steamIDFriend, (int)iPersonaName);
}
int cppISteamFriends_SteamFriends017_GetFriendSteamLevel(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendSteamLevel((CSteamID)steamIDFriend);
}
const char * cppISteamFriends_SteamFriends017_GetPlayerNickname(void *linux_side, CSteamID steamIDPlayer)
{
return ((ISteamFriends*)linux_side)->GetPlayerNickname((CSteamID)steamIDPlayer);
}
int cppISteamFriends_SteamFriends017_GetFriendsGroupCount(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetFriendsGroupCount();
}
FriendsGroupID_t cppISteamFriends_SteamFriends017_GetFriendsGroupIDByIndex(void *linux_side, int iFG)
{
return ((ISteamFriends*)linux_side)->GetFriendsGroupIDByIndex((int)iFG);
}
const char * cppISteamFriends_SteamFriends017_GetFriendsGroupName(void *linux_side, FriendsGroupID_t friendsGroupID)
{
return ((ISteamFriends*)linux_side)->GetFriendsGroupName((FriendsGroupID_t)friendsGroupID);
}
int cppISteamFriends_SteamFriends017_GetFriendsGroupMembersCount(void *linux_side, FriendsGroupID_t friendsGroupID)
{
return ((ISteamFriends*)linux_side)->GetFriendsGroupMembersCount((FriendsGroupID_t)friendsGroupID);
}
void cppISteamFriends_SteamFriends017_GetFriendsGroupMembersList(void *linux_side, FriendsGroupID_t friendsGroupID, CSteamID * pOutSteamIDMembers, int nMembersCount)
{
((ISteamFriends*)linux_side)->GetFriendsGroupMembersList((FriendsGroupID_t)friendsGroupID, (CSteamID *)pOutSteamIDMembers, (int)nMembersCount);
}
bool cppISteamFriends_SteamFriends017_HasFriend(void *linux_side, CSteamID steamIDFriend, int iFriendFlags)
{
return ((ISteamFriends*)linux_side)->HasFriend((CSteamID)steamIDFriend, (int)iFriendFlags);
}
int cppISteamFriends_SteamFriends017_GetClanCount(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetClanCount();
}
CSteamID cppISteamFriends_SteamFriends017_GetClanByIndex(void *linux_side, int iClan)
{
return ((ISteamFriends*)linux_side)->GetClanByIndex((int)iClan);
}
const char * cppISteamFriends_SteamFriends017_GetClanName(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->GetClanName((CSteamID)steamIDClan);
}
const char * cppISteamFriends_SteamFriends017_GetClanTag(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->GetClanTag((CSteamID)steamIDClan);
}
bool cppISteamFriends_SteamFriends017_GetClanActivityCounts(void *linux_side, CSteamID steamIDClan, int * pnOnline, int * pnInGame, int * pnChatting)
{
return ((ISteamFriends*)linux_side)->GetClanActivityCounts((CSteamID)steamIDClan, (int *)pnOnline, (int *)pnInGame, (int *)pnChatting);
}
SteamAPICall_t cppISteamFriends_SteamFriends017_DownloadClanActivityCounts(void *linux_side, CSteamID * psteamIDClans, int cClansToRequest)
{
return ((ISteamFriends*)linux_side)->DownloadClanActivityCounts((CSteamID *)psteamIDClans, (int)cClansToRequest);
}
int cppISteamFriends_SteamFriends017_GetFriendCountFromSource(void *linux_side, CSteamID steamIDSource)
{
return ((ISteamFriends*)linux_side)->GetFriendCountFromSource((CSteamID)steamIDSource);
}
CSteamID cppISteamFriends_SteamFriends017_GetFriendFromSourceByIndex(void *linux_side, CSteamID steamIDSource, int iFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendFromSourceByIndex((CSteamID)steamIDSource, (int)iFriend);
}
bool cppISteamFriends_SteamFriends017_IsUserInSource(void *linux_side, CSteamID steamIDUser, CSteamID steamIDSource)
{
return ((ISteamFriends*)linux_side)->IsUserInSource((CSteamID)steamIDUser, (CSteamID)steamIDSource);
}
void cppISteamFriends_SteamFriends017_SetInGameVoiceSpeaking(void *linux_side, CSteamID steamIDUser, bool bSpeaking)
{
((ISteamFriends*)linux_side)->SetInGameVoiceSpeaking((CSteamID)steamIDUser, (bool)bSpeaking);
}
void cppISteamFriends_SteamFriends017_ActivateGameOverlay(void *linux_side, const char * pchDialog)
{
((ISteamFriends*)linux_side)->ActivateGameOverlay((const char *)pchDialog);
}
void cppISteamFriends_SteamFriends017_ActivateGameOverlayToUser(void *linux_side, const char * pchDialog, CSteamID steamID)
{
((ISteamFriends*)linux_side)->ActivateGameOverlayToUser((const char *)pchDialog, (CSteamID)steamID);
}
void cppISteamFriends_SteamFriends017_ActivateGameOverlayToWebPage(void *linux_side, const char * pchURL, EActivateGameOverlayToWebPageMode eMode)
{
((ISteamFriends*)linux_side)->ActivateGameOverlayToWebPage((const char *)pchURL, (EActivateGameOverlayToWebPageMode)eMode);
}
void cppISteamFriends_SteamFriends017_ActivateGameOverlayToStore(void *linux_side, AppId_t nAppID, EOverlayToStoreFlag eFlag)
{
((ISteamFriends*)linux_side)->ActivateGameOverlayToStore((AppId_t)nAppID, (EOverlayToStoreFlag)eFlag);
}
void cppISteamFriends_SteamFriends017_SetPlayedWith(void *linux_side, CSteamID steamIDUserPlayedWith)
{
((ISteamFriends*)linux_side)->SetPlayedWith((CSteamID)steamIDUserPlayedWith);
}
void cppISteamFriends_SteamFriends017_ActivateGameOverlayInviteDialog(void *linux_side, CSteamID steamIDLobby)
{
((ISteamFriends*)linux_side)->ActivateGameOverlayInviteDialog((CSteamID)steamIDLobby);
}
int cppISteamFriends_SteamFriends017_GetSmallFriendAvatar(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetSmallFriendAvatar((CSteamID)steamIDFriend);
}
int cppISteamFriends_SteamFriends017_GetMediumFriendAvatar(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetMediumFriendAvatar((CSteamID)steamIDFriend);
}
int cppISteamFriends_SteamFriends017_GetLargeFriendAvatar(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetLargeFriendAvatar((CSteamID)steamIDFriend);
}
bool cppISteamFriends_SteamFriends017_RequestUserInformation(void *linux_side, CSteamID steamIDUser, bool bRequireNameOnly)
{
return ((ISteamFriends*)linux_side)->RequestUserInformation((CSteamID)steamIDUser, (bool)bRequireNameOnly);
}
SteamAPICall_t cppISteamFriends_SteamFriends017_RequestClanOfficerList(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->RequestClanOfficerList((CSteamID)steamIDClan);
}
CSteamID cppISteamFriends_SteamFriends017_GetClanOwner(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->GetClanOwner((CSteamID)steamIDClan);
}
int cppISteamFriends_SteamFriends017_GetClanOfficerCount(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->GetClanOfficerCount((CSteamID)steamIDClan);
}
CSteamID cppISteamFriends_SteamFriends017_GetClanOfficerByIndex(void *linux_side, CSteamID steamIDClan, int iOfficer)
{
return ((ISteamFriends*)linux_side)->GetClanOfficerByIndex((CSteamID)steamIDClan, (int)iOfficer);
}
uint32 cppISteamFriends_SteamFriends017_GetUserRestrictions(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetUserRestrictions();
}
bool cppISteamFriends_SteamFriends017_SetRichPresence(void *linux_side, const char * pchKey, const char * pchValue)
{
return ((ISteamFriends*)linux_side)->SetRichPresence((const char *)pchKey, (const char *)pchValue);
}
void cppISteamFriends_SteamFriends017_ClearRichPresence(void *linux_side)
{
((ISteamFriends*)linux_side)->ClearRichPresence();
}
const char * cppISteamFriends_SteamFriends017_GetFriendRichPresence(void *linux_side, CSteamID steamIDFriend, const char * pchKey)
{
return ((ISteamFriends*)linux_side)->GetFriendRichPresence((CSteamID)steamIDFriend, (const char *)pchKey);
}
int cppISteamFriends_SteamFriends017_GetFriendRichPresenceKeyCount(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendRichPresenceKeyCount((CSteamID)steamIDFriend);
}
const char * cppISteamFriends_SteamFriends017_GetFriendRichPresenceKeyByIndex(void *linux_side, CSteamID steamIDFriend, int iKey)
{
return ((ISteamFriends*)linux_side)->GetFriendRichPresenceKeyByIndex((CSteamID)steamIDFriend, (int)iKey);
}
void cppISteamFriends_SteamFriends017_RequestFriendRichPresence(void *linux_side, CSteamID steamIDFriend)
{
((ISteamFriends*)linux_side)->RequestFriendRichPresence((CSteamID)steamIDFriend);
}
bool cppISteamFriends_SteamFriends017_InviteUserToGame(void *linux_side, CSteamID steamIDFriend, const char * pchConnectString)
{
return ((ISteamFriends*)linux_side)->InviteUserToGame((CSteamID)steamIDFriend, (const char *)pchConnectString);
}
int cppISteamFriends_SteamFriends017_GetCoplayFriendCount(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetCoplayFriendCount();
}
CSteamID cppISteamFriends_SteamFriends017_GetCoplayFriend(void *linux_side, int iCoplayFriend)
{
return ((ISteamFriends*)linux_side)->GetCoplayFriend((int)iCoplayFriend);
}
int cppISteamFriends_SteamFriends017_GetFriendCoplayTime(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendCoplayTime((CSteamID)steamIDFriend);
}
AppId_t cppISteamFriends_SteamFriends017_GetFriendCoplayGame(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendCoplayGame((CSteamID)steamIDFriend);
}
SteamAPICall_t cppISteamFriends_SteamFriends017_JoinClanChatRoom(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->JoinClanChatRoom((CSteamID)steamIDClan);
}
bool cppISteamFriends_SteamFriends017_LeaveClanChatRoom(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->LeaveClanChatRoom((CSteamID)steamIDClan);
}
int cppISteamFriends_SteamFriends017_GetClanChatMemberCount(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->GetClanChatMemberCount((CSteamID)steamIDClan);
}
CSteamID cppISteamFriends_SteamFriends017_GetChatMemberByIndex(void *linux_side, CSteamID steamIDClan, int iUser)
{
return ((ISteamFriends*)linux_side)->GetChatMemberByIndex((CSteamID)steamIDClan, (int)iUser);
}
bool cppISteamFriends_SteamFriends017_SendClanChatMessage(void *linux_side, CSteamID steamIDClanChat, const char * pchText)
{
return ((ISteamFriends*)linux_side)->SendClanChatMessage((CSteamID)steamIDClanChat, (const char *)pchText);
}
int cppISteamFriends_SteamFriends017_GetClanChatMessage(void *linux_side, CSteamID steamIDClanChat, int iMessage, void * prgchText, int cchTextMax, EChatEntryType * peChatEntryType, CSteamID * psteamidChatter)
{
return ((ISteamFriends*)linux_side)->GetClanChatMessage((CSteamID)steamIDClanChat, (int)iMessage, (void *)prgchText, (int)cchTextMax, (EChatEntryType *)peChatEntryType, (CSteamID *)psteamidChatter);
}
bool cppISteamFriends_SteamFriends017_IsClanChatAdmin(void *linux_side, CSteamID steamIDClanChat, CSteamID steamIDUser)
{
return ((ISteamFriends*)linux_side)->IsClanChatAdmin((CSteamID)steamIDClanChat, (CSteamID)steamIDUser);
}
bool cppISteamFriends_SteamFriends017_IsClanChatWindowOpenInSteam(void *linux_side, CSteamID steamIDClanChat)
{
return ((ISteamFriends*)linux_side)->IsClanChatWindowOpenInSteam((CSteamID)steamIDClanChat);
}
bool cppISteamFriends_SteamFriends017_OpenClanChatWindowInSteam(void *linux_side, CSteamID steamIDClanChat)
{
return ((ISteamFriends*)linux_side)->OpenClanChatWindowInSteam((CSteamID)steamIDClanChat);
}
bool cppISteamFriends_SteamFriends017_CloseClanChatWindowInSteam(void *linux_side, CSteamID steamIDClanChat)
{
return ((ISteamFriends*)linux_side)->CloseClanChatWindowInSteam((CSteamID)steamIDClanChat);
}
bool cppISteamFriends_SteamFriends017_SetListenForFriendsMessages(void *linux_side, bool bInterceptEnabled)
{
return ((ISteamFriends*)linux_side)->SetListenForFriendsMessages((bool)bInterceptEnabled);
}
bool cppISteamFriends_SteamFriends017_ReplyToFriendMessage(void *linux_side, CSteamID steamIDFriend, const char * pchMsgToSend)
{
return ((ISteamFriends*)linux_side)->ReplyToFriendMessage((CSteamID)steamIDFriend, (const char *)pchMsgToSend);
}
int cppISteamFriends_SteamFriends017_GetFriendMessage(void *linux_side, CSteamID steamIDFriend, int iMessageID, void * pvData, int cubData, EChatEntryType * peChatEntryType)
{
return ((ISteamFriends*)linux_side)->GetFriendMessage((CSteamID)steamIDFriend, (int)iMessageID, (void *)pvData, (int)cubData, (EChatEntryType *)peChatEntryType);
}
SteamAPICall_t cppISteamFriends_SteamFriends017_GetFollowerCount(void *linux_side, CSteamID steamID)
{
return ((ISteamFriends*)linux_side)->GetFollowerCount((CSteamID)steamID);
}
SteamAPICall_t cppISteamFriends_SteamFriends017_IsFollowing(void *linux_side, CSteamID steamID)
{
return ((ISteamFriends*)linux_side)->IsFollowing((CSteamID)steamID);
}
SteamAPICall_t cppISteamFriends_SteamFriends017_EnumerateFollowingList(void *linux_side, uint32 unStartIndex)
{
return ((ISteamFriends*)linux_side)->EnumerateFollowingList((uint32)unStartIndex);
}
bool cppISteamFriends_SteamFriends017_IsClanPublic(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->IsClanPublic((CSteamID)steamIDClan);
}
bool cppISteamFriends_SteamFriends017_IsClanOfficialGameGroup(void *linux_side, CSteamID steamIDClan)
{
return ((ISteamFriends*)linux_side)->IsClanOfficialGameGroup((CSteamID)steamIDClan);
}
int cppISteamFriends_SteamFriends017_GetNumChatsWithUnreadPriorityMessages(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetNumChatsWithUnreadPriorityMessages();
}
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,79 @@
#ifdef __cplusplus
extern "C" {
#endif
extern const char * cppISteamFriends_SteamFriends017_GetPersonaName(void *);
extern SteamAPICall_t cppISteamFriends_SteamFriends017_SetPersonaName(void *, const char *);
extern EPersonaState cppISteamFriends_SteamFriends017_GetPersonaState(void *);
extern int cppISteamFriends_SteamFriends017_GetFriendCount(void *, int);
extern CSteamID cppISteamFriends_SteamFriends017_GetFriendByIndex(void *, int, int);
extern EFriendRelationship cppISteamFriends_SteamFriends017_GetFriendRelationship(void *, CSteamID);
extern EPersonaState cppISteamFriends_SteamFriends017_GetFriendPersonaState(void *, CSteamID);
extern const char * cppISteamFriends_SteamFriends017_GetFriendPersonaName(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_GetFriendGamePlayed(void *, CSteamID, FriendGameInfo_t *);
extern const char * cppISteamFriends_SteamFriends017_GetFriendPersonaNameHistory(void *, CSteamID, int);
extern int cppISteamFriends_SteamFriends017_GetFriendSteamLevel(void *, CSteamID);
extern const char * cppISteamFriends_SteamFriends017_GetPlayerNickname(void *, CSteamID);
extern int cppISteamFriends_SteamFriends017_GetFriendsGroupCount(void *);
extern FriendsGroupID_t cppISteamFriends_SteamFriends017_GetFriendsGroupIDByIndex(void *, int);
extern const char * cppISteamFriends_SteamFriends017_GetFriendsGroupName(void *, FriendsGroupID_t);
extern int cppISteamFriends_SteamFriends017_GetFriendsGroupMembersCount(void *, FriendsGroupID_t);
extern void cppISteamFriends_SteamFriends017_GetFriendsGroupMembersList(void *, FriendsGroupID_t, CSteamID *, int);
extern bool cppISteamFriends_SteamFriends017_HasFriend(void *, CSteamID, int);
extern int cppISteamFriends_SteamFriends017_GetClanCount(void *);
extern CSteamID cppISteamFriends_SteamFriends017_GetClanByIndex(void *, int);
extern const char * cppISteamFriends_SteamFriends017_GetClanName(void *, CSteamID);
extern const char * cppISteamFriends_SteamFriends017_GetClanTag(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_GetClanActivityCounts(void *, CSteamID, int *, int *, int *);
extern SteamAPICall_t cppISteamFriends_SteamFriends017_DownloadClanActivityCounts(void *, CSteamID *, int);
extern int cppISteamFriends_SteamFriends017_GetFriendCountFromSource(void *, CSteamID);
extern CSteamID cppISteamFriends_SteamFriends017_GetFriendFromSourceByIndex(void *, CSteamID, int);
extern bool cppISteamFriends_SteamFriends017_IsUserInSource(void *, CSteamID, CSteamID);
extern void cppISteamFriends_SteamFriends017_SetInGameVoiceSpeaking(void *, CSteamID, bool);
extern void cppISteamFriends_SteamFriends017_ActivateGameOverlay(void *, const char *);
extern void cppISteamFriends_SteamFriends017_ActivateGameOverlayToUser(void *, const char *, CSteamID);
extern void cppISteamFriends_SteamFriends017_ActivateGameOverlayToWebPage(void *, const char *, EActivateGameOverlayToWebPageMode);
extern void cppISteamFriends_SteamFriends017_ActivateGameOverlayToStore(void *, AppId_t, EOverlayToStoreFlag);
extern void cppISteamFriends_SteamFriends017_SetPlayedWith(void *, CSteamID);
extern void cppISteamFriends_SteamFriends017_ActivateGameOverlayInviteDialog(void *, CSteamID);
extern int cppISteamFriends_SteamFriends017_GetSmallFriendAvatar(void *, CSteamID);
extern int cppISteamFriends_SteamFriends017_GetMediumFriendAvatar(void *, CSteamID);
extern int cppISteamFriends_SteamFriends017_GetLargeFriendAvatar(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_RequestUserInformation(void *, CSteamID, bool);
extern SteamAPICall_t cppISteamFriends_SteamFriends017_RequestClanOfficerList(void *, CSteamID);
extern CSteamID cppISteamFriends_SteamFriends017_GetClanOwner(void *, CSteamID);
extern int cppISteamFriends_SteamFriends017_GetClanOfficerCount(void *, CSteamID);
extern CSteamID cppISteamFriends_SteamFriends017_GetClanOfficerByIndex(void *, CSteamID, int);
extern uint32 cppISteamFriends_SteamFriends017_GetUserRestrictions(void *);
extern bool cppISteamFriends_SteamFriends017_SetRichPresence(void *, const char *, const char *);
extern void cppISteamFriends_SteamFriends017_ClearRichPresence(void *);
extern const char * cppISteamFriends_SteamFriends017_GetFriendRichPresence(void *, CSteamID, const char *);
extern int cppISteamFriends_SteamFriends017_GetFriendRichPresenceKeyCount(void *, CSteamID);
extern const char * cppISteamFriends_SteamFriends017_GetFriendRichPresenceKeyByIndex(void *, CSteamID, int);
extern void cppISteamFriends_SteamFriends017_RequestFriendRichPresence(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_InviteUserToGame(void *, CSteamID, const char *);
extern int cppISteamFriends_SteamFriends017_GetCoplayFriendCount(void *);
extern CSteamID cppISteamFriends_SteamFriends017_GetCoplayFriend(void *, int);
extern int cppISteamFriends_SteamFriends017_GetFriendCoplayTime(void *, CSteamID);
extern AppId_t cppISteamFriends_SteamFriends017_GetFriendCoplayGame(void *, CSteamID);
extern SteamAPICall_t cppISteamFriends_SteamFriends017_JoinClanChatRoom(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_LeaveClanChatRoom(void *, CSteamID);
extern int cppISteamFriends_SteamFriends017_GetClanChatMemberCount(void *, CSteamID);
extern CSteamID cppISteamFriends_SteamFriends017_GetChatMemberByIndex(void *, CSteamID, int);
extern bool cppISteamFriends_SteamFriends017_SendClanChatMessage(void *, CSteamID, const char *);
extern int cppISteamFriends_SteamFriends017_GetClanChatMessage(void *, CSteamID, int, void *, int, EChatEntryType *, CSteamID *);
extern bool cppISteamFriends_SteamFriends017_IsClanChatAdmin(void *, CSteamID, CSteamID);
extern bool cppISteamFriends_SteamFriends017_IsClanChatWindowOpenInSteam(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_OpenClanChatWindowInSteam(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_CloseClanChatWindowInSteam(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_SetListenForFriendsMessages(void *, bool);
extern bool cppISteamFriends_SteamFriends017_ReplyToFriendMessage(void *, CSteamID, const char *);
extern int cppISteamFriends_SteamFriends017_GetFriendMessage(void *, CSteamID, int, void *, int, EChatEntryType *);
extern SteamAPICall_t cppISteamFriends_SteamFriends017_GetFollowerCount(void *, CSteamID);
extern SteamAPICall_t cppISteamFriends_SteamFriends017_IsFollowing(void *, CSteamID);
extern SteamAPICall_t cppISteamFriends_SteamFriends017_EnumerateFollowingList(void *, uint32);
extern bool cppISteamFriends_SteamFriends017_IsClanPublic(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends017_IsClanOfficialGameGroup(void *, CSteamID);
extern int cppISteamFriends_SteamFriends017_GetNumChatsWithUnreadPriorityMessages(void *);
#ifdef __cplusplus
}
#endif

View file

@ -1,12 +1,12 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_142/isteamgamecoordinator.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamworks_sdk_143/isteamgamecoordinator.h"
#include "steamclient_private.h"
#include "cppISteamGameCoordinator_SteamGameCoordinator001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
EGCResults cppISteamGameCoordinator_SteamGameCoordinator001_SendMessage(void *linux_side, uint32 unMsgType, const void * pubData, uint32 cubData)
{
return ((ISteamGameCoordinator*)linux_side)->SendMessage((uint32)unMsgType, (const void *)pubData, (uint32)cubData);

View file

@ -1,12 +1,12 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_142/isteamgameserverstats.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamworks_sdk_143/isteamgameserverstats.h"
#include "steamclient_private.h"
#include "cppISteamGameServerStats_SteamGameServerStats001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
SteamAPICall_t cppISteamGameServerStats_SteamGameServerStats001_RequestUserStats(void *linux_side, CSteamID steamIDUser)
{
return ((ISteamGameServerStats*)linux_side)->RequestUserStats((CSteamID)steamIDUser);

View file

@ -1,12 +1,12 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_142/isteamgameserver.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamworks_sdk_143/isteamgameserver.h"
#include "steamclient_private.h"
#include "cppISteamGameServer_SteamGameServer012.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
bool cppISteamGameServer_SteamGameServer012_InitGameServer(void *linux_side, uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char * pchVersionString)
{
return ((ISteamGameServer*)linux_side)->InitGameServer((uint32)unIP, (uint16)usGamePort, (uint16)usQueryPort, (uint32)unFlags, (AppId_t)nGameAppId, (const char *)pchVersionString);

View file

@ -0,0 +1,196 @@
#include "steam_defs.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_143.h"
bool cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Init(void *linux_side)
{
return ((ISteamHTMLSurface*)linux_side)->Init();
}
bool cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Shutdown(void *linux_side)
{
return ((ISteamHTMLSurface*)linux_side)->Shutdown();
}
SteamAPICall_t cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_CreateBrowser(void *linux_side, const char * pchUserAgent, const char * pchUserCSS)
{
return ((ISteamHTMLSurface*)linux_side)->CreateBrowser((const char *)pchUserAgent, (const char *)pchUserCSS);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_RemoveBrowser(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->RemoveBrowser((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_LoadURL(void *linux_side, HHTMLBrowser unBrowserHandle, const char * pchURL, const char * pchPostData)
{
((ISteamHTMLSurface*)linux_side)->LoadURL((HHTMLBrowser)unBrowserHandle, (const char *)pchURL, (const char *)pchPostData);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetSize(void *linux_side, HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight)
{
((ISteamHTMLSurface*)linux_side)->SetSize((HHTMLBrowser)unBrowserHandle, (uint32)unWidth, (uint32)unHeight);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_StopLoad(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->StopLoad((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Reload(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->Reload((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_GoBack(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->GoBack((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_GoForward(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->GoForward((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_AddHeader(void *linux_side, HHTMLBrowser unBrowserHandle, const char * pchKey, const char * pchValue)
{
((ISteamHTMLSurface*)linux_side)->AddHeader((HHTMLBrowser)unBrowserHandle, (const char *)pchKey, (const char *)pchValue);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_ExecuteJavascript(void *linux_side, HHTMLBrowser unBrowserHandle, const char * pchScript)
{
((ISteamHTMLSurface*)linux_side)->ExecuteJavascript((HHTMLBrowser)unBrowserHandle, (const char *)pchScript);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseUp(void *linux_side, HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton)
{
((ISteamHTMLSurface*)linux_side)->MouseUp((HHTMLBrowser)unBrowserHandle, (ISteamHTMLSurface::EHTMLMouseButton)eMouseButton);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseDown(void *linux_side, HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton)
{
((ISteamHTMLSurface*)linux_side)->MouseDown((HHTMLBrowser)unBrowserHandle, (ISteamHTMLSurface::EHTMLMouseButton)eMouseButton);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseDoubleClick(void *linux_side, HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton)
{
((ISteamHTMLSurface*)linux_side)->MouseDoubleClick((HHTMLBrowser)unBrowserHandle, (ISteamHTMLSurface::EHTMLMouseButton)eMouseButton);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseMove(void *linux_side, HHTMLBrowser unBrowserHandle, int x, int y)
{
((ISteamHTMLSurface*)linux_side)->MouseMove((HHTMLBrowser)unBrowserHandle, (int)x, (int)y);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseWheel(void *linux_side, HHTMLBrowser unBrowserHandle, int32 nDelta)
{
((ISteamHTMLSurface*)linux_side)->MouseWheel((HHTMLBrowser)unBrowserHandle, (int32)nDelta);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_KeyDown(void *linux_side, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers, bool bIsSystemKey)
{
((ISteamHTMLSurface*)linux_side)->KeyDown((HHTMLBrowser)unBrowserHandle, (uint32)nNativeKeyCode, (ISteamHTMLSurface::EHTMLKeyModifiers)eHTMLKeyModifiers, (bool)bIsSystemKey);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_KeyUp(void *linux_side, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers)
{
((ISteamHTMLSurface*)linux_side)->KeyUp((HHTMLBrowser)unBrowserHandle, (uint32)nNativeKeyCode, (ISteamHTMLSurface::EHTMLKeyModifiers)eHTMLKeyModifiers);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_KeyChar(void *linux_side, HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers)
{
((ISteamHTMLSurface*)linux_side)->KeyChar((HHTMLBrowser)unBrowserHandle, (uint32)cUnicodeChar, (ISteamHTMLSurface::EHTMLKeyModifiers)eHTMLKeyModifiers);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetHorizontalScroll(void *linux_side, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll)
{
((ISteamHTMLSurface*)linux_side)->SetHorizontalScroll((HHTMLBrowser)unBrowserHandle, (uint32)nAbsolutePixelScroll);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetVerticalScroll(void *linux_side, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll)
{
((ISteamHTMLSurface*)linux_side)->SetVerticalScroll((HHTMLBrowser)unBrowserHandle, (uint32)nAbsolutePixelScroll);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetKeyFocus(void *linux_side, HHTMLBrowser unBrowserHandle, bool bHasKeyFocus)
{
((ISteamHTMLSurface*)linux_side)->SetKeyFocus((HHTMLBrowser)unBrowserHandle, (bool)bHasKeyFocus);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_ViewSource(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->ViewSource((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_CopyToClipboard(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->CopyToClipboard((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_PasteFromClipboard(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->PasteFromClipboard((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Find(void *linux_side, HHTMLBrowser unBrowserHandle, const char * pchSearchStr, bool bCurrentlyInFind, bool bReverse)
{
((ISteamHTMLSurface*)linux_side)->Find((HHTMLBrowser)unBrowserHandle, (const char *)pchSearchStr, (bool)bCurrentlyInFind, (bool)bReverse);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_StopFind(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->StopFind((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_GetLinkAtPosition(void *linux_side, HHTMLBrowser unBrowserHandle, int x, int y)
{
((ISteamHTMLSurface*)linux_side)->GetLinkAtPosition((HHTMLBrowser)unBrowserHandle, (int)x, (int)y);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetCookie(void *linux_side, const char * pchHostname, const char * pchKey, const char * pchValue, const char * pchPath, RTime32 nExpires, bool bSecure, bool bHTTPOnly)
{
((ISteamHTMLSurface*)linux_side)->SetCookie((const char *)pchHostname, (const char *)pchKey, (const char *)pchValue, (const char *)pchPath, (RTime32)nExpires, (bool)bSecure, (bool)bHTTPOnly);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetPageScaleFactor(void *linux_side, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY)
{
((ISteamHTMLSurface*)linux_side)->SetPageScaleFactor((HHTMLBrowser)unBrowserHandle, (float)flZoom, (int)nPointX, (int)nPointY);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetBackgroundMode(void *linux_side, HHTMLBrowser unBrowserHandle, bool bBackgroundMode)
{
((ISteamHTMLSurface*)linux_side)->SetBackgroundMode((HHTMLBrowser)unBrowserHandle, (bool)bBackgroundMode);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetDPIScalingFactor(void *linux_side, HHTMLBrowser unBrowserHandle, float flDPIScaling)
{
((ISteamHTMLSurface*)linux_side)->SetDPIScalingFactor((HHTMLBrowser)unBrowserHandle, (float)flDPIScaling);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_OpenDeveloperTools(void *linux_side, HHTMLBrowser unBrowserHandle)
{
((ISteamHTMLSurface*)linux_side)->OpenDeveloperTools((HHTMLBrowser)unBrowserHandle);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_AllowStartRequest(void *linux_side, HHTMLBrowser unBrowserHandle, bool bAllowed)
{
((ISteamHTMLSurface*)linux_side)->AllowStartRequest((HHTMLBrowser)unBrowserHandle, (bool)bAllowed);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_JSDialogResponse(void *linux_side, HHTMLBrowser unBrowserHandle, bool bResult)
{
((ISteamHTMLSurface*)linux_side)->JSDialogResponse((HHTMLBrowser)unBrowserHandle, (bool)bResult);
}
void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_FileLoadDialogResponse(void *linux_side, HHTMLBrowser unBrowserHandle, const char ** pchSelectedFiles)
{
((ISteamHTMLSurface*)linux_side)->FileLoadDialogResponse((HHTMLBrowser)unBrowserHandle, (const char **)pchSelectedFiles);
}
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,43 @@
#ifdef __cplusplus
extern "C" {
#endif
extern bool cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Init(void *);
extern bool cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Shutdown(void *);
extern SteamAPICall_t cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_CreateBrowser(void *, const char *, const char *);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_RemoveBrowser(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_LoadURL(void *, HHTMLBrowser, const char *, const char *);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetSize(void *, HHTMLBrowser, uint32, uint32);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_StopLoad(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Reload(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_GoBack(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_GoForward(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_AddHeader(void *, HHTMLBrowser, const char *, const char *);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_ExecuteJavascript(void *, HHTMLBrowser, const char *);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseUp(void *, HHTMLBrowser, EHTMLMouseButton);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseDown(void *, HHTMLBrowser, EHTMLMouseButton);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseDoubleClick(void *, HHTMLBrowser, EHTMLMouseButton);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseMove(void *, HHTMLBrowser, int, int);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_MouseWheel(void *, HHTMLBrowser, int32);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_KeyDown(void *, HHTMLBrowser, uint32, EHTMLKeyModifiers, bool);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_KeyUp(void *, HHTMLBrowser, uint32, EHTMLKeyModifiers);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_KeyChar(void *, HHTMLBrowser, uint32, EHTMLKeyModifiers);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetHorizontalScroll(void *, HHTMLBrowser, uint32);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetVerticalScroll(void *, HHTMLBrowser, uint32);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetKeyFocus(void *, HHTMLBrowser, bool);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_ViewSource(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_CopyToClipboard(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_PasteFromClipboard(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Find(void *, HHTMLBrowser, const char *, bool, bool);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_StopFind(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_GetLinkAtPosition(void *, HHTMLBrowser, int, int);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetCookie(void *, const char *, const char *, const char *, const char *, RTime32, bool, bool);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetPageScaleFactor(void *, HHTMLBrowser, float, int, int);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetBackgroundMode(void *, HHTMLBrowser, bool);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_SetDPIScalingFactor(void *, HHTMLBrowser, float);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_OpenDeveloperTools(void *, HHTMLBrowser);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_AllowStartRequest(void *, HHTMLBrowser, bool);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_JSDialogResponse(void *, HHTMLBrowser, bool);
extern void cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_FileLoadDialogResponse(void *, HHTMLBrowser, const char **);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,136 @@
#include "steam_defs.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_143.h"
HTTPRequestHandle cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_CreateHTTPRequest(void *linux_side, EHTTPMethod eHTTPRequestMethod, const char * pchAbsoluteURL)
{
return ((ISteamHTTP*)linux_side)->CreateHTTPRequest((EHTTPMethod)eHTTPRequestMethod, (const char *)pchAbsoluteURL);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestContextValue(void *linux_side, HTTPRequestHandle hRequest, uint64 ulContextValue)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestContextValue((HTTPRequestHandle)hRequest, (uint64)ulContextValue);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestNetworkActivityTimeout(void *linux_side, HTTPRequestHandle hRequest, uint32 unTimeoutSeconds)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestNetworkActivityTimeout((HTTPRequestHandle)hRequest, (uint32)unTimeoutSeconds);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestHeaderValue(void *linux_side, HTTPRequestHandle hRequest, const char * pchHeaderName, const char * pchHeaderValue)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestHeaderValue((HTTPRequestHandle)hRequest, (const char *)pchHeaderName, (const char *)pchHeaderValue);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestGetOrPostParameter(void *linux_side, HTTPRequestHandle hRequest, const char * pchParamName, const char * pchParamValue)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestGetOrPostParameter((HTTPRequestHandle)hRequest, (const char *)pchParamName, (const char *)pchParamValue);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SendHTTPRequest(void *linux_side, HTTPRequestHandle hRequest, SteamAPICall_t * pCallHandle)
{
return ((ISteamHTTP*)linux_side)->SendHTTPRequest((HTTPRequestHandle)hRequest, (SteamAPICall_t *)pCallHandle);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SendHTTPRequestAndStreamResponse(void *linux_side, HTTPRequestHandle hRequest, SteamAPICall_t * pCallHandle)
{
return ((ISteamHTTP*)linux_side)->SendHTTPRequestAndStreamResponse((HTTPRequestHandle)hRequest, (SteamAPICall_t *)pCallHandle);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_DeferHTTPRequest(void *linux_side, HTTPRequestHandle hRequest)
{
return ((ISteamHTTP*)linux_side)->DeferHTTPRequest((HTTPRequestHandle)hRequest);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_PrioritizeHTTPRequest(void *linux_side, HTTPRequestHandle hRequest)
{
return ((ISteamHTTP*)linux_side)->PrioritizeHTTPRequest((HTTPRequestHandle)hRequest);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPResponseHeaderSize(void *linux_side, HTTPRequestHandle hRequest, const char * pchHeaderName, uint32 * unResponseHeaderSize)
{
return ((ISteamHTTP*)linux_side)->GetHTTPResponseHeaderSize((HTTPRequestHandle)hRequest, (const char *)pchHeaderName, (uint32 *)unResponseHeaderSize);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPResponseHeaderValue(void *linux_side, HTTPRequestHandle hRequest, const char * pchHeaderName, uint8 * pHeaderValueBuffer, uint32 unBufferSize)
{
return ((ISteamHTTP*)linux_side)->GetHTTPResponseHeaderValue((HTTPRequestHandle)hRequest, (const char *)pchHeaderName, (uint8 *)pHeaderValueBuffer, (uint32)unBufferSize);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPResponseBodySize(void *linux_side, HTTPRequestHandle hRequest, uint32 * unBodySize)
{
return ((ISteamHTTP*)linux_side)->GetHTTPResponseBodySize((HTTPRequestHandle)hRequest, (uint32 *)unBodySize);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPResponseBodyData(void *linux_side, HTTPRequestHandle hRequest, uint8 * pBodyDataBuffer, uint32 unBufferSize)
{
return ((ISteamHTTP*)linux_side)->GetHTTPResponseBodyData((HTTPRequestHandle)hRequest, (uint8 *)pBodyDataBuffer, (uint32)unBufferSize);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPStreamingResponseBodyData(void *linux_side, HTTPRequestHandle hRequest, uint32 cOffset, uint8 * pBodyDataBuffer, uint32 unBufferSize)
{
return ((ISteamHTTP*)linux_side)->GetHTTPStreamingResponseBodyData((HTTPRequestHandle)hRequest, (uint32)cOffset, (uint8 *)pBodyDataBuffer, (uint32)unBufferSize);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_ReleaseHTTPRequest(void *linux_side, HTTPRequestHandle hRequest)
{
return ((ISteamHTTP*)linux_side)->ReleaseHTTPRequest((HTTPRequestHandle)hRequest);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPDownloadProgressPct(void *linux_side, HTTPRequestHandle hRequest, float * pflPercentOut)
{
return ((ISteamHTTP*)linux_side)->GetHTTPDownloadProgressPct((HTTPRequestHandle)hRequest, (float *)pflPercentOut);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestRawPostBody(void *linux_side, HTTPRequestHandle hRequest, const char * pchContentType, uint8 * pubBody, uint32 unBodyLen)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestRawPostBody((HTTPRequestHandle)hRequest, (const char *)pchContentType, (uint8 *)pubBody, (uint32)unBodyLen);
}
HTTPCookieContainerHandle cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_CreateCookieContainer(void *linux_side, bool bAllowResponsesToModify)
{
return ((ISteamHTTP*)linux_side)->CreateCookieContainer((bool)bAllowResponsesToModify);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_ReleaseCookieContainer(void *linux_side, HTTPCookieContainerHandle hCookieContainer)
{
return ((ISteamHTTP*)linux_side)->ReleaseCookieContainer((HTTPCookieContainerHandle)hCookieContainer);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetCookie(void *linux_side, HTTPCookieContainerHandle hCookieContainer, const char * pchHost, const char * pchUrl, const char * pchCookie)
{
return ((ISteamHTTP*)linux_side)->SetCookie((HTTPCookieContainerHandle)hCookieContainer, (const char *)pchHost, (const char *)pchUrl, (const char *)pchCookie);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestCookieContainer(void *linux_side, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestCookieContainer((HTTPRequestHandle)hRequest, (HTTPCookieContainerHandle)hCookieContainer);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestUserAgentInfo(void *linux_side, HTTPRequestHandle hRequest, const char * pchUserAgentInfo)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestUserAgentInfo((HTTPRequestHandle)hRequest, (const char *)pchUserAgentInfo);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestRequiresVerifiedCertificate(void *linux_side, HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestRequiresVerifiedCertificate((HTTPRequestHandle)hRequest, (bool)bRequireVerifiedCertificate);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestAbsoluteTimeoutMS(void *linux_side, HTTPRequestHandle hRequest, uint32 unMilliseconds)
{
return ((ISteamHTTP*)linux_side)->SetHTTPRequestAbsoluteTimeoutMS((HTTPRequestHandle)hRequest, (uint32)unMilliseconds);
}
bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPRequestWasTimedOut(void *linux_side, HTTPRequestHandle hRequest, bool * pbWasTimedOut)
{
return ((ISteamHTTP*)linux_side)->GetHTTPRequestWasTimedOut((HTTPRequestHandle)hRequest, (bool *)pbWasTimedOut);
}
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,31 @@
#ifdef __cplusplus
extern "C" {
#endif
extern HTTPRequestHandle cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_CreateHTTPRequest(void *, EHTTPMethod, const char *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestContextValue(void *, HTTPRequestHandle, uint64);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestNetworkActivityTimeout(void *, HTTPRequestHandle, uint32);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestHeaderValue(void *, HTTPRequestHandle, const char *, const char *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestGetOrPostParameter(void *, HTTPRequestHandle, const char *, const char *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SendHTTPRequest(void *, HTTPRequestHandle, SteamAPICall_t *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SendHTTPRequestAndStreamResponse(void *, HTTPRequestHandle, SteamAPICall_t *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_DeferHTTPRequest(void *, HTTPRequestHandle);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_PrioritizeHTTPRequest(void *, HTTPRequestHandle);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPResponseHeaderSize(void *, HTTPRequestHandle, const char *, uint32 *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPResponseHeaderValue(void *, HTTPRequestHandle, const char *, uint8 *, uint32);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPResponseBodySize(void *, HTTPRequestHandle, uint32 *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPResponseBodyData(void *, HTTPRequestHandle, uint8 *, uint32);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPStreamingResponseBodyData(void *, HTTPRequestHandle, uint32, uint8 *, uint32);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_ReleaseHTTPRequest(void *, HTTPRequestHandle);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPDownloadProgressPct(void *, HTTPRequestHandle, float *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestRawPostBody(void *, HTTPRequestHandle, const char *, uint8 *, uint32);
extern HTTPCookieContainerHandle cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_CreateCookieContainer(void *, bool);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_ReleaseCookieContainer(void *, HTTPCookieContainerHandle);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetCookie(void *, HTTPCookieContainerHandle, const char *, const char *, const char *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestCookieContainer(void *, HTTPRequestHandle, HTTPCookieContainerHandle);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestUserAgentInfo(void *, HTTPRequestHandle, const char *);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestRequiresVerifiedCertificate(void *, HTTPRequestHandle, bool);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_SetHTTPRequestAbsoluteTimeoutMS(void *, HTTPRequestHandle, uint32);
extern bool cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_GetHTTPRequestWasTimedOut(void *, HTTPRequestHandle, bool *);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,196 @@
#include "steam_defs.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamInventory_STEAMINVENTORY_INTERFACE_V003.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_143.h"
EResult cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultStatus(void *linux_side, SteamInventoryResult_t resultHandle)
{
return ((ISteamInventory*)linux_side)->GetResultStatus((SteamInventoryResult_t)resultHandle);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultItems(void *linux_side, SteamInventoryResult_t resultHandle, SteamItemDetails_t * pOutItemsArray, uint32 * punOutItemsArraySize)
{
return ((ISteamInventory*)linux_side)->GetResultItems((SteamInventoryResult_t)resultHandle, (SteamItemDetails_t *)pOutItemsArray, (uint32 *)punOutItemsArraySize);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultItemProperty(void *linux_side, SteamInventoryResult_t resultHandle, uint32 unItemIndex, const char * pchPropertyName, char * pchValueBuffer, uint32 * punValueBufferSizeOut)
{
return ((ISteamInventory*)linux_side)->GetResultItemProperty((SteamInventoryResult_t)resultHandle, (uint32)unItemIndex, (const char *)pchPropertyName, (char *)pchValueBuffer, (uint32 *)punValueBufferSizeOut);
}
uint32 cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultTimestamp(void *linux_side, SteamInventoryResult_t resultHandle)
{
return ((ISteamInventory*)linux_side)->GetResultTimestamp((SteamInventoryResult_t)resultHandle);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_CheckResultSteamID(void *linux_side, SteamInventoryResult_t resultHandle, CSteamID steamIDExpected)
{
return ((ISteamInventory*)linux_side)->CheckResultSteamID((SteamInventoryResult_t)resultHandle, (CSteamID)steamIDExpected);
}
void cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_DestroyResult(void *linux_side, SteamInventoryResult_t resultHandle)
{
((ISteamInventory*)linux_side)->DestroyResult((SteamInventoryResult_t)resultHandle);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetAllItems(void *linux_side, SteamInventoryResult_t * pResultHandle)
{
return ((ISteamInventory*)linux_side)->GetAllItems((SteamInventoryResult_t *)pResultHandle);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemsByID(void *linux_side, SteamInventoryResult_t * pResultHandle, const SteamItemInstanceID_t * pInstanceIDs, uint32 unCountInstanceIDs)
{
return ((ISteamInventory*)linux_side)->GetItemsByID((SteamInventoryResult_t *)pResultHandle, (const SteamItemInstanceID_t *)pInstanceIDs, (uint32)unCountInstanceIDs);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SerializeResult(void *linux_side, SteamInventoryResult_t resultHandle, void * pOutBuffer, uint32 * punOutBufferSize)
{
return ((ISteamInventory*)linux_side)->SerializeResult((SteamInventoryResult_t)resultHandle, (void *)pOutBuffer, (uint32 *)punOutBufferSize);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_DeserializeResult(void *linux_side, SteamInventoryResult_t * pOutResultHandle, const void * pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE)
{
return ((ISteamInventory*)linux_side)->DeserializeResult((SteamInventoryResult_t *)pOutResultHandle, (const void *)pBuffer, (uint32)unBufferSize, (bool)bRESERVED_MUST_BE_FALSE);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GenerateItems(void *linux_side, SteamInventoryResult_t * pResultHandle, const SteamItemDef_t * pArrayItemDefs, const uint32 * punArrayQuantity, uint32 unArrayLength)
{
return ((ISteamInventory*)linux_side)->GenerateItems((SteamInventoryResult_t *)pResultHandle, (const SteamItemDef_t *)pArrayItemDefs, (const uint32 *)punArrayQuantity, (uint32)unArrayLength);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GrantPromoItems(void *linux_side, SteamInventoryResult_t * pResultHandle)
{
return ((ISteamInventory*)linux_side)->GrantPromoItems((SteamInventoryResult_t *)pResultHandle);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_AddPromoItem(void *linux_side, SteamInventoryResult_t * pResultHandle, SteamItemDef_t itemDef)
{
return ((ISteamInventory*)linux_side)->AddPromoItem((SteamInventoryResult_t *)pResultHandle, (SteamItemDef_t)itemDef);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_AddPromoItems(void *linux_side, SteamInventoryResult_t * pResultHandle, const SteamItemDef_t * pArrayItemDefs, uint32 unArrayLength)
{
return ((ISteamInventory*)linux_side)->AddPromoItems((SteamInventoryResult_t *)pResultHandle, (const SteamItemDef_t *)pArrayItemDefs, (uint32)unArrayLength);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_ConsumeItem(void *linux_side, SteamInventoryResult_t * pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity)
{
return ((ISteamInventory*)linux_side)->ConsumeItem((SteamInventoryResult_t *)pResultHandle, (SteamItemInstanceID_t)itemConsume, (uint32)unQuantity);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_ExchangeItems(void *linux_side, SteamInventoryResult_t * pResultHandle, const SteamItemDef_t * pArrayGenerate, const uint32 * punArrayGenerateQuantity, uint32 unArrayGenerateLength, const SteamItemInstanceID_t * pArrayDestroy, const uint32 * punArrayDestroyQuantity, uint32 unArrayDestroyLength)
{
return ((ISteamInventory*)linux_side)->ExchangeItems((SteamInventoryResult_t *)pResultHandle, (const SteamItemDef_t *)pArrayGenerate, (const uint32 *)punArrayGenerateQuantity, (uint32)unArrayGenerateLength, (const SteamItemInstanceID_t *)pArrayDestroy, (const uint32 *)punArrayDestroyQuantity, (uint32)unArrayDestroyLength);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_TransferItemQuantity(void *linux_side, SteamInventoryResult_t * pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest)
{
return ((ISteamInventory*)linux_side)->TransferItemQuantity((SteamInventoryResult_t *)pResultHandle, (SteamItemInstanceID_t)itemIdSource, (uint32)unQuantity, (SteamItemInstanceID_t)itemIdDest);
}
void cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SendItemDropHeartbeat(void *linux_side)
{
((ISteamInventory*)linux_side)->SendItemDropHeartbeat();
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_TriggerItemDrop(void *linux_side, SteamInventoryResult_t * pResultHandle, SteamItemDef_t dropListDefinition)
{
return ((ISteamInventory*)linux_side)->TriggerItemDrop((SteamInventoryResult_t *)pResultHandle, (SteamItemDef_t)dropListDefinition);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_TradeItems(void *linux_side, SteamInventoryResult_t * pResultHandle, CSteamID steamIDTradePartner, const SteamItemInstanceID_t * pArrayGive, const uint32 * pArrayGiveQuantity, uint32 nArrayGiveLength, const SteamItemInstanceID_t * pArrayGet, const uint32 * pArrayGetQuantity, uint32 nArrayGetLength)
{
return ((ISteamInventory*)linux_side)->TradeItems((SteamInventoryResult_t *)pResultHandle, (CSteamID)steamIDTradePartner, (const SteamItemInstanceID_t *)pArrayGive, (const uint32 *)pArrayGiveQuantity, (uint32)nArrayGiveLength, (const SteamItemInstanceID_t *)pArrayGet, (const uint32 *)pArrayGetQuantity, (uint32)nArrayGetLength);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_LoadItemDefinitions(void *linux_side)
{
return ((ISteamInventory*)linux_side)->LoadItemDefinitions();
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemDefinitionIDs(void *linux_side, SteamItemDef_t * pItemDefIDs, uint32 * punItemDefIDsArraySize)
{
return ((ISteamInventory*)linux_side)->GetItemDefinitionIDs((SteamItemDef_t *)pItemDefIDs, (uint32 *)punItemDefIDsArraySize);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemDefinitionProperty(void *linux_side, SteamItemDef_t iDefinition, const char * pchPropertyName, char * pchValueBuffer, uint32 * punValueBufferSizeOut)
{
return ((ISteamInventory*)linux_side)->GetItemDefinitionProperty((SteamItemDef_t)iDefinition, (const char *)pchPropertyName, (char *)pchValueBuffer, (uint32 *)punValueBufferSizeOut);
}
SteamAPICall_t cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_RequestEligiblePromoItemDefinitionsIDs(void *linux_side, CSteamID steamID)
{
return ((ISteamInventory*)linux_side)->RequestEligiblePromoItemDefinitionsIDs((CSteamID)steamID);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetEligiblePromoItemDefinitionIDs(void *linux_side, CSteamID steamID, SteamItemDef_t * pItemDefIDs, uint32 * punItemDefIDsArraySize)
{
return ((ISteamInventory*)linux_side)->GetEligiblePromoItemDefinitionIDs((CSteamID)steamID, (SteamItemDef_t *)pItemDefIDs, (uint32 *)punItemDefIDsArraySize);
}
SteamAPICall_t cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_StartPurchase(void *linux_side, const SteamItemDef_t * pArrayItemDefs, const uint32 * punArrayQuantity, uint32 unArrayLength)
{
return ((ISteamInventory*)linux_side)->StartPurchase((const SteamItemDef_t *)pArrayItemDefs, (const uint32 *)punArrayQuantity, (uint32)unArrayLength);
}
SteamAPICall_t cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_RequestPrices(void *linux_side)
{
return ((ISteamInventory*)linux_side)->RequestPrices();
}
uint32 cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetNumItemsWithPrices(void *linux_side)
{
return ((ISteamInventory*)linux_side)->GetNumItemsWithPrices();
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemsWithPrices(void *linux_side, SteamItemDef_t * pArrayItemDefs, uint64 * pCurrentPrices, uint64 * pBasePrices, uint32 unArrayLength)
{
return ((ISteamInventory*)linux_side)->GetItemsWithPrices((SteamItemDef_t *)pArrayItemDefs, (uint64 *)pCurrentPrices, (uint64 *)pBasePrices, (uint32)unArrayLength);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemPrice(void *linux_side, SteamItemDef_t iDefinition, uint64 * pCurrentPrice, uint64 * pBasePrice)
{
return ((ISteamInventory*)linux_side)->GetItemPrice((SteamItemDef_t)iDefinition, (uint64 *)pCurrentPrice, (uint64 *)pBasePrice);
}
SteamInventoryUpdateHandle_t cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_StartUpdateProperties(void *linux_side)
{
return ((ISteamInventory*)linux_side)->StartUpdateProperties();
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_RemoveProperty(void *linux_side, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName)
{
return ((ISteamInventory*)linux_side)->RemoveProperty((SteamInventoryUpdateHandle_t)handle, (SteamItemInstanceID_t)nItemID, (const char *)pchPropertyName);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SetProperty(void *linux_side, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, const char * pchPropertyValue)
{
return ((ISteamInventory*)linux_side)->SetProperty((SteamInventoryUpdateHandle_t)handle, (SteamItemInstanceID_t)nItemID, (const char *)pchPropertyName, (const char *)pchPropertyValue);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SetProperty_2(void *linux_side, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, bool bValue)
{
return ((ISteamInventory*)linux_side)->SetProperty((SteamInventoryUpdateHandle_t)handle, (SteamItemInstanceID_t)nItemID, (const char *)pchPropertyName, (bool)bValue);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SetProperty_3(void *linux_side, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, int64 nValue)
{
return ((ISteamInventory*)linux_side)->SetProperty((SteamInventoryUpdateHandle_t)handle, (SteamItemInstanceID_t)nItemID, (const char *)pchPropertyName, (int64)nValue);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SetProperty_4(void *linux_side, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, float flValue)
{
return ((ISteamInventory*)linux_side)->SetProperty((SteamInventoryUpdateHandle_t)handle, (SteamItemInstanceID_t)nItemID, (const char *)pchPropertyName, (float)flValue);
}
bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SubmitUpdateProperties(void *linux_side, SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle)
{
return ((ISteamInventory*)linux_side)->SubmitUpdateProperties((SteamInventoryUpdateHandle_t)handle, (SteamInventoryResult_t *)pResultHandle);
}
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,43 @@
#ifdef __cplusplus
extern "C" {
#endif
extern EResult cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultStatus(void *, SteamInventoryResult_t);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultItems(void *, SteamInventoryResult_t, SteamItemDetails_t *, uint32 *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultItemProperty(void *, SteamInventoryResult_t, uint32, const char *, char *, uint32 *);
extern uint32 cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultTimestamp(void *, SteamInventoryResult_t);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_CheckResultSteamID(void *, SteamInventoryResult_t, CSteamID);
extern void cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_DestroyResult(void *, SteamInventoryResult_t);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetAllItems(void *, SteamInventoryResult_t *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemsByID(void *, SteamInventoryResult_t *, const SteamItemInstanceID_t *, uint32);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SerializeResult(void *, SteamInventoryResult_t, void *, uint32 *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_DeserializeResult(void *, SteamInventoryResult_t *, const void *, uint32, bool);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GenerateItems(void *, SteamInventoryResult_t *, const SteamItemDef_t *, const uint32 *, uint32);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GrantPromoItems(void *, SteamInventoryResult_t *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_AddPromoItem(void *, SteamInventoryResult_t *, SteamItemDef_t);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_AddPromoItems(void *, SteamInventoryResult_t *, const SteamItemDef_t *, uint32);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_ConsumeItem(void *, SteamInventoryResult_t *, SteamItemInstanceID_t, uint32);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_ExchangeItems(void *, SteamInventoryResult_t *, const SteamItemDef_t *, const uint32 *, uint32, const SteamItemInstanceID_t *, const uint32 *, uint32);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_TransferItemQuantity(void *, SteamInventoryResult_t *, SteamItemInstanceID_t, uint32, SteamItemInstanceID_t);
extern void cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SendItemDropHeartbeat(void *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_TriggerItemDrop(void *, SteamInventoryResult_t *, SteamItemDef_t);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_TradeItems(void *, SteamInventoryResult_t *, CSteamID, const SteamItemInstanceID_t *, const uint32 *, uint32, const SteamItemInstanceID_t *, const uint32 *, uint32);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_LoadItemDefinitions(void *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemDefinitionIDs(void *, SteamItemDef_t *, uint32 *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemDefinitionProperty(void *, SteamItemDef_t, const char *, char *, uint32 *);
extern SteamAPICall_t cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_RequestEligiblePromoItemDefinitionsIDs(void *, CSteamID);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetEligiblePromoItemDefinitionIDs(void *, CSteamID, SteamItemDef_t *, uint32 *);
extern SteamAPICall_t cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_StartPurchase(void *, const SteamItemDef_t *, const uint32 *, uint32);
extern SteamAPICall_t cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_RequestPrices(void *);
extern uint32 cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetNumItemsWithPrices(void *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemsWithPrices(void *, SteamItemDef_t *, uint64 *, uint64 *, uint32);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetItemPrice(void *, SteamItemDef_t, uint64 *, uint64 *);
extern SteamInventoryUpdateHandle_t cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_StartUpdateProperties(void *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_RemoveProperty(void *, SteamInventoryUpdateHandle_t, SteamItemInstanceID_t, const char *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SetProperty(void *, SteamInventoryUpdateHandle_t, SteamItemInstanceID_t, const char *, const char *);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SetProperty_2(void *, SteamInventoryUpdateHandle_t, SteamItemInstanceID_t, const char *, bool);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SetProperty_3(void *, SteamInventoryUpdateHandle_t, SteamItemInstanceID_t, const char *, int64);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SetProperty_4(void *, SteamInventoryUpdateHandle_t, SteamItemInstanceID_t, const char *, float);
extern bool cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_SubmitUpdateProperties(void *, SteamInventoryUpdateHandle_t, SteamInventoryResult_t *);
#ifdef __cplusplus
}
#endif

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamMatchmakingServers_SteamMatchMakingServers002.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
HServerListRequest cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestInternetServerList(void *linux_side, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse)
{
return ((ISteamMatchmakingServers*)linux_side)->RequestInternetServerList((AppId_t)iApp, (MatchMakingKeyValuePair_t **)ppchFilters, (uint32)nFilters, (ISteamMatchmakingServerListResponse *)pRequestServersResponse);

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamMatchmaking_SteamMatchMaking009.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
int cppISteamMatchmaking_SteamMatchMaking009_GetFavoriteGameCount(void *linux_side)
{
return ((ISteamMatchmaking*)linux_side)->GetFavoriteGameCount();

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamMusicRemote_STEAMMUSICREMOTE_INTERFACE_VERSION001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
bool cppISteamMusicRemote_STEAMMUSICREMOTE_INTERFACE_VERSION001_RegisterSteamMusicRemote(void *linux_side, const char * pchName)
{
return ((ISteamMusicRemote*)linux_side)->RegisterSteamMusicRemote((const char *)pchName);

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamMusic_STEAMMUSIC_INTERFACE_VERSION001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
bool cppISteamMusic_STEAMMUSIC_INTERFACE_VERSION001_BIsEnabled(void *linux_side)
{
return ((ISteamMusic*)linux_side)->BIsEnabled();

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamNetworking_SteamNetworking005.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
bool cppISteamNetworking_SteamNetworking005_SendP2PPacket(void *linux_side, CSteamID steamIDRemote, const void * pubData, uint32 cubData, EP2PSend eP2PSendType, int nChannel)
{
return ((ISteamNetworking*)linux_side)->SendP2PPacket((CSteamID)steamIDRemote, (const void *)pubData, (uint32)cubData, (EP2PSend)eP2PSendType, (int)nChannel);

View file

@ -1,12 +1,12 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_142/isteamparentalsettings.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamworks_sdk_143/isteamparentalsettings.h"
#include "steamclient_private.h"
#include "cppISteamParentalSettings_STEAMPARENTALSETTINGS_INTERFACE_VERSION001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
bool cppISteamParentalSettings_STEAMPARENTALSETTINGS_INTERFACE_VERSION001_BIsParentalLockEnabled(void *linux_side)
{
return ((ISteamParentalSettings*)linux_side)->BIsParentalLockEnabled();

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION014.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION014_FileWrite(void *linux_side, const char * pchFile, const void * pvData, int32 cubData)
{
return ((ISteamRemoteStorage*)linux_side)->FileWrite((const char *)pchFile, (const void *)pvData, (int32)cubData);

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamScreenshots_STEAMSCREENSHOTS_INTERFACE_VERSION003.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
ScreenshotHandle cppISteamScreenshots_STEAMSCREENSHOTS_INTERFACE_VERSION003_WriteScreenshot(void *linux_side, void * pubRGB, uint32 cubRGB, int nWidth, int nHeight)
{
return ((ISteamScreenshots*)linux_side)->WriteScreenshot((void *)pubRGB, (uint32)cubRGB, (int)nWidth, (int)nHeight);

View file

@ -0,0 +1,395 @@
#include "steam_defs.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamUGC_STEAMUGC_INTERFACE_VERSION012.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_143.h"
UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateQueryUserUGCRequest(void *linux_side, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage)
{
return ((ISteamUGC*)linux_side)->CreateQueryUserUGCRequest((AccountID_t)unAccountID, (EUserUGCList)eListType, (EUGCMatchingUGCType)eMatchingUGCType, (EUserUGCListSortOrder)eSortOrder, (AppId_t)nCreatorAppID, (AppId_t)nConsumerAppID, (uint32)unPage);
}
UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateQueryAllUGCRequest(void *linux_side, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage)
{
return ((ISteamUGC*)linux_side)->CreateQueryAllUGCRequest((EUGCQuery)eQueryType, (EUGCMatchingUGCType)eMatchingeMatchingUGCTypeFileType, (AppId_t)nCreatorAppID, (AppId_t)nConsumerAppID, (uint32)unPage);
}
UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateQueryAllUGCRequest_2(void *linux_side, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor)
{
return ((ISteamUGC*)linux_side)->CreateQueryAllUGCRequest((EUGCQuery)eQueryType, (EUGCMatchingUGCType)eMatchingeMatchingUGCTypeFileType, (AppId_t)nCreatorAppID, (AppId_t)nConsumerAppID, (const char *)pchCursor);
}
UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateQueryUGCDetailsRequest(void *linux_side, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs)
{
return ((ISteamUGC*)linux_side)->CreateQueryUGCDetailsRequest((PublishedFileId_t *)pvecPublishedFileID, (uint32)unNumPublishedFileIDs);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SendQueryUGCRequest(void *linux_side, UGCQueryHandle_t handle)
{
return ((ISteamUGC*)linux_side)->SendQueryUGCRequest((UGCQueryHandle_t)handle);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCResult(void *linux_side, UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t * pDetails)
{
SteamUGCDetails_t lin_pDetails;
win_to_lin_struct_SteamUGCDetails_t_143(pDetails, &lin_pDetails);
bool retval = ((ISteamUGC*)linux_side)->GetQueryUGCResult((UGCQueryHandle_t)handle, (uint32)index, &lin_pDetails);
lin_to_win_struct_SteamUGCDetails_t_143(&lin_pDetails, pDetails);
return retval;
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCPreviewURL(void *linux_side, UGCQueryHandle_t handle, uint32 index, char * pchURL, uint32 cchURLSize)
{
return ((ISteamUGC*)linux_side)->GetQueryUGCPreviewURL((UGCQueryHandle_t)handle, (uint32)index, (char *)pchURL, (uint32)cchURLSize);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCMetadata(void *linux_side, UGCQueryHandle_t handle, uint32 index, char * pchMetadata, uint32 cchMetadatasize)
{
return ((ISteamUGC*)linux_side)->GetQueryUGCMetadata((UGCQueryHandle_t)handle, (uint32)index, (char *)pchMetadata, (uint32)cchMetadatasize);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCChildren(void *linux_side, UGCQueryHandle_t handle, uint32 index, PublishedFileId_t * pvecPublishedFileID, uint32 cMaxEntries)
{
return ((ISteamUGC*)linux_side)->GetQueryUGCChildren((UGCQueryHandle_t)handle, (uint32)index, (PublishedFileId_t *)pvecPublishedFileID, (uint32)cMaxEntries);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCStatistic(void *linux_side, UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 * pStatValue)
{
return ((ISteamUGC*)linux_side)->GetQueryUGCStatistic((UGCQueryHandle_t)handle, (uint32)index, (EItemStatistic)eStatType, (uint64 *)pStatValue);
}
uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCNumAdditionalPreviews(void *linux_side, UGCQueryHandle_t handle, uint32 index)
{
return ((ISteamUGC*)linux_side)->GetQueryUGCNumAdditionalPreviews((UGCQueryHandle_t)handle, (uint32)index);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCAdditionalPreview(void *linux_side, UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char * pchURLOrVideoID, uint32 cchURLSize, char * pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType * pPreviewType)
{
return ((ISteamUGC*)linux_side)->GetQueryUGCAdditionalPreview((UGCQueryHandle_t)handle, (uint32)index, (uint32)previewIndex, (char *)pchURLOrVideoID, (uint32)cchURLSize, (char *)pchOriginalFileName, (uint32)cchOriginalFileNameSize, (EItemPreviewType *)pPreviewType);
}
uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCNumKeyValueTags(void *linux_side, UGCQueryHandle_t handle, uint32 index)
{
return ((ISteamUGC*)linux_side)->GetQueryUGCNumKeyValueTags((UGCQueryHandle_t)handle, (uint32)index);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCKeyValueTag(void *linux_side, UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char * pchKey, uint32 cchKeySize, char * pchValue, uint32 cchValueSize)
{
return ((ISteamUGC*)linux_side)->GetQueryUGCKeyValueTag((UGCQueryHandle_t)handle, (uint32)index, (uint32)keyValueTagIndex, (char *)pchKey, (uint32)cchKeySize, (char *)pchValue, (uint32)cchValueSize);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_ReleaseQueryUGCRequest(void *linux_side, UGCQueryHandle_t handle)
{
return ((ISteamUGC*)linux_side)->ReleaseQueryUGCRequest((UGCQueryHandle_t)handle);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddRequiredTag(void *linux_side, UGCQueryHandle_t handle, const char * pTagName)
{
return ((ISteamUGC*)linux_side)->AddRequiredTag((UGCQueryHandle_t)handle, (const char *)pTagName);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddExcludedTag(void *linux_side, UGCQueryHandle_t handle, const char * pTagName)
{
return ((ISteamUGC*)linux_side)->AddExcludedTag((UGCQueryHandle_t)handle, (const char *)pTagName);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnOnlyIDs(void *linux_side, UGCQueryHandle_t handle, bool bReturnOnlyIDs)
{
return ((ISteamUGC*)linux_side)->SetReturnOnlyIDs((UGCQueryHandle_t)handle, (bool)bReturnOnlyIDs);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnKeyValueTags(void *linux_side, UGCQueryHandle_t handle, bool bReturnKeyValueTags)
{
return ((ISteamUGC*)linux_side)->SetReturnKeyValueTags((UGCQueryHandle_t)handle, (bool)bReturnKeyValueTags);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnLongDescription(void *linux_side, UGCQueryHandle_t handle, bool bReturnLongDescription)
{
return ((ISteamUGC*)linux_side)->SetReturnLongDescription((UGCQueryHandle_t)handle, (bool)bReturnLongDescription);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnMetadata(void *linux_side, UGCQueryHandle_t handle, bool bReturnMetadata)
{
return ((ISteamUGC*)linux_side)->SetReturnMetadata((UGCQueryHandle_t)handle, (bool)bReturnMetadata);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnChildren(void *linux_side, UGCQueryHandle_t handle, bool bReturnChildren)
{
return ((ISteamUGC*)linux_side)->SetReturnChildren((UGCQueryHandle_t)handle, (bool)bReturnChildren);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnAdditionalPreviews(void *linux_side, UGCQueryHandle_t handle, bool bReturnAdditionalPreviews)
{
return ((ISteamUGC*)linux_side)->SetReturnAdditionalPreviews((UGCQueryHandle_t)handle, (bool)bReturnAdditionalPreviews);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnTotalOnly(void *linux_side, UGCQueryHandle_t handle, bool bReturnTotalOnly)
{
return ((ISteamUGC*)linux_side)->SetReturnTotalOnly((UGCQueryHandle_t)handle, (bool)bReturnTotalOnly);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnPlaytimeStats(void *linux_side, UGCQueryHandle_t handle, uint32 unDays)
{
return ((ISteamUGC*)linux_side)->SetReturnPlaytimeStats((UGCQueryHandle_t)handle, (uint32)unDays);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetLanguage(void *linux_side, UGCQueryHandle_t handle, const char * pchLanguage)
{
return ((ISteamUGC*)linux_side)->SetLanguage((UGCQueryHandle_t)handle, (const char *)pchLanguage);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetAllowCachedResponse(void *linux_side, UGCQueryHandle_t handle, uint32 unMaxAgeSeconds)
{
return ((ISteamUGC*)linux_side)->SetAllowCachedResponse((UGCQueryHandle_t)handle, (uint32)unMaxAgeSeconds);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetCloudFileNameFilter(void *linux_side, UGCQueryHandle_t handle, const char * pMatchCloudFileName)
{
return ((ISteamUGC*)linux_side)->SetCloudFileNameFilter((UGCQueryHandle_t)handle, (const char *)pMatchCloudFileName);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetMatchAnyTag(void *linux_side, UGCQueryHandle_t handle, bool bMatchAnyTag)
{
return ((ISteamUGC*)linux_side)->SetMatchAnyTag((UGCQueryHandle_t)handle, (bool)bMatchAnyTag);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetSearchText(void *linux_side, UGCQueryHandle_t handle, const char * pSearchText)
{
return ((ISteamUGC*)linux_side)->SetSearchText((UGCQueryHandle_t)handle, (const char *)pSearchText);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetRankedByTrendDays(void *linux_side, UGCQueryHandle_t handle, uint32 unDays)
{
return ((ISteamUGC*)linux_side)->SetRankedByTrendDays((UGCQueryHandle_t)handle, (uint32)unDays);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddRequiredKeyValueTag(void *linux_side, UGCQueryHandle_t handle, const char * pKey, const char * pValue)
{
return ((ISteamUGC*)linux_side)->AddRequiredKeyValueTag((UGCQueryHandle_t)handle, (const char *)pKey, (const char *)pValue);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RequestUGCDetails(void *linux_side, PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds)
{
return ((ISteamUGC*)linux_side)->RequestUGCDetails((PublishedFileId_t)nPublishedFileID, (uint32)unMaxAgeSeconds);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateItem(void *linux_side, AppId_t nConsumerAppId, EWorkshopFileType eFileType)
{
return ((ISteamUGC*)linux_side)->CreateItem((AppId_t)nConsumerAppId, (EWorkshopFileType)eFileType);
}
UGCUpdateHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_StartItemUpdate(void *linux_side, AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->StartItemUpdate((AppId_t)nConsumerAppId, (PublishedFileId_t)nPublishedFileID);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemTitle(void *linux_side, UGCUpdateHandle_t handle, const char * pchTitle)
{
return ((ISteamUGC*)linux_side)->SetItemTitle((UGCUpdateHandle_t)handle, (const char *)pchTitle);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemDescription(void *linux_side, UGCUpdateHandle_t handle, const char * pchDescription)
{
return ((ISteamUGC*)linux_side)->SetItemDescription((UGCUpdateHandle_t)handle, (const char *)pchDescription);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemUpdateLanguage(void *linux_side, UGCUpdateHandle_t handle, const char * pchLanguage)
{
return ((ISteamUGC*)linux_side)->SetItemUpdateLanguage((UGCUpdateHandle_t)handle, (const char *)pchLanguage);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemMetadata(void *linux_side, UGCUpdateHandle_t handle, const char * pchMetaData)
{
return ((ISteamUGC*)linux_side)->SetItemMetadata((UGCUpdateHandle_t)handle, (const char *)pchMetaData);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemVisibility(void *linux_side, UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility)
{
return ((ISteamUGC*)linux_side)->SetItemVisibility((UGCUpdateHandle_t)handle, (ERemoteStoragePublishedFileVisibility)eVisibility);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemTags(void *linux_side, UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t * pTags)
{
return ((ISteamUGC*)linux_side)->SetItemTags((UGCUpdateHandle_t)updateHandle, (const SteamParamStringArray_t *)pTags);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemContent(void *linux_side, UGCUpdateHandle_t handle, const char * pszContentFolder)
{
return ((ISteamUGC*)linux_side)->SetItemContent((UGCUpdateHandle_t)handle, (const char *)pszContentFolder);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemPreview(void *linux_side, UGCUpdateHandle_t handle, const char * pszPreviewFile)
{
return ((ISteamUGC*)linux_side)->SetItemPreview((UGCUpdateHandle_t)handle, (const char *)pszPreviewFile);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetAllowLegacyUpload(void *linux_side, UGCUpdateHandle_t handle, bool bAllowLegacyUpload)
{
return ((ISteamUGC*)linux_side)->SetAllowLegacyUpload((UGCUpdateHandle_t)handle, (bool)bAllowLegacyUpload);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveItemKeyValueTags(void *linux_side, UGCUpdateHandle_t handle, const char * pchKey)
{
return ((ISteamUGC*)linux_side)->RemoveItemKeyValueTags((UGCUpdateHandle_t)handle, (const char *)pchKey);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddItemKeyValueTag(void *linux_side, UGCUpdateHandle_t handle, const char * pchKey, const char * pchValue)
{
return ((ISteamUGC*)linux_side)->AddItemKeyValueTag((UGCUpdateHandle_t)handle, (const char *)pchKey, (const char *)pchValue);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddItemPreviewFile(void *linux_side, UGCUpdateHandle_t handle, const char * pszPreviewFile, EItemPreviewType type)
{
return ((ISteamUGC*)linux_side)->AddItemPreviewFile((UGCUpdateHandle_t)handle, (const char *)pszPreviewFile, (EItemPreviewType)type);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddItemPreviewVideo(void *linux_side, UGCUpdateHandle_t handle, const char * pszVideoID)
{
return ((ISteamUGC*)linux_side)->AddItemPreviewVideo((UGCUpdateHandle_t)handle, (const char *)pszVideoID);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_UpdateItemPreviewFile(void *linux_side, UGCUpdateHandle_t handle, uint32 index, const char * pszPreviewFile)
{
return ((ISteamUGC*)linux_side)->UpdateItemPreviewFile((UGCUpdateHandle_t)handle, (uint32)index, (const char *)pszPreviewFile);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_UpdateItemPreviewVideo(void *linux_side, UGCUpdateHandle_t handle, uint32 index, const char * pszVideoID)
{
return ((ISteamUGC*)linux_side)->UpdateItemPreviewVideo((UGCUpdateHandle_t)handle, (uint32)index, (const char *)pszVideoID);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveItemPreview(void *linux_side, UGCUpdateHandle_t handle, uint32 index)
{
return ((ISteamUGC*)linux_side)->RemoveItemPreview((UGCUpdateHandle_t)handle, (uint32)index);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SubmitItemUpdate(void *linux_side, UGCUpdateHandle_t handle, const char * pchChangeNote)
{
return ((ISteamUGC*)linux_side)->SubmitItemUpdate((UGCUpdateHandle_t)handle, (const char *)pchChangeNote);
}
EItemUpdateStatus cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetItemUpdateProgress(void *linux_side, UGCUpdateHandle_t handle, uint64 * punBytesProcessed, uint64 * punBytesTotal)
{
return ((ISteamUGC*)linux_side)->GetItemUpdateProgress((UGCUpdateHandle_t)handle, (uint64 *)punBytesProcessed, (uint64 *)punBytesTotal);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetUserItemVote(void *linux_side, PublishedFileId_t nPublishedFileID, bool bVoteUp)
{
return ((ISteamUGC*)linux_side)->SetUserItemVote((PublishedFileId_t)nPublishedFileID, (bool)bVoteUp);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetUserItemVote(void *linux_side, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->GetUserItemVote((PublishedFileId_t)nPublishedFileID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddItemToFavorites(void *linux_side, AppId_t nAppId, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->AddItemToFavorites((AppId_t)nAppId, (PublishedFileId_t)nPublishedFileID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveItemFromFavorites(void *linux_side, AppId_t nAppId, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->RemoveItemFromFavorites((AppId_t)nAppId, (PublishedFileId_t)nPublishedFileID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SubscribeItem(void *linux_side, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->SubscribeItem((PublishedFileId_t)nPublishedFileID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_UnsubscribeItem(void *linux_side, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->UnsubscribeItem((PublishedFileId_t)nPublishedFileID);
}
uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetNumSubscribedItems(void *linux_side)
{
return ((ISteamUGC*)linux_side)->GetNumSubscribedItems();
}
uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetSubscribedItems(void *linux_side, PublishedFileId_t * pvecPublishedFileID, uint32 cMaxEntries)
{
return ((ISteamUGC*)linux_side)->GetSubscribedItems((PublishedFileId_t *)pvecPublishedFileID, (uint32)cMaxEntries);
}
uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetItemState(void *linux_side, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->GetItemState((PublishedFileId_t)nPublishedFileID);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetItemInstallInfo(void *linux_side, PublishedFileId_t nPublishedFileID, uint64 * punSizeOnDisk, char * pchFolder, uint32 cchFolderSize, uint32 * punTimeStamp)
{
return ((ISteamUGC*)linux_side)->GetItemInstallInfo((PublishedFileId_t)nPublishedFileID, (uint64 *)punSizeOnDisk, (char *)pchFolder, (uint32)cchFolderSize, (uint32 *)punTimeStamp);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetItemDownloadInfo(void *linux_side, PublishedFileId_t nPublishedFileID, uint64 * punBytesDownloaded, uint64 * punBytesTotal)
{
return ((ISteamUGC*)linux_side)->GetItemDownloadInfo((PublishedFileId_t)nPublishedFileID, (uint64 *)punBytesDownloaded, (uint64 *)punBytesTotal);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_DownloadItem(void *linux_side, PublishedFileId_t nPublishedFileID, bool bHighPriority)
{
return ((ISteamUGC*)linux_side)->DownloadItem((PublishedFileId_t)nPublishedFileID, (bool)bHighPriority);
}
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_BInitWorkshopForGameServer(void *linux_side, DepotId_t unWorkshopDepotID, const char * pszFolder)
{
return ((ISteamUGC*)linux_side)->BInitWorkshopForGameServer((DepotId_t)unWorkshopDepotID, (const char *)pszFolder);
}
void cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SuspendDownloads(void *linux_side, bool bSuspend)
{
((ISteamUGC*)linux_side)->SuspendDownloads((bool)bSuspend);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_StartPlaytimeTracking(void *linux_side, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs)
{
return ((ISteamUGC*)linux_side)->StartPlaytimeTracking((PublishedFileId_t *)pvecPublishedFileID, (uint32)unNumPublishedFileIDs);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_StopPlaytimeTracking(void *linux_side, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs)
{
return ((ISteamUGC*)linux_side)->StopPlaytimeTracking((PublishedFileId_t *)pvecPublishedFileID, (uint32)unNumPublishedFileIDs);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_StopPlaytimeTrackingForAllItems(void *linux_side)
{
return ((ISteamUGC*)linux_side)->StopPlaytimeTrackingForAllItems();
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddDependency(void *linux_side, PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID)
{
return ((ISteamUGC*)linux_side)->AddDependency((PublishedFileId_t)nParentPublishedFileID, (PublishedFileId_t)nChildPublishedFileID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveDependency(void *linux_side, PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID)
{
return ((ISteamUGC*)linux_side)->RemoveDependency((PublishedFileId_t)nParentPublishedFileID, (PublishedFileId_t)nChildPublishedFileID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddAppDependency(void *linux_side, PublishedFileId_t nPublishedFileID, AppId_t nAppID)
{
return ((ISteamUGC*)linux_side)->AddAppDependency((PublishedFileId_t)nPublishedFileID, (AppId_t)nAppID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveAppDependency(void *linux_side, PublishedFileId_t nPublishedFileID, AppId_t nAppID)
{
return ((ISteamUGC*)linux_side)->RemoveAppDependency((PublishedFileId_t)nPublishedFileID, (AppId_t)nAppID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetAppDependencies(void *linux_side, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->GetAppDependencies((PublishedFileId_t)nPublishedFileID);
}
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_DeleteItem(void *linux_side, PublishedFileId_t nPublishedFileID)
{
return ((ISteamUGC*)linux_side)->DeleteItem((PublishedFileId_t)nPublishedFileID);
}
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,82 @@
#ifdef __cplusplus
extern "C" {
#endif
extern UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateQueryUserUGCRequest(void *, AccountID_t, EUserUGCList, EUGCMatchingUGCType, EUserUGCListSortOrder, AppId_t, AppId_t, uint32);
extern UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateQueryAllUGCRequest(void *, EUGCQuery, EUGCMatchingUGCType, AppId_t, AppId_t, uint32);
extern UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateQueryAllUGCRequest_2(void *, EUGCQuery, EUGCMatchingUGCType, AppId_t, AppId_t, const char *);
extern UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateQueryUGCDetailsRequest(void *, PublishedFileId_t *, uint32);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SendQueryUGCRequest(void *, UGCQueryHandle_t);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCResult(void *, UGCQueryHandle_t, uint32, SteamUGCDetails_t *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCPreviewURL(void *, UGCQueryHandle_t, uint32, char *, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCMetadata(void *, UGCQueryHandle_t, uint32, char *, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCChildren(void *, UGCQueryHandle_t, uint32, PublishedFileId_t *, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCStatistic(void *, UGCQueryHandle_t, uint32, EItemStatistic, uint64 *);
extern uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCNumAdditionalPreviews(void *, UGCQueryHandle_t, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCAdditionalPreview(void *, UGCQueryHandle_t, uint32, uint32, char *, uint32, char *, uint32, EItemPreviewType *);
extern uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCNumKeyValueTags(void *, UGCQueryHandle_t, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetQueryUGCKeyValueTag(void *, UGCQueryHandle_t, uint32, uint32, char *, uint32, char *, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_ReleaseQueryUGCRequest(void *, UGCQueryHandle_t);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddRequiredTag(void *, UGCQueryHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddExcludedTag(void *, UGCQueryHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnOnlyIDs(void *, UGCQueryHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnKeyValueTags(void *, UGCQueryHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnLongDescription(void *, UGCQueryHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnMetadata(void *, UGCQueryHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnChildren(void *, UGCQueryHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnAdditionalPreviews(void *, UGCQueryHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnTotalOnly(void *, UGCQueryHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetReturnPlaytimeStats(void *, UGCQueryHandle_t, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetLanguage(void *, UGCQueryHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetAllowCachedResponse(void *, UGCQueryHandle_t, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetCloudFileNameFilter(void *, UGCQueryHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetMatchAnyTag(void *, UGCQueryHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetSearchText(void *, UGCQueryHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetRankedByTrendDays(void *, UGCQueryHandle_t, uint32);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddRequiredKeyValueTag(void *, UGCQueryHandle_t, const char *, const char *);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RequestUGCDetails(void *, PublishedFileId_t, uint32);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_CreateItem(void *, AppId_t, EWorkshopFileType);
extern UGCUpdateHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_StartItemUpdate(void *, AppId_t, PublishedFileId_t);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemTitle(void *, UGCUpdateHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemDescription(void *, UGCUpdateHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemUpdateLanguage(void *, UGCUpdateHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemMetadata(void *, UGCUpdateHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemVisibility(void *, UGCUpdateHandle_t, ERemoteStoragePublishedFileVisibility);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemTags(void *, UGCUpdateHandle_t, const SteamParamStringArray_t *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemContent(void *, UGCUpdateHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetItemPreview(void *, UGCUpdateHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetAllowLegacyUpload(void *, UGCUpdateHandle_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveItemKeyValueTags(void *, UGCUpdateHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddItemKeyValueTag(void *, UGCUpdateHandle_t, const char *, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddItemPreviewFile(void *, UGCUpdateHandle_t, const char *, EItemPreviewType);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddItemPreviewVideo(void *, UGCUpdateHandle_t, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_UpdateItemPreviewFile(void *, UGCUpdateHandle_t, uint32, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_UpdateItemPreviewVideo(void *, UGCUpdateHandle_t, uint32, const char *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveItemPreview(void *, UGCUpdateHandle_t, uint32);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SubmitItemUpdate(void *, UGCUpdateHandle_t, const char *);
extern EItemUpdateStatus cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetItemUpdateProgress(void *, UGCUpdateHandle_t, uint64 *, uint64 *);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SetUserItemVote(void *, PublishedFileId_t, bool);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetUserItemVote(void *, PublishedFileId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddItemToFavorites(void *, AppId_t, PublishedFileId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveItemFromFavorites(void *, AppId_t, PublishedFileId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SubscribeItem(void *, PublishedFileId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_UnsubscribeItem(void *, PublishedFileId_t);
extern uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetNumSubscribedItems(void *);
extern uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetSubscribedItems(void *, PublishedFileId_t *, uint32);
extern uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetItemState(void *, PublishedFileId_t);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetItemInstallInfo(void *, PublishedFileId_t, uint64 *, char *, uint32, uint32 *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetItemDownloadInfo(void *, PublishedFileId_t, uint64 *, uint64 *);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_DownloadItem(void *, PublishedFileId_t, bool);
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_BInitWorkshopForGameServer(void *, DepotId_t, const char *);
extern void cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_SuspendDownloads(void *, bool);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_StartPlaytimeTracking(void *, PublishedFileId_t *, uint32);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_StopPlaytimeTracking(void *, PublishedFileId_t *, uint32);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_StopPlaytimeTrackingForAllItems(void *);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddDependency(void *, PublishedFileId_t, PublishedFileId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveDependency(void *, PublishedFileId_t, PublishedFileId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_AddAppDependency(void *, PublishedFileId_t, AppId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_RemoveAppDependency(void *, PublishedFileId_t, AppId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_GetAppDependencies(void *, PublishedFileId_t);
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION012_DeleteItem(void *, PublishedFileId_t);
#ifdef __cplusplus
}
#endif

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION011.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION011_RequestCurrentStats(void *linux_side)
{
return ((ISteamUserStats*)linux_side)->RequestCurrentStats();
@ -159,9 +159,9 @@ SteamAPICall_t cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION011_DownloadLe
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION011_GetDownloadedLeaderboardEntry(void *linux_side, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t * pLeaderboardEntry, int32 * pDetails, int cDetailsMax)
{
LeaderboardEntry_t lin_pLeaderboardEntry;
win_to_lin_struct_LeaderboardEntry_t_142(pLeaderboardEntry, &lin_pLeaderboardEntry);
win_to_lin_struct_LeaderboardEntry_t_143(pLeaderboardEntry, &lin_pLeaderboardEntry);
bool retval = ((ISteamUserStats*)linux_side)->GetDownloadedLeaderboardEntry((SteamLeaderboardEntries_t)hSteamLeaderboardEntries, (int)index, &lin_pLeaderboardEntry, (int32 *)pDetails, (int)cDetailsMax);
lin_to_win_struct_LeaderboardEntry_t_142(&lin_pLeaderboardEntry, pLeaderboardEntry);
lin_to_win_struct_LeaderboardEntry_t_143(&lin_pLeaderboardEntry, pLeaderboardEntry);
return retval;
}

View file

@ -0,0 +1,161 @@
#include "steam_defs.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamUser_SteamUser020.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_143.h"
HSteamUser cppISteamUser_SteamUser020_GetHSteamUser(void *linux_side)
{
return ((ISteamUser*)linux_side)->GetHSteamUser();
}
bool cppISteamUser_SteamUser020_BLoggedOn(void *linux_side)
{
return ((ISteamUser*)linux_side)->BLoggedOn();
}
CSteamID cppISteamUser_SteamUser020_GetSteamID(void *linux_side)
{
return ((ISteamUser*)linux_side)->GetSteamID();
}
int cppISteamUser_SteamUser020_InitiateGameConnection(void *linux_side, void * pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure)
{
return ((ISteamUser*)linux_side)->InitiateGameConnection((void *)pAuthBlob, (int)cbMaxAuthBlob, (CSteamID)steamIDGameServer, (uint32)unIPServer, (uint16)usPortServer, (bool)bSecure);
}
void cppISteamUser_SteamUser020_TerminateGameConnection(void *linux_side, uint32 unIPServer, uint16 usPortServer)
{
((ISteamUser*)linux_side)->TerminateGameConnection((uint32)unIPServer, (uint16)usPortServer);
}
void cppISteamUser_SteamUser020_TrackAppUsageEvent(void *linux_side, CGameID gameID, int eAppUsageEvent, const char * pchExtraInfo)
{
((ISteamUser*)linux_side)->TrackAppUsageEvent((CGameID)gameID, (int)eAppUsageEvent, (const char *)pchExtraInfo);
}
bool cppISteamUser_SteamUser020_GetUserDataFolder(void *linux_side, char * pchBuffer, int cubBuffer)
{
return ((ISteamUser*)linux_side)->GetUserDataFolder((char *)pchBuffer, (int)cubBuffer);
}
void cppISteamUser_SteamUser020_StartVoiceRecording(void *linux_side)
{
((ISteamUser*)linux_side)->StartVoiceRecording();
}
void cppISteamUser_SteamUser020_StopVoiceRecording(void *linux_side)
{
((ISteamUser*)linux_side)->StopVoiceRecording();
}
EVoiceResult cppISteamUser_SteamUser020_GetAvailableVoice(void *linux_side, uint32 * pcbCompressed, uint32 * pcbUncompressed_Deprecated, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated)
{
return ((ISteamUser*)linux_side)->GetAvailableVoice((uint32 *)pcbCompressed, (uint32 *)pcbUncompressed_Deprecated, (uint32)nUncompressedVoiceDesiredSampleRate_Deprecated);
}
EVoiceResult cppISteamUser_SteamUser020_GetVoice(void *linux_side, bool bWantCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, bool bWantUncompressed_Deprecated, void * pUncompressedDestBuffer_Deprecated, uint32 cbUncompressedDestBufferSize_Deprecated, uint32 * nUncompressBytesWritten_Deprecated, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated)
{
return ((ISteamUser*)linux_side)->GetVoice((bool)bWantCompressed, (void *)pDestBuffer, (uint32)cbDestBufferSize, (uint32 *)nBytesWritten, (bool)bWantUncompressed_Deprecated, (void *)pUncompressedDestBuffer_Deprecated, (uint32)cbUncompressedDestBufferSize_Deprecated, (uint32 *)nUncompressBytesWritten_Deprecated, (uint32)nUncompressedVoiceDesiredSampleRate_Deprecated);
}
EVoiceResult cppISteamUser_SteamUser020_DecompressVoice(void *linux_side, const void * pCompressed, uint32 cbCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, uint32 nDesiredSampleRate)
{
return ((ISteamUser*)linux_side)->DecompressVoice((const void *)pCompressed, (uint32)cbCompressed, (void *)pDestBuffer, (uint32)cbDestBufferSize, (uint32 *)nBytesWritten, (uint32)nDesiredSampleRate);
}
uint32 cppISteamUser_SteamUser020_GetVoiceOptimalSampleRate(void *linux_side)
{
return ((ISteamUser*)linux_side)->GetVoiceOptimalSampleRate();
}
HAuthTicket cppISteamUser_SteamUser020_GetAuthSessionTicket(void *linux_side, void * pTicket, int cbMaxTicket, uint32 * pcbTicket)
{
return ((ISteamUser*)linux_side)->GetAuthSessionTicket((void *)pTicket, (int)cbMaxTicket, (uint32 *)pcbTicket);
}
EBeginAuthSessionResult cppISteamUser_SteamUser020_BeginAuthSession(void *linux_side, const void * pAuthTicket, int cbAuthTicket, CSteamID steamID)
{
return ((ISteamUser*)linux_side)->BeginAuthSession((const void *)pAuthTicket, (int)cbAuthTicket, (CSteamID)steamID);
}
void cppISteamUser_SteamUser020_EndAuthSession(void *linux_side, CSteamID steamID)
{
((ISteamUser*)linux_side)->EndAuthSession((CSteamID)steamID);
}
void cppISteamUser_SteamUser020_CancelAuthTicket(void *linux_side, HAuthTicket hAuthTicket)
{
((ISteamUser*)linux_side)->CancelAuthTicket((HAuthTicket)hAuthTicket);
}
EUserHasLicenseForAppResult cppISteamUser_SteamUser020_UserHasLicenseForApp(void *linux_side, CSteamID steamID, AppId_t appID)
{
return ((ISteamUser*)linux_side)->UserHasLicenseForApp((CSteamID)steamID, (AppId_t)appID);
}
bool cppISteamUser_SteamUser020_BIsBehindNAT(void *linux_side)
{
return ((ISteamUser*)linux_side)->BIsBehindNAT();
}
void cppISteamUser_SteamUser020_AdvertiseGame(void *linux_side, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer)
{
((ISteamUser*)linux_side)->AdvertiseGame((CSteamID)steamIDGameServer, (uint32)unIPServer, (uint16)usPortServer);
}
SteamAPICall_t cppISteamUser_SteamUser020_RequestEncryptedAppTicket(void *linux_side, void * pDataToInclude, int cbDataToInclude)
{
return ((ISteamUser*)linux_side)->RequestEncryptedAppTicket((void *)pDataToInclude, (int)cbDataToInclude);
}
bool cppISteamUser_SteamUser020_GetEncryptedAppTicket(void *linux_side, void * pTicket, int cbMaxTicket, uint32 * pcbTicket)
{
return ((ISteamUser*)linux_side)->GetEncryptedAppTicket((void *)pTicket, (int)cbMaxTicket, (uint32 *)pcbTicket);
}
int cppISteamUser_SteamUser020_GetGameBadgeLevel(void *linux_side, int nSeries, bool bFoil)
{
return ((ISteamUser*)linux_side)->GetGameBadgeLevel((int)nSeries, (bool)bFoil);
}
int cppISteamUser_SteamUser020_GetPlayerSteamLevel(void *linux_side)
{
return ((ISteamUser*)linux_side)->GetPlayerSteamLevel();
}
SteamAPICall_t cppISteamUser_SteamUser020_RequestStoreAuthURL(void *linux_side, const char * pchRedirectURL)
{
return ((ISteamUser*)linux_side)->RequestStoreAuthURL((const char *)pchRedirectURL);
}
bool cppISteamUser_SteamUser020_BIsPhoneVerified(void *linux_side)
{
return ((ISteamUser*)linux_side)->BIsPhoneVerified();
}
bool cppISteamUser_SteamUser020_BIsTwoFactorEnabled(void *linux_side)
{
return ((ISteamUser*)linux_side)->BIsTwoFactorEnabled();
}
bool cppISteamUser_SteamUser020_BIsPhoneIdentifying(void *linux_side)
{
return ((ISteamUser*)linux_side)->BIsPhoneIdentifying();
}
bool cppISteamUser_SteamUser020_BIsPhoneRequiringVerification(void *linux_side)
{
return ((ISteamUser*)linux_side)->BIsPhoneRequiringVerification();
}
SteamAPICall_t cppISteamUser_SteamUser020_GetMarketEligibility(void *linux_side)
{
return ((ISteamUser*)linux_side)->GetMarketEligibility();
}
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,36 @@
#ifdef __cplusplus
extern "C" {
#endif
extern HSteamUser cppISteamUser_SteamUser020_GetHSteamUser(void *);
extern bool cppISteamUser_SteamUser020_BLoggedOn(void *);
extern CSteamID cppISteamUser_SteamUser020_GetSteamID(void *);
extern int cppISteamUser_SteamUser020_InitiateGameConnection(void *, void *, int, CSteamID, uint32, uint16, bool);
extern void cppISteamUser_SteamUser020_TerminateGameConnection(void *, uint32, uint16);
extern void cppISteamUser_SteamUser020_TrackAppUsageEvent(void *, CGameID, int, const char *);
extern bool cppISteamUser_SteamUser020_GetUserDataFolder(void *, char *, int);
extern void cppISteamUser_SteamUser020_StartVoiceRecording(void *);
extern void cppISteamUser_SteamUser020_StopVoiceRecording(void *);
extern EVoiceResult cppISteamUser_SteamUser020_GetAvailableVoice(void *, uint32 *, uint32 *, uint32);
extern EVoiceResult cppISteamUser_SteamUser020_GetVoice(void *, bool, void *, uint32, uint32 *, bool, void *, uint32, uint32 *, uint32);
extern EVoiceResult cppISteamUser_SteamUser020_DecompressVoice(void *, const void *, uint32, void *, uint32, uint32 *, uint32);
extern uint32 cppISteamUser_SteamUser020_GetVoiceOptimalSampleRate(void *);
extern HAuthTicket cppISteamUser_SteamUser020_GetAuthSessionTicket(void *, void *, int, uint32 *);
extern EBeginAuthSessionResult cppISteamUser_SteamUser020_BeginAuthSession(void *, const void *, int, CSteamID);
extern void cppISteamUser_SteamUser020_EndAuthSession(void *, CSteamID);
extern void cppISteamUser_SteamUser020_CancelAuthTicket(void *, HAuthTicket);
extern EUserHasLicenseForAppResult cppISteamUser_SteamUser020_UserHasLicenseForApp(void *, CSteamID, AppId_t);
extern bool cppISteamUser_SteamUser020_BIsBehindNAT(void *);
extern void cppISteamUser_SteamUser020_AdvertiseGame(void *, CSteamID, uint32, uint16);
extern SteamAPICall_t cppISteamUser_SteamUser020_RequestEncryptedAppTicket(void *, void *, int);
extern bool cppISteamUser_SteamUser020_GetEncryptedAppTicket(void *, void *, int, uint32 *);
extern int cppISteamUser_SteamUser020_GetGameBadgeLevel(void *, int, bool);
extern int cppISteamUser_SteamUser020_GetPlayerSteamLevel(void *);
extern SteamAPICall_t cppISteamUser_SteamUser020_RequestStoreAuthURL(void *, const char *);
extern bool cppISteamUser_SteamUser020_BIsPhoneVerified(void *);
extern bool cppISteamUser_SteamUser020_BIsTwoFactorEnabled(void *);
extern bool cppISteamUser_SteamUser020_BIsPhoneIdentifying(void *);
extern bool cppISteamUser_SteamUser020_BIsPhoneRequiringVerification(void *);
extern SteamAPICall_t cppISteamUser_SteamUser020_GetMarketEligibility(void *);
#ifdef __cplusplus
}
#endif

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamUtils_SteamUtils009.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
uint32 cppISteamUtils_SteamUtils009_GetSecondsSinceAppActive(void *linux_side)
{
return ((ISteamUtils*)linux_side)->GetSecondsSinceAppActive();

View file

@ -1,11 +1,11 @@
#include "steam_defs.h"
#include "steamworks_sdk_142/steam_api.h"
#include "steamworks_sdk_143/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamVideo_STEAMVIDEO_INTERFACE_V002.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_142.h"
#include "struct_converters_143.h"
void cppISteamVideo_STEAMVIDEO_INTERFACE_V002_GetVideoURL(void *linux_side, AppId_t unVideoAppID)
{
((ISteamVideo*)linux_side)->GetVideoURL((AppId_t)unVideoAppID);

View file

@ -13,6 +13,7 @@ import re
import math
sdk_versions = [
"143",
"142",
"141",
"140",

View file

@ -1,6 +1,7 @@
#include <stdint.h>
#include <linux/limits.h>
typedef uint32_t EHTMLMouseButton, EHTMLKeyModifiers;
#define nullptr (void*)0
#ifndef __cplusplus
#ifndef bool
@ -66,7 +67,10 @@ typedef uint32_t EUserUGCList,
AudioPlayback_Status,
ESteamUserStatType,
EConfigSubTree,
ELogonState
ELogonState,
EXboxOrigin,
EInputSourceMode,
EActivateGameOverlayToWebPageMode
;
/* these are PODs, so just copy the data. hopefully the
@ -78,6 +82,50 @@ typedef struct ControllerAnalogActionData_t { unsigned char a[13]; } ControllerA
typedef struct ControllerDigitalActionData_t { unsigned char a[2]; } ControllerDigitalActionData_t;
typedef struct ControllerMotionData_t { unsigned char a[40]; } ControllerMotionData_t;
#pragma pack( push, 1 )
typedef 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;
} InputAnalogActionData_t;
typedef 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;
} InputDigitalActionData_t;
typedef 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;
} InputMotionData_t;
#pragma pack( pop )
/* never dereferenced */
typedef struct FriendGameInfo_t FriendGameInfo_t;
typedef struct P2PSessionState_t P2PSessionState_t;

View file

@ -31,6 +31,9 @@ typedef struct __winISteamVideo winISteamVideo;
typedef struct __winISteamMasterServerUpdater winISteamMasterServerUpdater;
typedef struct __winISteamContentServer winISteamContentServer;
typedef struct __winISteamParentalSettings winISteamParentalSettings;
typedef struct __winISteamGameSearch winISteamGameSearch;
typedef struct __winISteamInput winISteamInput;
typedef struct __winISteamParties winISteamParties;
typedef struct __winX winX;
void *create_win_interface(const char *name, void *linux_side);

View file

@ -0,0 +1,67 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to app data in Steam
//
//=============================================================================
#ifndef ISTEAMAPPLIST_H
#define ISTEAMAPPLIST_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
#include "steamtypes.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.
//-----------------------------------------------------------------------------
class ISteamAppList
{
public:
virtual uint32 GetNumInstalledApps() = 0;
virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0;
virtual int GetAppName( AppId_t nAppID, STEAM_OUT_STRING() 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
};
#define STEAMAPPLIST_INTERFACE_VERSION "STEAMAPPLIST_INTERFACE_VERSION001"
// Global interface accessor
inline ISteamAppList *SteamAppList();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIST_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//---------------------------------------------------------------------------------
// Purpose: Sent when a new app is installed
//---------------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 );
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_END(1)
//---------------------------------------------------------------------------------
// Purpose: Sent when an app is uninstalled
//---------------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 );
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_END(1)
#pragma pack( pop )
#endif // ISTEAMAPPLIST_H

View file

@ -0,0 +1,202 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to app data in Steam
//
//=============================================================================
#ifndef ISTEAMAPPS_H
#define ISTEAMAPPS_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
const int k_cubAppProofOfPurchaseKeyMax = 240; // max supported length of a legacy cd key
//-----------------------------------------------------------------------------
// Purpose: interface to app data
//-----------------------------------------------------------------------------
class ISteamApps
{
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/<appid>//?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.
// 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;
STEAM_CALL_RESULT( FileDetailsResult_t )
virtual SteamAPICall_t GetFileDetails( const char* pszFileName ) = 0;
// Get command line if game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/.
// 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;
};
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"
// Global interface accessor
inline ISteamApps *SteamApps();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamApps *, SteamApps, STEAMAPPS_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamApps *SteamGameServerApps();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamApps *, SteamGameServerApps, STEAMAPPS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// 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
};
//-----------------------------------------------------------------------------
// Purpose: possible results when registering an activation code
//-----------------------------------------------------------------------------
enum ERegisterActivationCodeResult
{
k_ERegisterActivationCodeResultOK = 0,
k_ERegisterActivationCodeResultFail = 1,
k_ERegisterActivationCodeResultAlreadyRegistered = 2,
k_ERegisterActivationCodeResultTimeout = 3,
k_ERegisterActivationCodeAlreadyOwned = 4,
};
//-----------------------------------------------------------------------------
// Purpose: response to RegisterActivationCode()
//-----------------------------------------------------------------------------
struct RegisterActivationCodeResponse_t
{
enum { k_iCallback = k_iSteamAppsCallbacks + 8 };
ERegisterActivationCodeResult m_eResult;
uint32 m_unPackageRegistered; // package that was registered. Only set on success
};
//---------------------------------------------------------------------------------
// Purpose: posted after the user gains executes a Steam URL with command line or query parameters
// such as steam://run/<appid>//-commandline/?param1=value1&param2=value2&param3=value3 etc
// while the game is already running. The new params can be queried
// with GetLaunchQueryParam and GetLaunchCommandLine
//---------------------------------------------------------------------------------
struct NewUrlLaunchParameters_t
{
enum { k_iCallback = k_iSteamAppsCallbacks + 14 };
};
//-----------------------------------------------------------------------------
// Purpose: response to RequestAppProofOfPurchaseKey/RequestAllProofOfPurchaseKeys
// for supporting third-party CD keys, or other proof-of-purchase systems.
//-----------------------------------------------------------------------------
struct AppProofOfPurchaseKeyResponse_t
{
enum { k_iCallback = k_iSteamAppsCallbacks + 21 };
EResult m_eResult;
uint32 m_nAppID;
uint32 m_cchKeyLength;
char m_rgchKey[k_cubAppProofOfPurchaseKeyMax];
};
//-----------------------------------------------------------------------------
// Purpose: response to GetFileDetails
//-----------------------------------------------------------------------------
struct FileDetailsResult_t
{
enum { k_iCallback = k_iSteamAppsCallbacks + 23 };
EResult m_eResult;
uint64 m_ulFileSize; // original file size in bytes
uint8 m_FileSHA[20]; // original file SHA1 hash
uint32 m_unFlags; //
};
#pragma pack( pop )
#endif // ISTEAMAPPS_H

View file

@ -0,0 +1,29 @@
//====== Copyright 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: a private, but well versioned, interface to get at critical bits
// of a steam3 appticket - consumed by the simple drm wrapper to let it
// ask about ownership with greater confidence.
//
//=============================================================================
#ifndef ISTEAMAPPTICKET_H
#define ISTEAMAPPTICKET_H
#include "steamtypes.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
//-----------------------------------------------------------------------------
class ISteamAppTicket
{
public:
virtual uint32 GetAppOwnershipTicketData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength, uint32 *piAppId, uint32 *piSteamId, uint32 *piSignature, uint32 *pcbSignature ) = 0;
};
#define STEAMAPPTICKET_INTERFACE_VERSION "STEAMAPPTICKET_INTERFACE_VERSION001"
#endif // ISTEAMAPPTICKET_H

View file

@ -0,0 +1,174 @@
//====== 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.
//=============================================================================
#ifndef ISTEAMCLIENT_H
#define ISTEAMCLIENT_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.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 ISteamClient
{
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 ISteamGameSearch *GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead.
STEAM_PRIVATE_API( 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.
STEAM_PRIVATE_API( 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
STEAM_PRIVATE_API( virtual void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
STEAM_PRIVATE_API( virtual void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
STEAM_PRIVATE_API( 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 ISteamParentalSettings *GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Exposes the Steam Input interface for controller support
virtual ISteamInput *GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Steam Parties interface
virtual ISteamParties *GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
};
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient018"
#ifndef STEAM_API_EXPORTS
// Global ISteamClient interface accessor
inline ISteamClient *SteamClient();
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamClient *, SteamClient, SteamInternal_CreateInterface( STEAMCLIENT_INTERFACE_VERSION ) );
// The internal ISteamClient used for the gameserver interface.
// (This is actually the same thing. You really shouldn't need to access any of this stuff directly.)
inline ISteamClient *SteamGameServerClient() { return SteamClient(); }
#endif
#endif // ISTEAMCLIENT_H

View file

@ -0,0 +1,605 @@
//====== Copyright 1996-2018, Valve Corporation, All rights reserved. =======
// Note: The older ISteamController interface has been deprecated in favor of ISteamInput - this interface
// was updated in this SDK but will be removed from future SDK's. The Steam Client will retain
// compatibility with the older interfaces so your any existing integrations should be unaffected.
//
// 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 ISTEAMCONTROLLER_H
#define ISTEAMCONTROLLER_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
#include "isteaminput.h"
#define STEAM_CONTROLLER_MAX_COUNT 16
#define STEAM_CONTROLLER_MAX_ANALOG_ACTIONS 16
#define STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS 128
#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
#ifndef ISTEAMINPUT_H
enum ESteamControllerPad
{
k_ESteamControllerPad_Left,
k_ESteamControllerPad_Right
};
#endif
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_LeftBumper,
k_EControllerSource_RightBumper,
k_EControllerSource_Gyro,
k_EControllerSource_CenterTrackpad, // PS4
k_EControllerSource_RightJoystick, // Traditional Controllers
k_EControllerSource_DPad, // Traditional Controllers
k_EControllerSource_Key, // Keyboards with scan codes - Unused
k_EControllerSource_Mouse, // Traditional mouse - Unused
k_EControllerSource_LeftGyro, // Secondary Gyro - Switch - Unused
k_EControllerSource_Count
};
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_JoystickMouse,
k_EControllerSourceMode_JoystickCamera,
k_EControllerSourceMode_ScrollWheel,
k_EControllerSourceMode_Trigger,
k_EControllerSourceMode_TouchMenu,
k_EControllerSourceMode_MouseJoystick,
k_EControllerSourceMode_MouseRegion,
k_EControllerSourceMode_RadialMenu,
k_EControllerSourceMode_SingleButton,
k_EControllerSourceMode_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 if you're
// using a lookup table please check the bounds of any origins returned by Steam.
enum EControllerActionOrigin
{
// Steam Controller
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,
// PS4 Dual Shock
k_EControllerActionOrigin_PS4_X,
k_EControllerActionOrigin_PS4_Circle,
k_EControllerActionOrigin_PS4_Triangle,
k_EControllerActionOrigin_PS4_Square,
k_EControllerActionOrigin_PS4_LeftBumper,
k_EControllerActionOrigin_PS4_RightBumper,
k_EControllerActionOrigin_PS4_Options, //Start
k_EControllerActionOrigin_PS4_Share, //Back
k_EControllerActionOrigin_PS4_LeftPad_Touch,
k_EControllerActionOrigin_PS4_LeftPad_Swipe,
k_EControllerActionOrigin_PS4_LeftPad_Click,
k_EControllerActionOrigin_PS4_LeftPad_DPadNorth,
k_EControllerActionOrigin_PS4_LeftPad_DPadSouth,
k_EControllerActionOrigin_PS4_LeftPad_DPadWest,
k_EControllerActionOrigin_PS4_LeftPad_DPadEast,
k_EControllerActionOrigin_PS4_RightPad_Touch,
k_EControllerActionOrigin_PS4_RightPad_Swipe,
k_EControllerActionOrigin_PS4_RightPad_Click,
k_EControllerActionOrigin_PS4_RightPad_DPadNorth,
k_EControllerActionOrigin_PS4_RightPad_DPadSouth,
k_EControllerActionOrigin_PS4_RightPad_DPadWest,
k_EControllerActionOrigin_PS4_RightPad_DPadEast,
k_EControllerActionOrigin_PS4_CenterPad_Touch,
k_EControllerActionOrigin_PS4_CenterPad_Swipe,
k_EControllerActionOrigin_PS4_CenterPad_Click,
k_EControllerActionOrigin_PS4_CenterPad_DPadNorth,
k_EControllerActionOrigin_PS4_CenterPad_DPadSouth,
k_EControllerActionOrigin_PS4_CenterPad_DPadWest,
k_EControllerActionOrigin_PS4_CenterPad_DPadEast,
k_EControllerActionOrigin_PS4_LeftTrigger_Pull,
k_EControllerActionOrigin_PS4_LeftTrigger_Click,
k_EControllerActionOrigin_PS4_RightTrigger_Pull,
k_EControllerActionOrigin_PS4_RightTrigger_Click,
k_EControllerActionOrigin_PS4_LeftStick_Move,
k_EControllerActionOrigin_PS4_LeftStick_Click,
k_EControllerActionOrigin_PS4_LeftStick_DPadNorth,
k_EControllerActionOrigin_PS4_LeftStick_DPadSouth,
k_EControllerActionOrigin_PS4_LeftStick_DPadWest,
k_EControllerActionOrigin_PS4_LeftStick_DPadEast,
k_EControllerActionOrigin_PS4_RightStick_Move,
k_EControllerActionOrigin_PS4_RightStick_Click,
k_EControllerActionOrigin_PS4_RightStick_DPadNorth,
k_EControllerActionOrigin_PS4_RightStick_DPadSouth,
k_EControllerActionOrigin_PS4_RightStick_DPadWest,
k_EControllerActionOrigin_PS4_RightStick_DPadEast,
k_EControllerActionOrigin_PS4_DPad_North,
k_EControllerActionOrigin_PS4_DPad_South,
k_EControllerActionOrigin_PS4_DPad_West,
k_EControllerActionOrigin_PS4_DPad_East,
k_EControllerActionOrigin_PS4_Gyro_Move,
k_EControllerActionOrigin_PS4_Gyro_Pitch,
k_EControllerActionOrigin_PS4_Gyro_Yaw,
k_EControllerActionOrigin_PS4_Gyro_Roll,
// XBox One
k_EControllerActionOrigin_XBoxOne_A,
k_EControllerActionOrigin_XBoxOne_B,
k_EControllerActionOrigin_XBoxOne_X,
k_EControllerActionOrigin_XBoxOne_Y,
k_EControllerActionOrigin_XBoxOne_LeftBumper,
k_EControllerActionOrigin_XBoxOne_RightBumper,
k_EControllerActionOrigin_XBoxOne_Menu, //Start
k_EControllerActionOrigin_XBoxOne_View, //Back
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Pull,
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Click,
k_EControllerActionOrigin_XBoxOne_RightTrigger_Pull,
k_EControllerActionOrigin_XBoxOne_RightTrigger_Click,
k_EControllerActionOrigin_XBoxOne_LeftStick_Move,
k_EControllerActionOrigin_XBoxOne_LeftStick_Click,
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadNorth,
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadSouth,
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadWest,
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadEast,
k_EControllerActionOrigin_XBoxOne_RightStick_Move,
k_EControllerActionOrigin_XBoxOne_RightStick_Click,
k_EControllerActionOrigin_XBoxOne_RightStick_DPadNorth,
k_EControllerActionOrigin_XBoxOne_RightStick_DPadSouth,
k_EControllerActionOrigin_XBoxOne_RightStick_DPadWest,
k_EControllerActionOrigin_XBoxOne_RightStick_DPadEast,
k_EControllerActionOrigin_XBoxOne_DPad_North,
k_EControllerActionOrigin_XBoxOne_DPad_South,
k_EControllerActionOrigin_XBoxOne_DPad_West,
k_EControllerActionOrigin_XBoxOne_DPad_East,
// XBox 360
k_EControllerActionOrigin_XBox360_A,
k_EControllerActionOrigin_XBox360_B,
k_EControllerActionOrigin_XBox360_X,
k_EControllerActionOrigin_XBox360_Y,
k_EControllerActionOrigin_XBox360_LeftBumper,
k_EControllerActionOrigin_XBox360_RightBumper,
k_EControllerActionOrigin_XBox360_Start, //Start
k_EControllerActionOrigin_XBox360_Back, //Back
k_EControllerActionOrigin_XBox360_LeftTrigger_Pull,
k_EControllerActionOrigin_XBox360_LeftTrigger_Click,
k_EControllerActionOrigin_XBox360_RightTrigger_Pull,
k_EControllerActionOrigin_XBox360_RightTrigger_Click,
k_EControllerActionOrigin_XBox360_LeftStick_Move,
k_EControllerActionOrigin_XBox360_LeftStick_Click,
k_EControllerActionOrigin_XBox360_LeftStick_DPadNorth,
k_EControllerActionOrigin_XBox360_LeftStick_DPadSouth,
k_EControllerActionOrigin_XBox360_LeftStick_DPadWest,
k_EControllerActionOrigin_XBox360_LeftStick_DPadEast,
k_EControllerActionOrigin_XBox360_RightStick_Move,
k_EControllerActionOrigin_XBox360_RightStick_Click,
k_EControllerActionOrigin_XBox360_RightStick_DPadNorth,
k_EControllerActionOrigin_XBox360_RightStick_DPadSouth,
k_EControllerActionOrigin_XBox360_RightStick_DPadWest,
k_EControllerActionOrigin_XBox360_RightStick_DPadEast,
k_EControllerActionOrigin_XBox360_DPad_North,
k_EControllerActionOrigin_XBox360_DPad_South,
k_EControllerActionOrigin_XBox360_DPad_West,
k_EControllerActionOrigin_XBox360_DPad_East,
// SteamController V2
k_EControllerActionOrigin_SteamV2_A,
k_EControllerActionOrigin_SteamV2_B,
k_EControllerActionOrigin_SteamV2_X,
k_EControllerActionOrigin_SteamV2_Y,
k_EControllerActionOrigin_SteamV2_LeftBumper,
k_EControllerActionOrigin_SteamV2_RightBumper,
k_EControllerActionOrigin_SteamV2_LeftGrip_Lower,
k_EControllerActionOrigin_SteamV2_LeftGrip_Upper,
k_EControllerActionOrigin_SteamV2_RightGrip_Lower,
k_EControllerActionOrigin_SteamV2_RightGrip_Upper,
k_EControllerActionOrigin_SteamV2_LeftBumper_Pressure,
k_EControllerActionOrigin_SteamV2_RightBumper_Pressure,
k_EControllerActionOrigin_SteamV2_LeftGrip_Pressure,
k_EControllerActionOrigin_SteamV2_RightGrip_Pressure,
k_EControllerActionOrigin_SteamV2_LeftGrip_Upper_Pressure,
k_EControllerActionOrigin_SteamV2_RightGrip_Upper_Pressure,
k_EControllerActionOrigin_SteamV2_Start,
k_EControllerActionOrigin_SteamV2_Back,
k_EControllerActionOrigin_SteamV2_LeftPad_Touch,
k_EControllerActionOrigin_SteamV2_LeftPad_Swipe,
k_EControllerActionOrigin_SteamV2_LeftPad_Click,
k_EControllerActionOrigin_SteamV2_LeftPad_Pressure,
k_EControllerActionOrigin_SteamV2_LeftPad_DPadNorth,
k_EControllerActionOrigin_SteamV2_LeftPad_DPadSouth,
k_EControllerActionOrigin_SteamV2_LeftPad_DPadWest,
k_EControllerActionOrigin_SteamV2_LeftPad_DPadEast,
k_EControllerActionOrigin_SteamV2_RightPad_Touch,
k_EControllerActionOrigin_SteamV2_RightPad_Swipe,
k_EControllerActionOrigin_SteamV2_RightPad_Click,
k_EControllerActionOrigin_SteamV2_RightPad_Pressure,
k_EControllerActionOrigin_SteamV2_RightPad_DPadNorth,
k_EControllerActionOrigin_SteamV2_RightPad_DPadSouth,
k_EControllerActionOrigin_SteamV2_RightPad_DPadWest,
k_EControllerActionOrigin_SteamV2_RightPad_DPadEast,
k_EControllerActionOrigin_SteamV2_LeftTrigger_Pull,
k_EControllerActionOrigin_SteamV2_LeftTrigger_Click,
k_EControllerActionOrigin_SteamV2_RightTrigger_Pull,
k_EControllerActionOrigin_SteamV2_RightTrigger_Click,
k_EControllerActionOrigin_SteamV2_LeftStick_Move,
k_EControllerActionOrigin_SteamV2_LeftStick_Click,
k_EControllerActionOrigin_SteamV2_LeftStick_DPadNorth,
k_EControllerActionOrigin_SteamV2_LeftStick_DPadSouth,
k_EControllerActionOrigin_SteamV2_LeftStick_DPadWest,
k_EControllerActionOrigin_SteamV2_LeftStick_DPadEast,
k_EControllerActionOrigin_SteamV2_Gyro_Move,
k_EControllerActionOrigin_SteamV2_Gyro_Pitch,
k_EControllerActionOrigin_SteamV2_Gyro_Yaw,
k_EControllerActionOrigin_SteamV2_Gyro_Roll,
// Switch - Pro or Joycons used as a single input device.
// This does not apply to a single joycon
k_EControllerActionOrigin_Switch_A,
k_EControllerActionOrigin_Switch_B,
k_EControllerActionOrigin_Switch_X,
k_EControllerActionOrigin_Switch_Y,
k_EControllerActionOrigin_Switch_LeftBumper,
k_EControllerActionOrigin_Switch_RightBumper,
k_EControllerActionOrigin_Switch_Plus, //Start
k_EControllerActionOrigin_Switch_Minus, //Back
k_EControllerActionOrigin_Switch_Capture,
k_EControllerActionOrigin_Switch_LeftTrigger_Pull,
k_EControllerActionOrigin_Switch_LeftTrigger_Click,
k_EControllerActionOrigin_Switch_RightTrigger_Pull,
k_EControllerActionOrigin_Switch_RightTrigger_Click,
k_EControllerActionOrigin_Switch_LeftStick_Move,
k_EControllerActionOrigin_Switch_LeftStick_Click,
k_EControllerActionOrigin_Switch_LeftStick_DPadNorth,
k_EControllerActionOrigin_Switch_LeftStick_DPadSouth,
k_EControllerActionOrigin_Switch_LeftStick_DPadWest,
k_EControllerActionOrigin_Switch_LeftStick_DPadEast,
k_EControllerActionOrigin_Switch_RightStick_Move,
k_EControllerActionOrigin_Switch_RightStick_Click,
k_EControllerActionOrigin_Switch_RightStick_DPadNorth,
k_EControllerActionOrigin_Switch_RightStick_DPadSouth,
k_EControllerActionOrigin_Switch_RightStick_DPadWest,
k_EControllerActionOrigin_Switch_RightStick_DPadEast,
k_EControllerActionOrigin_Switch_DPad_North,
k_EControllerActionOrigin_Switch_DPad_South,
k_EControllerActionOrigin_Switch_DPad_West,
k_EControllerActionOrigin_Switch_DPad_East,
k_EControllerActionOrigin_Switch_ProGyro_Move, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Pitch, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Yaw, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Roll, // Primary Gyro in Pro Controller, or Right JoyCon
// Switch JoyCon Specific
k_EControllerActionOrigin_Switch_RightGyro_Move, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Pitch, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Yaw, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Roll, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_LeftGyro_Move,
k_EControllerActionOrigin_Switch_LeftGyro_Pitch,
k_EControllerActionOrigin_Switch_LeftGyro_Yaw,
k_EControllerActionOrigin_Switch_LeftGyro_Roll,
k_EControllerActionOrigin_Switch_LeftGrip_Lower, // Left JoyCon SR Button
k_EControllerActionOrigin_Switch_LeftGrip_Upper, // Left JoyCon SL Button
k_EControllerActionOrigin_Switch_RightGrip_Lower, // Right JoyCon SL Button
k_EControllerActionOrigin_Switch_RightGrip_Upper, // Right JoyCon SR Button
k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
};
#ifndef ISTEAMINPUT_H
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,
};
#endif
enum ESteamControllerLEDFlag
{
k_ESteamControllerLEDFlag_SetColor,
k_ESteamControllerLEDFlag_RestoreUserDefault
};
// 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;
#pragma pack( push, 1 )
#ifdef ISTEAMINPUT_H
#define ControllerAnalogActionData_t InputAnalogActionData_t
#define ControllerDigitalActionData_t InputDigitalActionData_t
#define ControllerMotionData_t InputMotionData_t
#else
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;
};
#endif
#pragma pack( pop )
//-----------------------------------------------------------------------------
// Purpose: Steam Input API
//-----------------------------------------------------------------------------
class ISteamController
{
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;
};
#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController007"
// Global interface accessor
inline ISteamController *SteamController();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamController *, SteamController, STEAMCONTROLLER_INTERFACE_VERSION );
#endif // ISTEAMCONTROLLER_H

View file

@ -0,0 +1,675 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Purpose: interface to both friends list data and general information about users
//
//=============================================================================
#ifndef ISTEAMFRIENDS_H
#define ISTEAMFRIENDS_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
// 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_DEPRECATED = 7, // was used by the original implementation of the facebook linking feature, but now unused.
// keep this updated
k_EFriendRelationshipMax = 8,
};
// 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;
// friends group identifier type
typedef int16 FriendsGroupID_t;
// invalid friends group identifier constant
const FriendsGroupID_t k_FriendsGroupID_Invalid = -1;
const int k_cEnumerateFollowersMax = 50;
//-----------------------------------------------------------------------------
// 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_EPersonaStateInvisible = 7, // Online, but appears offline to friends. This status is never published to clients.
k_EPersonaStateMax,
};
//-----------------------------------------------------------------------------
// 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, // not used
k_EFriendFlagChatMember = 0x1000,
k_EFriendFlagAll = 0xFFFF,
};
// friend game played information
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct FriendGameInfo_t
{
CGameID m_gameID;
uint32 m_unGameIP;
uint16 m_usGamePort;
uint16 m_usQueryPort;
CSteamID m_steamIDLobby;
};
#pragma pack( pop )
// 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,
};
//-----------------------------------------------------------------------------
// 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)
};
//-----------------------------------------------------------------------------
// Purpose: information about user sessions
//-----------------------------------------------------------------------------
struct FriendSessionStateInfo_t
{
uint32 m_uiOnlineSessionInstances;
uint8 m_uiPublishedToFriendsSessionInstance;
};
// size limit on chat room or member metadata
const uint32 k_cubChatMetadataMax = 8192;
// size limits on Rich Presence data
enum { k_cchMaxRichPresenceKeys = 30 };
enum { k_cchMaxRichPresenceKeyLength = 64 };
enum { k_cchMaxRichPresenceValueLength = 256 };
// These values are passed as parameters to the store
enum EOverlayToStoreFlag
{
k_EOverlayToStoreFlag_None = 0,
k_EOverlayToStoreFlag_AddToCart = 1,
k_EOverlayToStoreFlag_AddToCartAndShow = 2,
};
//-----------------------------------------------------------------------------
// Purpose: Tells Steam where to place the browser window inside the overlay
//-----------------------------------------------------------------------------
enum EActivateGameOverlayToWebPageMode
{
k_EActivateGameOverlayToWebPageMode_Default = 0, // Browser will open next to all other windows that the user has open in the overlay.
// The window will remain open, even if the user closes then re-opens the overlay.
k_EActivateGameOverlayToWebPageMode_Modal = 1 // Browser will be opened in a special overlay configuration which hides all other windows
// that the user has open in the overlay. When the user closes the overlay, the browser window
// will also close. When the user closes the browser window, the overlay will automatically close.
};
//-----------------------------------------------------------------------------
// 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 ISteamFriends
{
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, STEAM_OUT_STRUCT() 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, STEAM_OUT_ARRAY_CALL(nMembersCount, GetFriendsGroupMembersCount, 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( STEAM_ARRAY_COUNT(cClansToRequest) 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, EActivateGameOverlayToWebPageMode eMode = k_EActivateGameOverlayToWebPageMode_Default ) = 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, STEAM_OUT_STRUCT() 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;
};
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017"
// Global interface accessor
inline ISteamFriends *SteamFriends();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamFriends *, SteamFriends, STEAMFRIENDS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: called when a friends' status changes
//-----------------------------------------------------------------------------
struct PersonaStateChange_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 4 };
uint64 m_ulSteamID; // steamID of the friend who changed
int m_nChangeFlags; // what's changed
};
// 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_EPersonaChangeBroadcast = 0x0800,
k_EPersonaChangeNickname = 0x1000,
k_EPersonaChangeSteamLevel = 0x2000,
k_EPersonaChangeRichPresence = 0x4000,
};
//-----------------------------------------------------------------------------
// 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;
int m_nCount;
};
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_rgSteamID[ k_cEnumerateFollowersMax ];
int32 m_nResultsReturned;
int32 m_nTotalResultCount;
};
//-----------------------------------------------------------------------------
// Purpose: reports the result of an attempt to change the user's persona name
//-----------------------------------------------------------------------------
struct SetPersonaNameResponse_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 47 };
bool m_bSuccess; // true if name change succeeded completely.
bool m_bLocalSuccess; // true if name change was retained locally. (We might not have been able to communicate with Steam)
EResult m_result; // detailed result code
};
//-----------------------------------------------------------------------------
// Purpose: Invoked when the status of unread messages changes
//-----------------------------------------------------------------------------
struct UnreadChatMessagesChanged_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 48 };
};
#pragma pack( pop )
#endif // ISTEAMFRIENDS_H

View file

@ -0,0 +1,74 @@
//====== Copyright ©, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to the game coordinator for this application
//
//=============================================================================
#ifndef ISTEAMGAMECOORDINATOR
#define ISTEAMGAMECOORDINATOR
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
// 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
};
//-----------------------------------------------------------------------------
// Purpose: Functions for sending and receiving messages from the Game Coordinator
// for this application
//-----------------------------------------------------------------------------
class ISteamGameCoordinator
{
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;
};
#define STEAMGAMECOORDINATOR_INTERFACE_VERSION "SteamGameCoordinator001"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
// 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 )
#endif // ISTEAMGAMECOORDINATOR

View file

@ -0,0 +1,391 @@
//====== Copyright (c) 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam for game servers
//
//=============================================================================
#ifndef ISTEAMGAMESERVER_H
#define ISTEAMGAMESERVER_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1)
//-----------------------------------------------------------------------------
// Purpose: Functions for authenticating users via Steam to play on a game server
//-----------------------------------------------------------------------------
class ISteamGameServer
{
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 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 SendUserConnectAndAuthenticate, 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;
// 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;
// these two functions s are deprecated, and will not return results
// they will be removed in a future version of the SDK
virtual void GetGameplayStats( ) = 0;
STEAM_CALL_RESULT( GSReputation_t )
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
STEAM_CALL_RESULT( AssociateWithClanResult_t )
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
STEAM_CALL_RESULT( ComputeNewPlayerCompatibilityResult_t )
virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0;
};
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer012"
// Global accessor
inline ISteamGameServer *SteamGameServer();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServer *, SteamGameServer, STEAMGAMESERVER_INTERFACE_VERSION );
// 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)
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
// 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_rgchOptionalText[128];
};
// request the game server should kick the user
struct GSClientKick_t
{
enum { k_iCallback = k_iSteamGameServerCallbacks + 3 };
CSteamID m_SteamID;
EDenyReason m_eDenyReason;
};
// NOTE: callback values 4 and 5 are skipped because they are used for old deprecated callbacks,
// do not reuse them here.
// client achievement info
struct GSClientAchievementStatus_t
{
enum { k_iCallback = k_iSteamGameServerCallbacks + 6 };
uint64 m_SteamID;
char m_pchAchievement[128];
bool m_bUnlocked;
};
// 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;
};
// 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;
};
#pragma pack( pop )
#endif // ISTEAMGAMESERVER_H

View file

@ -0,0 +1,105 @@
//====== Copyright © Valve Corporation, All rights reserved. =======
//
// Purpose: interface for game servers to steam stats and achievements
//
//=============================================================================
#ifndef ISTEAMGAMESERVERSTATS_H
#define ISTEAMGAMESERVERSTATS_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
// Purpose: Functions for authenticating users via Steam to play on a game server
//-----------------------------------------------------------------------------
class ISteamGameServerStats
{
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
STEAM_CALL_RESULT( GSStatsReceived_t )
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.
STEAM_CALL_RESULT( GSStatsStored_t )
virtual SteamAPICall_t StoreUserStats( CSteamID steamIDUser ) = 0;
};
#define STEAMGAMESERVERSTATS_INTERFACE_VERSION "SteamGameServerStats001"
// Global accessor
inline ISteamGameServerStats *SteamGameServerStats();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServerStats *, SteamGameServerStats, STEAMGAMESERVERSTATS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// 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 // ISTEAMGAMESERVERSTATS_H

View file

@ -0,0 +1,480 @@
//====== Copyright 1996-2013, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to display html pages in a texture
//
//=============================================================================
#ifndef ISTEAMHTMLSURFACE_H
#define ISTEAMHTMLSURFACE_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
typedef uint32 HHTMLBrowser;
const uint32 INVALID_HTMLBROWSER = 0;
//-----------------------------------------------------------------------------
// Purpose: Functions for displaying HTML pages and interacting with them
//-----------------------------------------------------------------------------
class ISteamHTMLSurface
{
public:
virtual ~ISteamHTMLSurface() {}
// 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.
//
STEAM_CALL_RESULT( HTML_BrowserReady_t )
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
STEAM_IGNOREATTR()
virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
};
#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_005"
// Global interface accessor
inline ISteamHTMLSurface *SteamHTMLSurface();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTMLSurface *, SteamHTMLSurface, STEAMHTMLSURFACE_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: The browser is ready for use
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages
STEAM_CALLBACK_END(1)
//-----------------------------------------------------------------------------
// Purpose: the browser has a pending paint
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN(HTML_NeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 2)
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint
STEAM_CALLBACK_MEMBER(1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called
STEAM_CALLBACK_MEMBER(2, uint32, unWide) // the total width of the pBGRA texture
STEAM_CALLBACK_MEMBER(3, uint32, unTall) // the total height of the pBGRA texture
STEAM_CALLBACK_MEMBER(4, uint32, unUpdateX) // the offset in X for the damage rect for this update
STEAM_CALLBACK_MEMBER(5, uint32, unUpdateY) // the offset in Y for the damage rect for this update
STEAM_CALLBACK_MEMBER(6, uint32, unUpdateWide) // the width of the damage rect for this update
STEAM_CALLBACK_MEMBER(7, uint32, unUpdateTall) // the height of the damage rect for this update
STEAM_CALLBACK_MEMBER(8, uint32, unScrollX) // the page scroll the browser was at when this texture was rendered
STEAM_CALLBACK_MEMBER(9, uint32, unScrollY) // the page scroll the browser was at when this texture was rendered
STEAM_CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this page when rendered
STEAM_CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages
STEAM_CALLBACK_END(12)
//-----------------------------------------------------------------------------
// Purpose: The browser wanted to navigate to a new page
// NOTE - you MUST call AllowStartRequest in response to this callback
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN(HTML_StartRequest_t, k_iSteamHTMLSurfaceCallbacks + 3)
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface navigating
STEAM_CALLBACK_MEMBER(1, const char *, pchURL) // the url they wish to navigate to
STEAM_CALLBACK_MEMBER(2, const char *, pchTarget) // the html link target type (i.e _blank, _self, _parent, _top )
STEAM_CALLBACK_MEMBER(3, const char *, pchPostData ) // any posted data for the request
STEAM_CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request
STEAM_CALLBACK_END(5)
//-----------------------------------------------------------------------------
// Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call)
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4)
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface
STEAM_CALLBACK_END(1)
//-----------------------------------------------------------------------------
// Purpose: the browser is navigating to a new url
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_URLChanged_t, k_iSteamHTMLSurfaceCallbacks + 5 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface navigating
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // the url they wish to navigate to
STEAM_CALLBACK_MEMBER( 2, const char *, pchPostData ) // any posted data for the request
STEAM_CALLBACK_MEMBER( 3, bool, bIsRedirect ) // true if this was a http/html redirect from the last load request
STEAM_CALLBACK_MEMBER( 4, const char *, pchPageTitle ) // the title of the page
STEAM_CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page
STEAM_CALLBACK_END(6)
//-----------------------------------------------------------------------------
// Purpose: A page is finished loading
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_FinishedRequest_t, k_iSteamHTMLSurfaceCallbacks + 6 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) //
STEAM_CALLBACK_MEMBER( 2, const char *, pchPageTitle ) //
STEAM_CALLBACK_END(3)
//-----------------------------------------------------------------------------
// Purpose: a request to load this url in a new tab
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_OpenLinkInNewTab_t, k_iSteamHTMLSurfaceCallbacks + 7 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) //
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: the page has a new title now
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_ChangedTitle_t, k_iSteamHTMLSurfaceCallbacks + 8 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) //
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: results from a search
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_SearchResults_t, k_iSteamHTMLSurfaceCallbacks + 9 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, unResults ) //
STEAM_CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) //
STEAM_CALLBACK_END(3)
//-----------------------------------------------------------------------------
// Purpose: page history status changed on the ability to go backwards and forward
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_CanGoBackAndForward_t, k_iSteamHTMLSurfaceCallbacks + 10 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, bool, bCanGoBack ) //
STEAM_CALLBACK_MEMBER( 2, bool, bCanGoForward ) //
STEAM_CALLBACK_END(3)
//-----------------------------------------------------------------------------
// Purpose: details on the visibility and size of the horizontal scrollbar
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_HorizontalScroll_t, k_iSteamHTMLSurfaceCallbacks + 11 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, unScrollMax ) //
STEAM_CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) //
STEAM_CALLBACK_MEMBER( 3, float, flPageScale ) //
STEAM_CALLBACK_MEMBER( 4, bool , bVisible ) //
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
STEAM_CALLBACK_END(6)
//-----------------------------------------------------------------------------
// Purpose: details on the visibility and size of the vertical scrollbar
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_VerticalScroll_t, k_iSteamHTMLSurfaceCallbacks + 12 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, unScrollMax ) //
STEAM_CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) //
STEAM_CALLBACK_MEMBER( 3, float, flPageScale ) //
STEAM_CALLBACK_MEMBER( 4, bool, bVisible ) //
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
STEAM_CALLBACK_END(6)
//-----------------------------------------------------------------------------
// Purpose: response to GetLinkAtPosition call
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, x ) // NOTE - Not currently set
STEAM_CALLBACK_MEMBER( 2, uint32, y ) // NOTE - Not currently set
STEAM_CALLBACK_MEMBER( 3, const char *, pchURL ) //
STEAM_CALLBACK_MEMBER( 4, bool, bInput ) //
STEAM_CALLBACK_MEMBER( 5, bool, bLiveLink ) //
STEAM_CALLBACK_END(6)
//-----------------------------------------------------------------------------
// Purpose: show a Javascript alert dialog, call JSDialogResponse
// when the user dismisses this dialog (or right away to ignore it)
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_JSAlert_t, k_iSteamHTMLSurfaceCallbacks + 14 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: show a Javascript confirmation dialog, call JSDialogResponse
// when the user dismisses this dialog (or right away to ignore it)
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_JSConfirm_t, k_iSteamHTMLSurfaceCallbacks + 15 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: when received show a file open dialog
// then call FileLoadDialogResponse with the file(s) the user selected.
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_FileOpenDialog_t, k_iSteamHTMLSurfaceCallbacks + 16 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) //
STEAM_CALLBACK_MEMBER( 2, const char *, pchInitialFile ) //
STEAM_CALLBACK_END(3)
//-----------------------------------------------------------------------------
// Purpose: a new html window is being created.
//
// IMPORTANT NOTE: at this time, the API does not allow you to acknowledge or
// render the contents of this new window, so the new window is always destroyed
// immediately. The URL and other parameters of the new window are passed here
// to give your application the opportunity to call CreateBrowser and set up
// a new browser in response to the attempted popup, if you wish to do so.
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the current surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // the page to load
STEAM_CALLBACK_MEMBER( 2, uint32, unX ) // the x pos into the page to display the popup
STEAM_CALLBACK_MEMBER( 3, uint32, unY ) // the y pos into the page to display the popup
STEAM_CALLBACK_MEMBER( 4, uint32, unWide ) // the total width of the pBGRA texture
STEAM_CALLBACK_MEMBER( 5, uint32, unTall ) // the total height of the pBGRA texture
STEAM_CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle_IGNORE )
STEAM_CALLBACK_END(7)
//-----------------------------------------------------------------------------
// Purpose: change the cursor to display
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: informational message from the browser
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: show a tooltip
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: update the text of an existing tooltip
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
STEAM_CALLBACK_END(2)
//-----------------------------------------------------------------------------
// Purpose: hide the tooltip you are showing
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_END(1)
//-----------------------------------------------------------------------------
// Purpose: The browser has restarted due to an internal failure, use this new handle value
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( HTML_BrowserRestarted_t, k_iSteamHTMLSurfaceCallbacks + 27 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this is the new browser handle after the restart
STEAM_CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls
STEAM_CALLBACK_END(2)
#pragma pack( pop )
#endif // ISTEAMHTMLSURFACE_H

View file

@ -0,0 +1,219 @@
//====== Copyright © 1996-2009, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to http client
//
//=============================================================================
#ifndef ISTEAMHTTP_H
#define ISTEAMHTTP_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
#include "steamhttpenums.h"
// Handle to a HTTP Request handle
typedef uint32 HTTPRequestHandle;
#define INVALID_HTTPREQUEST_HANDLE 0
typedef uint32 HTTPCookieContainerHandle;
#define INVALID_HTTPCOOKIE_HANDLE 0
//-----------------------------------------------------------------------------
// Purpose: interface to http client
//-----------------------------------------------------------------------------
class ISteamHTTP
{
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;
};
#define STEAMHTTP_INTERFACE_VERSION "STEAMHTTP_INTERFACE_VERSION003"
// Global interface accessor
inline ISteamHTTP *SteamHTTP();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamHTTP, STEAMHTTP_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamHTTP *SteamGameServerHTTP();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamGameServerHTTP, STEAMHTTP_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
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;
};
#pragma pack( pop )
#endif // ISTEAMHTTP_H

View file

@ -0,0 +1,619 @@
//====== 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 "steam_api_common.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 ISteamInput
{
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_VERSION "SteamInput001"
// Global interface accessor
inline ISteamInput *SteamInput();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTERFACE_VERSION );
#endif // ISTEAMINPUT_H

View file

@ -0,0 +1,437 @@
//====== Copyright © 1996-2014 Valve Corporation, All rights reserved. =======
//
// Purpose: interface to Steam Inventory
//
//=============================================================================
#ifndef ISTEAMINVENTORY_H
#define ISTEAMINVENTORY_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
// 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;
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
};
typedef int32 SteamInventoryResult_t;
static const SteamInventoryResult_t k_SteamInventoryResultInvalid = -1;
typedef uint64 SteamInventoryUpdateHandle_t;
const SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xffffffffffffffffull;
//-----------------------------------------------------------------------------
// Purpose: Steam Inventory query and manipulation API
//-----------------------------------------------------------------------------
class ISteamInventory
{
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
STEAM_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.
STEAM_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,
STEAM_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,
STEAM_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.
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, STEAM_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, STEAM_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, STEAM_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, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_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.
STEAM_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, STEAM_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.
STEAM_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,
STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength,
STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_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.
STEAM_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.
STEAM_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,
STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength,
STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_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.
STEAM_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(
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
STEAM_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,
STEAM_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.
STEAM_CALL_RESULT( SteamInventoryEligiblePromoItemDefIDs_t )
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,
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
STEAM_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.
STEAM_CALL_RESULT( SteamInventoryStartPurchaseResult_t )
virtual SteamAPICall_t StartPurchase( STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
// Request current prices for all applicable item definitions
STEAM_CALL_RESULT( SteamInventoryRequestPricesResult_t )
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( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs,
STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pCurrentPrices,
STEAM_ARRAY_COUNT(unArrayLength) STEAM_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;
};
#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V003"
// Global interface accessor
inline ISteamInventory *SteamInventory();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInventory *, SteamInventory, STEAMINVENTORY_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamInventory *SteamGameServerInventory();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamInventory *, SteamGameServerInventory, STEAMINVENTORY_INTERFACE_VERSION );
// 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 };
};
// Returned
struct SteamInventoryEligiblePromoItemDefIDs_t
{
enum { k_iCallback = k_iClientInventoryCallbacks + 3 };
EResult m_result;
CSteamID m_steamID;
int m_numEligiblePromoItemDefs;
bool m_bCachedData; // indicates that the data was retrieved from the cache and not the server
};
// Triggered from StartPurchase call
struct SteamInventoryStartPurchaseResult_t
{
enum { k_iCallback = k_iClientInventoryCallbacks + 4 };
EResult m_result;
uint64 m_ulOrderID;
uint64 m_ulTransID;
};
// Triggered from RequestPrices
struct SteamInventoryRequestPricesResult_t
{
enum { k_iCallback = k_iClientInventoryCallbacks + 5 };
EResult m_result;
char m_rgchCurrency[4];
};
#pragma pack( pop )
#endif // ISTEAMCONTROLLER_H

View file

@ -0,0 +1 @@
#error "This file isn't used any more"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,71 @@
//============ Copyright (c) Valve Corporation, All rights reserved. ============
#ifndef ISTEAMMUSIC_H
#define ISTEAMMUSIC_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
enum AudioPlayback_Status
{
AudioPlayback_Undefined = 0,
AudioPlayback_Playing = 1,
AudioPlayback_Paused = 2,
AudioPlayback_Idle = 3
};
//-----------------------------------------------------------------------------
// Purpose: Functions to control music playback in the steam client
//-----------------------------------------------------------------------------
class ISteamMusic
{
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;
};
#define STEAMMUSIC_INTERFACE_VERSION "STEAMMUSIC_INTERFACE_VERSION001"
// Global interface accessor
inline ISteamMusic *SteamMusic();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusic *, SteamMusic, STEAMMUSIC_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
STEAM_CALLBACK_BEGIN( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( VolumeHasChanged_t, k_iSteamMusicCallbacks + 2 )
STEAM_CALLBACK_MEMBER( 0, float, m_flNewVolume )
STEAM_CALLBACK_END(1)
#pragma pack( pop )
#endif // #define ISTEAMMUSIC_H

View file

@ -0,0 +1,133 @@
//============ Copyright (c) Valve Corporation, All rights reserved. ============
#ifndef ISTEAMMUSICREMOTE_H
#define ISTEAMMUSICREMOTE_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
#include "isteammusic.h"
#define k_SteamMusicNameMaxLength 255
#define k_SteamMusicPNGMaxLength 65535
class ISteamMusicRemote
{
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;
};
#define STEAMMUSICREMOTE_INTERFACE_VERSION "STEAMMUSICREMOTE_INTERFACE_VERSION001"
// Global interface accessor
inline ISteamMusicRemote *SteamMusicRemote();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusicRemote *, SteamMusicRemote, STEAMMUSICREMOTE_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1)
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillDeactivate_t, k_iSteamMusicRemoteCallbacks + 2 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteToFront_t, k_iSteamMusicRemoteCallbacks + 3 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( MusicPlayerWillQuit_t, k_iSteamMusicRemoteCallbacks + 4 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlay_t, k_iSteamMusicRemoteCallbacks + 5 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPause_t, k_iSteamMusicRemoteCallbacks + 6 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayPrevious_t, k_iSteamMusicRemoteCallbacks + 7 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayNext_t, k_iSteamMusicRemoteCallbacks + 8 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( MusicPlayerWantsShuffled_t, k_iSteamMusicRemoteCallbacks + 9 )
STEAM_CALLBACK_MEMBER( 0, bool, m_bShuffled )
STEAM_CALLBACK_END(1)
STEAM_CALLBACK_BEGIN( MusicPlayerWantsLooped_t, k_iSteamMusicRemoteCallbacks + 10 )
STEAM_CALLBACK_MEMBER(0, bool, m_bLooped )
STEAM_CALLBACK_END(1)
STEAM_CALLBACK_BEGIN( MusicPlayerWantsVolume_t, k_iSteamMusicCallbacks + 11 )
STEAM_CALLBACK_MEMBER(0, float, m_flNewVolume)
STEAM_CALLBACK_END(1)
STEAM_CALLBACK_BEGIN( MusicPlayerSelectsQueueEntry_t, k_iSteamMusicCallbacks + 12 )
STEAM_CALLBACK_MEMBER(0, int, nID )
STEAM_CALLBACK_END(1)
STEAM_CALLBACK_BEGIN( MusicPlayerSelectsPlaylistEntry_t, k_iSteamMusicCallbacks + 13 )
STEAM_CALLBACK_MEMBER(0, int, nID )
STEAM_CALLBACK_END(1)
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayingRepeatStatus_t, k_iSteamMusicRemoteCallbacks + 14 )
STEAM_CALLBACK_MEMBER(0, int, m_nPlayingRepeatStatus )
STEAM_CALLBACK_END(1)
#pragma pack( pop )
#endif // #define ISTEAMMUSICREMOTE_H

View file

@ -0,0 +1,325 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam managing network connections between game clients & servers
//
//=============================================================================
#ifndef ISTEAMNETWORKING
#define ISTEAMNETWORKING
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
// 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
};
// 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,
};
// 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
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
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
};
#pragma pack( pop )
// handle to a socket
typedef uint32 SNetSocket_t; // CreateP2PConnectionSocket()
typedef uint32 SNetListenSocket_t; // CreateListenSocket()
// connection progress indicators, used by CreateP2PConnectionSocket()
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
};
// describes how the socket is currently connected
enum ESNetSocketConnectionType
{
k_ESNetSocketConnectionTypeNotConnected = 0,
k_ESNetSocketConnectionTypeUDP = 1,
k_ESNetSocketConnectionTypeUDPRelay = 2,
};
//-----------------------------------------------------------------------------
// Purpose: Functions for making connections and sending data between clients,
// traversing NAT's where possible
//-----------------------------------------------------------------------------
class ISteamNetworking
{
public:
////////////////////////////////////////////////////////////////////////////////////////////
//
// UDP-style (connectionless) networking interface. These functions send messages using
// an API organized around the destination. Reliable and unreliable messages are supported.
//
// For a more TCP-style interface (meaning you have a connection handle), see the functions below.
// Both interface styles can send both reliable and unreliable messages.
//
// 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 connection-oriented interface functions
//
// These functions are more like a client-server TCP API. One side is the "server"
// and "listens" for incoming connections, which then must be "accepted." The "client"
// initiates a connection by "connecting." Sending and receiving is done through a
// connection handle.
//
// For a more UDP-style interface, where you do not track connection handles but
// simply send messages to a SteamID, use the UDP-style functions above.
//
// Both methods can send both reliable and unreliable methods.
//
////////////////////////////////////////////////////////////////////////////////////////////
// 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;
};
#define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking005"
// Global interface accessor
inline ISteamNetworking *SteamNetworking();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamNetworking, STEAMNETWORKING_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamNetworking *SteamGameServerNetworking();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamGameServerNetworking, STEAMNETWORKING_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
// 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
};
// 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
};
#pragma pack( pop )
#endif // ISTEAMNETWORKING

View file

@ -0,0 +1,62 @@
//====== Copyright <20> 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 "steam_api_common.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 ISteamParentalSettings
{
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;
};
#define STEAMPARENTALSETTINGS_INTERFACE_VERSION "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"
// Global interface accessor
inline ISteamParentalSettings *SteamParentalSettings();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamParentalSettings *, SteamParentalSettings, STEAMPARENTALSETTINGS_INTERFACE_VERSION );
//-----------------------------------------------------------------------------
// Purpose: Callback for querying UGC
//-----------------------------------------------------------------------------
struct SteamParentalSettingsChanged_t
{
enum { k_iCallback = k_ISteamParentalSettingsCallbacks + 1 };
};
#endif // ISTEAMPARENTALSETTINGS_H

View file

@ -0,0 +1,91 @@
//====== Copyright © 1996-2010, Valve Corporation, All rights reserved. =======
//
// Purpose: interface the game must provide Steam with on PS3 in order for the
// Steam overlay to render.
//
//=============================================================================
#ifndef ISTEAMPS3OVERLAYRENDERER_H
#define ISTEAMPS3OVERLAYRENDERER_H
#ifdef _WIN32
#pragma once
#endif
#include "cell/pad.h"
//-----------------------------------------------------------------------------
// Purpose: Enum for supported gradient directions
//-----------------------------------------------------------------------------
enum EOverlayGradientDirection
{
k_EOverlayGradientHorizontal = 1,
k_EOverlayGradientVertical = 2,
k_EOverlayGradientNone = 3,
};
// Helpers for fetching individual color components from ARGB packed DWORD colors Steam PS3 overlay renderer uses.
#define STEAM_COLOR_RED( color ) \
(int)(((color)>>16)&0xff)
#define STEAM_COLOR_GREEN( color ) \
(int)(((color)>>8)&0xff)
#define STEAM_COLOR_BLUE( color ) \
(int)((color)&0xff)
#define STEAM_COLOR_ALPHA( color ) \
(int)(((color)>>24)&0xff)
//-----------------------------------------------------------------------------
// Purpose: Interface the game must expose to Steam for rendering
//-----------------------------------------------------------------------------
class ISteamPS3OverlayRenderHost
{
public:
// Interface for game engine to implement which Steam requires to render.
// Draw a textured rect. This may use only part of the texture and will pass texture coords, it will also possibly request a gradient and will specify colors for vertexes.
virtual void DrawTexturedRect( int x0, int y0, int x1, int y1, float u0, float v0, float u1, float v1, int32 iTextureID, DWORD colorStart, DWORD colorEnd, EOverlayGradientDirection eDirection ) = 0;
// Load a RGBA texture for Steam, or update a previously loaded one. Updates may be partial. You must not evict or remove this texture once Steam has uploaded it.
virtual void LoadOrUpdateTexture( int32 iTextureID, bool bIsFullTexture, int x0, int y0, uint32 uWidth, uint32 uHeight, int32 iBytes, char *pData ) = 0;
// Delete a texture Steam previously uploaded
virtual void DeleteTexture( int32 iTextureID ) = 0;
// Delete all previously uploaded textures
virtual void DeleteAllTextures() = 0;
};
//-----------------------------------------------------------------------------
// Purpose: Interface Steam exposes for the game to tell it when to render, etc.
//-----------------------------------------------------------------------------
class ISteamPS3OverlayRender
{
public:
// Call once at startup to initialize the Steam overlay and pass it your host interface ptr
virtual bool BHostInitialize( uint32 unScreenWidth, uint32 unScreenHeight, uint32 unRefreshRate, ISteamPS3OverlayRenderHost *pRenderHost, void *CellFontLib ) = 0;
// Call this once a frame when you are ready for the Steam overlay to render (ie, right before flipping buffers, after all your rendering)
virtual void Render() = 0;
// Call this everytime you read input on PS3.
//
// If this returns true, then the overlay is active and has consumed the input, your game
// should then ignore all the input until BHandleCellPadData once again returns false, which
// will mean the overlay is deactivated.
virtual bool BHandleCellPadData( const CellPadData &padData ) = 0;
// Call this if you detect no controllers connected or that the XMB is intercepting input
//
// This is important to clear input state for the overlay, so keys left down during XMB activation
// are not continued to be processed.
virtual bool BResetInputState() = 0;
};
#endif // ISTEAMPS3OVERLAYRENDERER_H

View file

@ -0,0 +1,685 @@
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: public interface to user remote file storage in Steam
//
//=============================================================================
#ifndef ISTEAMREMOTESTORAGE_H
#define ISTEAMREMOTESTORAGE_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
// Purpose: Defines the largest allowed file size. Cloud files cannot be written
// in a single chunk over 100MB (and cannot be over 200MB total.)
//-----------------------------------------------------------------------------
const uint32 k_unMaxCloudFileChunkSize = 100 * 1024 * 1024;
//-----------------------------------------------------------------------------
// Purpose: Structure that contains an array of const char * strings and the number of those strings
//-----------------------------------------------------------------------------
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct SteamParamStringArray_t
{
const char ** m_ppStrings;
int32 m_nNumStrings;
};
#pragma pack( pop )
// 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 = 8000;
const uint32 k_unEnumeratePublishedFilesMaxResults = 50;
const uint32 k_cchTagListMax = 1024 + 1;
const uint32 k_cchFilenameMax = 260;
const uint32 k_cchPublishedFileURLMax = 256;
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_ERemoteStoragePlatformAndroid = (1 << 5),
k_ERemoteStoragePlatformAll = 0xffffffff
};
enum ERemoteStoragePublishedFileVisibility
{
k_ERemoteStoragePublishedFileVisibilityPublic = 0,
k_ERemoteStoragePublishedFileVisibilityFriendsOnly = 1,
k_ERemoteStoragePublishedFileVisibilityPrivate = 2,
};
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 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 EWorkshopVideoProvider
{
k_EWorkshopVideoProviderNone = 0,
k_EWorkshopVideoProviderYoutube = 1
};
enum EUGCReadAction
{
// Keeps the file handle open unless the last byte is read. You can use this when reading large files (over 100MB) in sequential chunks.
// If the last byte is read, this will behave the same as k_EUGCRead_Close. Otherwise, it behaves the same as k_EUGCRead_ContinueReading.
// This value maintains the same behavior as before the EUGCReadAction parameter was introduced.
k_EUGCRead_ContinueReadingUntilFinished = 0,
// Keeps the file handle open. Use this when using UGCRead to seek to different parts of the file.
// When you are done seeking around the file, make a final call with k_EUGCRead_Close to close it.
k_EUGCRead_ContinueReading = 1,
// Frees the file handle. Use this when you're done reading the content.
// To read the file from Steam again you will need to call UGCDownload again.
k_EUGCRead_Close = 2,
};
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing, reading and writing files stored remotely
// and cached locally
//-----------------------------------------------------------------------------
class ISteamRemoteStorage
{
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;
STEAM_CALL_RESULT( RemoteStorageFileWriteAsyncComplete_t )
virtual SteamAPICall_t FileWriteAsync( const char *pchFile, const void *pvData, uint32 cubData ) = 0;
STEAM_CALL_RESULT( RemoteStorageFileReadAsyncComplete_t )
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;
STEAM_CALL_RESULT( RemoteStorageFileShareResult_t )
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.
STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t )
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, STEAM_OUT_STRING() char **ppchName, int32 *pnFileSizeInBytes, STEAM_OUT_STRUCT() 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
STEAM_CALL_RESULT( RemoteStoragePublishFileProgress_t )
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;
STEAM_CALL_RESULT( RemoteStorageUpdatePublishedFileResult_t )
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.
STEAM_CALL_RESULT( RemoteStorageGetPublishedFileDetailsResult_t )
virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld ) = 0;
STEAM_CALL_RESULT( RemoteStorageDeletePublishedFileResult_t )
virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
// enumerate the files that the current user published with this app
STEAM_CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t )
virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0;
STEAM_CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
STEAM_CALL_RESULT( RemoteStorageEnumerateUserSubscribedFilesResult_t )
virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0;
STEAM_CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0;
STEAM_CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t )
virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0;
STEAM_CALL_RESULT( RemoteStorageUpdateUserPublishedItemVoteResult_t )
virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0;
STEAM_CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t )
virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0;
STEAM_CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t )
virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0;
STEAM_CALL_RESULT( RemoteStoragePublishFileProgress_t )
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;
STEAM_CALL_RESULT( RemoteStorageSetUserPublishedFileActionResult_t )
virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0;
STEAM_CALL_RESULT( RemoteStorageEnumeratePublishedFilesByUserActionResult_t )
virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0;
// this method enumerates the public view of workshop files
STEAM_CALL_RESULT( RemoteStorageEnumerateWorkshopFilesResult_t )
virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0;
STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t )
virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0;
};
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION014"
// Global interface accessor
inline ISteamRemoteStorage *SteamRemoteStorage();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemoteStorage *, SteamRemoteStorage, STEAMREMOTESTORAGE_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// 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[k_cchFilenameMax]; // 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
};
//
// IMPORTANT! k_iClientRemoteStorageCallbacks + 4 is used, see iclientremotestorage.h
//
//-----------------------------------------------------------------------------
// 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: 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
};
// k_iClientRemoteStorageCallbacks + 8 is deprecated! Do not reuse
//-----------------------------------------------------------------------------
// 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;
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
};
//-----------------------------------------------------------------------------
// 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.
PublishedFileId_t m_nPublishedFileId;
};
//-----------------------------------------------------------------------------
// 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 ];
};
#if defined(VALVE_CALLBACK_PACK_SMALL)
VALVE_COMPILE_TIME_ASSERT( sizeof( RemoteStorageEnumerateUserSubscribedFilesResult_t ) == (1 + 1 + 1 + 50 + 100) * 4 );
#elif defined(VALVE_CALLBACK_PACK_LARGE)
VALVE_COMPILE_TIME_ASSERT( sizeof( RemoteStorageEnumerateUserSubscribedFilesResult_t ) == (1 + 1 + 1 + 50 + 100) * 4 + 4 );
#else
#warning You must first include steam_api_common.h
#endif
//-----------------------------------------------------------------------------
// 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.
PublishedFileId_t m_nPublishedFileId;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to CommitPublishedFileUpdate()
//-----------------------------------------------------------------------------
struct RemoteStorageUpdatePublishedFileResult_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 16 };
EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId;
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
};
//-----------------------------------------------------------------------------
// 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[k_cchFilenameMax]; // 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 will consume 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; // 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)
EWorkshopFileType m_eFileType; // Type of the file
bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop
};
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 ];
AppId_t m_nAppId;
uint32 m_unStartIndex;
};
//-----------------------------------------------------------------------------
// 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;
};
//-----------------------------------------------------------------------------
// Purpose: User subscribed to a file for the app (from within the app or on the web)
//-----------------------------------------------------------------------------
struct RemoteStoragePublishedFileSubscribed_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 21 };
PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file.
};
//-----------------------------------------------------------------------------
// Purpose: User unsubscribed from a file for the app (from within the app or on the web)
//-----------------------------------------------------------------------------
struct RemoteStoragePublishedFileUnsubscribed_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 22 };
PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file.
};
//-----------------------------------------------------------------------------
// Purpose: Published file that a user owns was deleted (from within the app or the web)
//-----------------------------------------------------------------------------
struct RemoteStoragePublishedFileDeleted_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 23 };
PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file.
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to UpdateUserPublishedItemVote()
//-----------------------------------------------------------------------------
struct RemoteStorageUpdateUserPublishedItemVoteResult_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 24 };
EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; // The published file id
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to GetUserPublishedItemVoteDetails()
//-----------------------------------------------------------------------------
struct RemoteStorageUserVoteDetails_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 25 };
EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; // The published file id
EWorkshopVote m_eVote; // what the user voted
};
struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 26 };
EResult m_eResult; // The result of the operation.
int32 m_nResultsReturned;
int32 m_nTotalResultCount;
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
};
struct RemoteStorageSetUserPublishedFileActionResult_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 27 };
EResult m_eResult; // The result of the operation.
PublishedFileId_t m_nPublishedFileId; // The published file id
EWorkshopFileAction m_eAction; // the action that was attempted
};
struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 28 };
EResult m_eResult; // The result of the operation.
EWorkshopFileAction m_eAction; // the action that was filtered on
int32 m_nResultsReturned;
int32 m_nTotalResultCount;
PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
uint32 m_rgRTimeUpdated[ k_unEnumeratePublishedFilesMaxResults ];
};
//-----------------------------------------------------------------------------
// Purpose: Called periodically while a PublishWorkshopFile is in progress
//-----------------------------------------------------------------------------
struct RemoteStoragePublishFileProgress_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 29 };
double m_dPercentFile;
bool m_bPreview;
};
//-----------------------------------------------------------------------------
// Purpose: Called when the content for a published file is updated
//-----------------------------------------------------------------------------
struct RemoteStoragePublishedFileUpdated_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 30 };
PublishedFileId_t m_nPublishedFileId; // The published file id
AppId_t m_nAppID; // ID of the app that will consume this file.
uint64 m_ulUnused; // not used anymore
};
//-----------------------------------------------------------------------------
// 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 // ISTEAMREMOTESTORAGE_H

View file

@ -0,0 +1,120 @@
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: public interface to user remote file storage in Steam
//
//=============================================================================
#ifndef ISTEAMSCREENSHOTS_H
#define ISTEAMSCREENSHOTS_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
const uint32 k_nScreenshotMaxTaggedUsers = 32;
const uint32 k_nScreenshotMaxTaggedPublishedFiles = 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;
// Handle is valid for the lifetime of your process and no longer
typedef uint32 ScreenshotHandle;
#define INVALID_SCREENSHOT_HANDLE 0
enum EVRScreenshotType
{
k_EVRScreenshotType_None = 0,
k_EVRScreenshotType_Mono = 1,
k_EVRScreenshotType_Stereo = 2,
k_EVRScreenshotType_MonoCubemap = 3,
k_EVRScreenshotType_MonoPanorama = 4,
k_EVRScreenshotType_StereoPanorama = 5
};
//-----------------------------------------------------------------------------
// Purpose: Functions for adding screenshots to the user's screenshot library
//-----------------------------------------------------------------------------
class ISteamScreenshots
{
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( EVRScreenshotType eType, const char *pchFilename, const char *pchVRFilename ) = 0;
};
#define STEAMSCREENSHOTS_INTERFACE_VERSION "STEAMSCREENSHOTS_INTERFACE_VERSION003"
// Global interface accessor
inline ISteamScreenshots *SteamScreenshots();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamScreenshots *, SteamScreenshots, STEAMSCREENSHOTS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// 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 };
};
#pragma pack( pop )
#endif // ISTEAMSCREENSHOTS_H

View file

@ -0,0 +1,559 @@
//====== Copyright 1996-2013, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam ugc
//
//=============================================================================
#ifndef ISTEAMUGC_H
#define ISTEAMUGC_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
#include "isteamremotestorage.h"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#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,
k_EUGCQuery_RankedByPlaytimeTrend = 13,
k_EUGCQuery_RankedByTotalPlaytime = 14,
k_EUGCQuery_RankedByAveragePlaytimeTrend = 15,
k_EUGCQuery_RankedByLifetimeAveragePlaytime = 16,
k_EUGCQuery_RankedByPlaytimeSessionsTrend = 17,
k_EUGCQuery_RankedByLifetimePlaytimeSessions = 18,
};
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,
k_EItemStatistic_NumSecondsPlayed = 8,
k_EItemStatistic_NumPlaytimeSessions = 9,
k_EItemStatistic_NumComments = 10,
k_EItemStatistic_NumSecondsPlayedDuringTimePeriod = 11,
k_EItemStatistic_NumPlaytimeSessionsDuringTimePeriod = 12,
};
enum EItemPreviewType
{
k_EItemPreviewType_Image = 0, // standard image file expected (e.g. jpg, png, gif, etc.)
k_EItemPreviewType_YouTubeVideo = 1, // video id is stored
k_EItemPreviewType_Sketchfab = 2, // model id is stored
k_EItemPreviewType_EnvironmentMap_HorizontalCross = 3, // standard image file expected - cube map in the layout
// +---+---+-------+
// | |Up | |
// +---+---+---+---+
// | L | F | R | B |
// +---+---+---+---+
// | |Dn | |
// +---+---+---+---+
k_EItemPreviewType_EnvironmentMap_LatLong = 4, // standard image file expected
k_EItemPreviewType_ReservedMax = 255, // you can specify your own types above this value
};
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
// collection details
uint32 m_unNumChildren;
};
//-----------------------------------------------------------------------------
// Purpose: Steam UGC support API
//-----------------------------------------------------------------------------
class ISteamUGC
{
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
STEAM_CALL_RESULT( SteamUGCQueryCompleted_t )
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, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0;
virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, STEAM_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, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType ) = 0;
virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0;
virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, STEAM_OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, STEAM_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
STEAM_CALL_RESULT( CreateItemResult_t )
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, EItemPreviewType 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)
STEAM_CALL_RESULT( SubmitItemUpdateResult_t )
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
STEAM_CALL_RESULT( SetUserItemVoteResult_t )
virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0;
STEAM_CALL_RESULT( GetUserItemVoteResult_t )
virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0;
STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t )
virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t )
virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
STEAM_CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP
STEAM_CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
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, STEAM_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
STEAM_CALL_RESULT( StartPlaytimeTrackingResult_t )
virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t )
virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t )
virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0;
// parent-child relationship or dependency management
STEAM_CALL_RESULT( AddUGCDependencyResult_t )
virtual SteamAPICall_t AddDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
STEAM_CALL_RESULT( RemoveUGCDependencyResult_t )
virtual SteamAPICall_t RemoveDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
// add/remove app dependence/requirements (usually DLC)
STEAM_CALL_RESULT( AddAppDependencyResult_t )
virtual SteamAPICall_t AddAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0;
STEAM_CALL_RESULT( RemoveAppDependencyResult_t )
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
STEAM_CALL_RESULT( GetAppDependenciesResult_t )
virtual SteamAPICall_t GetAppDependencies( PublishedFileId_t nPublishedFileID ) = 0;
// delete the item without prompting the user
STEAM_CALL_RESULT( DeleteItemResult_t )
virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0;
};
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION012"
// Global interface accessor
inline ISteamUGC *SteamUGC();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUGC *, SteamUGC, STEAMUGC_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamUGC *SteamGameServerUGC();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamUGC *, SteamGameServerUGC, STEAMUGC_INTERFACE_VERSION );
//-----------------------------------------------------------------------------
// 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
char m_rgchNextCursor[k_cchPublishedFileURLMax]; // If a paging cursor was used, then this will be the next cursor to get the next result set.
};
//-----------------------------------------------------------------------------
// 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;
PublishedFileId_t m_nPublishedFileId;
};
//-----------------------------------------------------------------------------
// Purpose: a 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;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to StartPlaytimeTracking()
//-----------------------------------------------------------------------------
struct StartPlaytimeTrackingResult_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 10 };
EResult m_eResult;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to StopPlaytimeTracking()
//-----------------------------------------------------------------------------
struct StopPlaytimeTrackingResult_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 11 };
EResult m_eResult;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to AddDependency
//-----------------------------------------------------------------------------
struct AddUGCDependencyResult_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 12 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
PublishedFileId_t m_nChildPublishedFileId;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to RemoveDependency
//-----------------------------------------------------------------------------
struct RemoveUGCDependencyResult_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 13 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
PublishedFileId_t m_nChildPublishedFileId;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to AddAppDependency
//-----------------------------------------------------------------------------
struct AddAppDependencyResult_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 14 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
AppId_t m_nAppID;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to RemoveAppDependency
//-----------------------------------------------------------------------------
struct RemoveAppDependencyResult_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 15 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
AppId_t m_nAppID;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to GetAppDependencies. Callback may be called
// multiple times until all app dependencies have been returned.
//-----------------------------------------------------------------------------
struct GetAppDependenciesResult_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 16 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
AppId_t m_rgAppIDs[32];
uint32 m_nNumAppDependencies; // number returned in this struct
uint32 m_nTotalNumAppDependencies; // total found
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to DeleteItem
//-----------------------------------------------------------------------------
struct DeleteItemResult_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 17 };
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
};
#pragma pack( pop )
#endif // ISTEAMUGC_H

View file

@ -0,0 +1,389 @@
//====== Copyright (c) 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to user account information in Steam
//
//=============================================================================
#ifndef ISTEAMUSER_H
#define ISTEAMUSER_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
// structure that contains client callback data
// see callbacks documentation for more details
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct CallbackMsg_t
{
HSteamUser m_hSteamUser;
int m_iCallback;
uint8 *m_pubParam;
int m_cubParam;
};
#pragma pack( pop )
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser
{
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( <appID> )
// 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\<SteamID>\<AppID>\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 )
STEAM_CALL_RESULT( EncryptedAppTicketResponse_t )
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.
STEAM_CALL_RESULT( StoreAuthURLResponse_t )
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;
STEAM_CALL_RESULT( MarketEligibilityResponse_t )
virtual SteamAPICall_t GetMarketEligibility() = 0;
};
#define STEAMUSER_INTERFACE_VERSION "SteamUser020"
// Global interface accessor
inline ISteamUser *SteamUser();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUser *, SteamUser, STEAMUSER_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// 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: 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 };
uint32 m_uAppID;
uint32 m_unGameServerIP;
uint16 m_usGameServerPort;
uint16 m_bSecure;
uint32 m_uReason;
};
//-----------------------------------------------------------------------------
// 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 };
};
//-----------------------------------------------------------------------------
// 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];
};
//-----------------------------------------------------------------------------
// Purpose: sent in response to ISteamUser::GetMarketEligibility
//-----------------------------------------------------------------------------
struct MarketEligibilityResponse_t
{
enum { k_iCallback = k_iSteamUserCallbacks + 66 };
bool m_bAllowed;
EMarketNotAllowedReasonFlags m_eNotAllowedReason;
RTime32 m_rtAllowedAtTime;
int m_cdaySteamGuardRequiredDays; // The number of days any user is required to have had Steam Guard before they can use the market
int m_cdayNewDeviceCooldown; // The number of days after initial device authorization a user must wait before using the market on that device
};
#pragma pack( pop )
#endif // ISTEAMUSER_H

View file

@ -0,0 +1,480 @@
//====== Copyright <20> 1996-2009, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to stats, achievements, and leaderboards
//
//=============================================================================
#ifndef ISTEAMUSERSTATS_H
#define ISTEAMUSERSTATS_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
#include "isteamremotestorage.h"
// 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;
// type of data request, when downloading leaderboard entries
enum ELeaderboardDataRequest
{
k_ELeaderboardDataRequestGlobal = 0,
k_ELeaderboardDataRequestGlobalAroundUser = 1,
k_ELeaderboardDataRequestFriends = 2,
k_ELeaderboardDataRequestUsers = 3
};
// 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
};
// 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
};
// a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry()
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct LeaderboardEntry_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
};
#pragma pack( pop )
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing stats, achievements, and leaderboard information
//-----------------------------------------------------------------------------
class ISteamUserStats
{
public:
// Ask the server to send down this user's data and achievements for this game
STEAM_CALL_BACK( UserStatsReceived_t )
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
STEAM_CALL_RESULT( UserStatsReceived_t )
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
STEAM_CALL_RESULT(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
STEAM_CALL_RESULT( 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
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
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
STEAM_METHOD_DESC(Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers)
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard,
STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) 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
STEAM_CALL_RESULT( LeaderboardScoreUploaded_t )
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.
STEAM_CALL_RESULT( 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
STEAM_CALL_RESULT( 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.
STEAM_CALL_RESULT( 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.
STEAM_CALL_RESULT( GlobalStatsReceived_t )
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, STEAM_ARRAY_COUNT(cubData) int64 *pData, uint32 cubData ) = 0;
virtual int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) 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
};
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION011"
// Global interface accessor
inline ISteamUserStats *SteamUserStats();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUserStats *, SteamUserStats, STEAMUSERSTATS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// 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 SteamUtils()->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 that PS3 trophies have been installed
//-----------------------------------------------------------------------------
struct PS3TrophiesInstalled_t
{
enum { k_iCallback = k_iSteamUserStatsCallbacks + 12 };
uint64 m_nGameID; // Game these stats are for
EResult m_eResult; // The result of the operation
uint64 m_ulRequiredDiskSpace; // If m_eResult is k_EResultDiskFull, will contain the amount of space needed to install trophies
};
//-----------------------------------------------------------------------------
// 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 // ISTEAMUSER_H

View file

@ -0,0 +1,271 @@
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to utility functions in Steam
//
//=============================================================================
#ifndef ISTEAMUTILS_H
#define ISTEAMUTILS_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
// Steam API call failure results
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
};
// Input modes for the Big Picture gamepad text entry
enum EGamepadTextInputMode
{
k_EGamepadTextInputModeNormal = 0,
k_EGamepadTextInputModePassword = 1
};
// Controls number of allowed lines for the Big Picture gamepad text entry
enum EGamepadTextInputLineMode
{
k_EGamepadTextInputLineModeSingleLine = 0,
k_EGamepadTextInputLineModeMultipleLines = 1
};
// function prototype for warning message hook
#if defined( POSIX )
#define __cdecl
#endif
extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *);
//-----------------------------------------------------------------------------
// Purpose: interface to user independent utility functions
//-----------------------------------------------------------------------------
class ISteamUtils
{
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.
STEAM_PRIVATE_API( 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.
STEAM_CALL_RESULT( CheckFileSignature_t )
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;
};
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils009"
// Global interface accessor
inline ISteamUtils *SteamUtils();
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamUtils *, SteamUtils, SteamInternal_FindOrCreateUserInterface( 0, STEAMUTILS_INTERFACE_VERSION ) );
// Global accessor for the gameserver client
inline ISteamUtils *SteamGameServerUtils();
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamUtils *, SteamGameServerUtils, SteamInternal_FindOrCreateGameServerInterface( 0, STEAMUTILS_INTERFACE_VERSION ) );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// 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;
int m_iCallback;
uint32 m_cubParam;
};
//-----------------------------------------------------------------------------
// called when Steam wants to shutdown
//-----------------------------------------------------------------------------
struct SteamShutdown_t
{
enum { k_iCallback = k_iSteamUtilsCallbacks + 4 };
};
//-----------------------------------------------------------------------------
// results for CheckFileSignature
//-----------------------------------------------------------------------------
enum ECheckFileSignature
{
k_ECheckFileSignatureInvalidSignature = 0,
k_ECheckFileSignatureValidSignature = 1,
k_ECheckFileSignatureFileNotFound = 2,
k_ECheckFileSignatureNoSignaturesFoundForThisApp = 3,
k_ECheckFileSignatureNoSignaturesFoundForThisFile = 4,
};
//-----------------------------------------------------------------------------
// callback for CheckFileSignature
//-----------------------------------------------------------------------------
struct CheckFileSignature_t
{
enum { k_iCallback = k_iSteamUtilsCallbacks + 5 };
ECheckFileSignature m_eCheckFileSignature;
};
// k_iSteamUtilsCallbacks + 13 is taken
//-----------------------------------------------------------------------------
// Big Picture gamepad text input has been closed
//-----------------------------------------------------------------------------
struct GamepadTextInputDismissed_t
{
enum { k_iCallback = k_iSteamUtilsCallbacks + 14 };
bool m_bSubmitted; // true if user entered & accepted text (Call ISteamUtils::GetEnteredGamepadTextInput() for text), false if canceled input
uint32 m_unSubmittedText;
};
// k_iSteamUtilsCallbacks + 15 is taken
#pragma pack( pop )
#endif // ISTEAMUTILS_H

View file

@ -0,0 +1,75 @@
//====== Copyright © 1996-2014 Valve Corporation, All rights reserved. =======
//
// Purpose: interface to Steam Video
//
//=============================================================================
#ifndef ISTEAMVIDEO_H
#define ISTEAMVIDEO_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api_common.h"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: Steam Video API
//-----------------------------------------------------------------------------
class ISteamVideo
{
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
STEAM_CALL_BACK( GetOPFSettingsResult_t )
virtual void GetOPFSettings( AppId_t unVideoAppID ) = 0;
virtual bool GetOPFStringForApp( AppId_t unVideoAppID, char *pchBuffer, int32 *pnBufferSize ) = 0;
};
#define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V002"
// Global interface accessor
inline ISteamVideo *SteamVideo();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamVideo *, SteamVideo, STEAMVIDEO_INTERFACE_VERSION );
STEAM_CALLBACK_BEGIN( BroadcastUploadStart_t, k_iClientVideoCallbacks + 4 )
STEAM_CALLBACK_END(0)
STEAM_CALLBACK_BEGIN( BroadcastUploadStop_t, k_iClientVideoCallbacks + 5 )
STEAM_CALLBACK_MEMBER( 0, EBroadcastUploadResult, m_eResult )
STEAM_CALLBACK_END(1)
STEAM_CALLBACK_BEGIN( GetVideoURLResult_t, k_iClientVideoCallbacks + 11 )
STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult )
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
STEAM_CALLBACK_MEMBER( 2, char, m_rgchURL[256] )
STEAM_CALLBACK_END(3)
STEAM_CALLBACK_BEGIN( GetOPFSettingsResult_t, k_iClientVideoCallbacks + 24 )
STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult )
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
STEAM_CALLBACK_END(2)
#pragma pack( pop )
#endif // ISTEAMVIDEO_H

View file

@ -0,0 +1,251 @@
//========= Copyright <20> 1996-2008, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef MATCHMAKINGTYPES_H
#define MATCHMAKINGTYPES_H
#ifdef _WIN32
#pragma once
#endif
#ifdef POSIX
#ifndef _snprintf
#define _snprintf snprintf
#endif
#endif
#include <stdio.h>
#include <string.h>
//
// Max size (in bytes of UTF-8 data, not in characters) of server fields, including null terminator.
// WARNING: These cannot be changed easily, without breaking clients using old interfaces.
//
const int k_cbMaxGameServerGameDir = 32;
const int k_cbMaxGameServerMapName = 32;
const int k_cbMaxGameServerGameDescription = 64;
const int k_cbMaxGameServerName = 64;
const int k_cbMaxGameServerTags = 128;
const int k_cbMaxGameServerGameData = 2048;
/// Store key/value pair used in matchmaking queries.
///
/// Actually, the name Key/Value is a bit misleading. The "key" is better
/// understood as "filter operation code" and the "value" is the operand to this
/// filter operation. The meaning of the operand depends upon the filter.
struct MatchMakingKeyValuePair_t
{
MatchMakingKeyValuePair_t() { m_szKey[0] = m_szValue[0] = 0; }
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';
}
char m_szKey[ 256 ];
char m_szValue[ 256 ];
};
enum EMatchMakingServerResponse
{
eServerResponded = 0,
eServerFailedToRespond,
eNoServersListedOnMasterServer // for the Internet query type, returned in response callback if no servers of this type match
};
// 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
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 netadr_t servernetadr_t::GetIPAndQueryPort()
{
return netadr_t( m_unIP, m_usQueryPort );
}
#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;
}
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;
#ifdef VALVE_BIG_ENDIAN
_snprintf (s[nBuf], sizeof( s[nBuf] ), "%u.%u.%u.%u:%i", (int)(ipByte[0]), (int)(ipByte[1]), (int)(ipByte[2]), (int)(ipByte[3]), usPort );
#else
_snprintf (s[nBuf], sizeof( s[nBuf] ), "%u.%u.%u.%u:%i", (int)(ipByte[3]), (int)(ipByte[2]), (int)(ipByte[1]), (int)(ipByte[0]), usPort );
#endif
const char *pchRet = s[nBuf];
++nBuf;
nBuf %= ( (sizeof(s)/sizeof(s[0])) );
return pchRet;
}
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 );
}
//-----------------------------------------------------------------------------
// 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[k_cbMaxGameServerGameDir]; ///< current game directory
char m_szMap[k_cbMaxGameServerMapName]; ///< current map
char m_szGameDescription[k_cbMaxGameServerGameDescription]; ///< game description
uint32 m_nAppID; ///< Steam App ID of this server
int m_nPlayers; ///< total number of players currently on the server. INCLUDES BOTS!!
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:
/// Game server name
char m_szServerName[k_cbMaxGameServerName];
// For data added after SteamMatchMaking001 add it here
public:
/// the tags this server exposes
char m_szGameTags[k_cbMaxGameServerTags];
/// steamID of the game server - invalid if it's doesn't have one (old server, or not connected to Steam)
CSteamID m_steamID;
};
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;
}
inline void gameserveritem_t::SetName( const char *pName )
{
strncpy( m_szServerName, pName, sizeof( m_szServerName ) );
m_szServerName[ sizeof( m_szServerName ) - 1 ] = '\0';
}
#endif // MATCHMAKINGTYPES_H

View file

@ -0,0 +1,243 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// This header includes *all* of the interfaces and callback structures
// in the Steamworks SDK, and some high level functions to control the SDK
// (init, shutdown, etc) that you probably only need in one or two files.
//
// To save your compile times, we recommend that you not include this file
// in header files. Instead, include the specific headers for the interfaces
// and callback structures you need. The one file you might consider including
// in your precompiled header (e.g. stdafx.h) is steam_api_common.h
//
//=============================================================================
#ifndef STEAM_API_H
#define STEAM_API_H
#ifdef _WIN32
#pragma once
#endif
// Basic stuff
#include "steam_api_common.h"
// All of the interfaces
#include "isteamclient.h"
#include "isteamuser.h"
#include "isteamfriends.h"
#include "isteamutils.h"
#include "isteammatchmaking.h"
#include "isteamuserstats.h"
#include "isteamapps.h"
#include "isteamnetworking.h"
#include "isteamremotestorage.h"
#include "isteamscreenshots.h"
#include "isteammusic.h"
#include "isteammusicremote.h"
#include "isteamhttp.h"
#include "isteamcontroller.h"
#include "isteamugc.h"
#include "isteamapplist.h"
#include "isteamhtmlsurface.h"
#include "isteaminventory.h"
#include "isteamvideo.h"
#include "isteamparentalsettings.h"
#include "isteaminput.h"
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// Steam API setup & shutdown
//
// These functions manage loading, initializing and shutdown of the steamclient.dll
//
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// SteamAPI_Init must be called before using any other API functions. If it fails, an
// error message will be output to the debugger (or stderr) with further information.
S_API bool S_CALLTYPE SteamAPI_Init();
// SteamAPI_Shutdown should be called during process shutdown if possible.
S_API void S_CALLTYPE SteamAPI_Shutdown();
// SteamAPI_RestartAppIfNecessary ensures that your executable was launched through Steam.
//
// Returns true if the current process should terminate. Steam is now re-launching your application.
//
// Returns false if no action needs to be taken. This means that 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 if false is returned.
//
// NOTE: If you use the Steam DRM wrapper on your primary executable file, this check is unnecessary
// since the DRM wrapper will ensure that your application was launched properly through Steam.
S_API bool S_CALLTYPE SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID );
// Many Steam API functions allocate a small amount of thread-local memory for parameter storage.
// SteamAPI_ReleaseCurrentThreadMemory() will free API memory associated with the calling thread.
// This function is also called automatically by SteamAPI_RunCallbacks(), so a single-threaded
// program never needs to explicitly call this function.
S_API void S_CALLTYPE SteamAPI_ReleaseCurrentThreadMemory();
// crash dump recording functions
S_API void S_CALLTYPE SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
S_API void S_CALLTYPE SteamAPI_SetMiniDumpComment( const char *pchMsg );
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// 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
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// SteamAPI_IsSteamRunning() returns true if Steam is currently running
S_API bool S_CALLTYPE SteamAPI_IsSteamRunning();
// Pumps out all the steam messages, calling registered callbacks.
// NOT THREADSAFE - do not call from multiple threads simultaneously.
S_API void Steam_RunCallbacks( HSteamPipe hSteamPipe, bool bGameServerCallbacks );
// register the callback funcs to use to interact with the steam dll
S_API void Steam_RegisterInterfaceFuncs( void *hModule );
// returns the HSteamUser of the last user to dispatch a callback
S_API HSteamUser Steam_GetHSteamUserCurrent();
// returns the filename path of the current running Steam process, used if you need to load an explicit steam dll by name.
// DEPRECATED - implementation is Windows only, and the path returned is a UTF-8 string which must be converted to UTF-16 for use with Win32 APIs
S_API const char *SteamAPI_GetSteamInstallPath();
// sets whether or not Steam_RunCallbacks() should do a try {} catch (...) {} around calls to issuing callbacks
S_API void SteamAPI_SetTryCatchCallbacks( bool bTryCatchCallbacks );
// backwards compat export, passes through to SteamAPI_ variants
S_API HSteamPipe GetHSteamPipe();
S_API HSteamUser GetHSteamUser();
#if defined( VERSION_SAFE_STEAM_API_INTERFACES )
// exists only for backwards compat with code written against older SDKs
S_API bool S_CALLTYPE SteamAPI_InitSafe();
#endif
#if defined(USE_BREAKPAD_HANDLER) || defined(STEAM_API_EXPORTS)
// 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 S_CALLTYPE SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback );
S_API void S_CALLTYPE SteamAPI_SetBreakpadAppID( uint32 unAppID );
#endif
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
//
// CSteamAPIContext
//
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef STEAM_API_EXPORTS
// Deprecated! Use the global accessors directly
inline bool CSteamAPIContext::Init()
{
m_pSteamClient = ::SteamClient();
if ( !m_pSteamClient )
return false;
m_pSteamUser = ::SteamUser();
if ( !m_pSteamUser )
return false;
m_pSteamFriends = ::SteamFriends();
if ( !m_pSteamFriends )
return false;
m_pSteamUtils = ::SteamUtils();
if ( !m_pSteamUtils )
return false;
m_pSteamMatchmaking = ::SteamMatchmaking();
if ( !m_pSteamMatchmaking )
return false;
m_pSteamGameSearch = ::SteamGameSearch();
if ( !m_pSteamGameSearch )
return false;
m_pSteamMatchmakingServers = ::SteamMatchmakingServers();
if ( !m_pSteamMatchmakingServers )
return false;
m_pSteamUserStats = ::SteamUserStats();
if ( !m_pSteamUserStats )
return false;
m_pSteamApps = ::SteamApps();
if ( !m_pSteamApps )
return false;
m_pSteamNetworking = ::SteamNetworking();
if ( !m_pSteamNetworking )
return false;
m_pSteamRemoteStorage = ::SteamRemoteStorage();
if ( !m_pSteamRemoteStorage )
return false;
m_pSteamScreenshots = ::SteamScreenshots();
if ( !m_pSteamScreenshots )
return false;
m_pSteamHTTP = ::SteamHTTP();
if ( !m_pSteamHTTP )
return false;
m_pController = ::SteamController();
if ( !m_pController )
return false;
m_pSteamUGC = ::SteamUGC();
if ( !m_pSteamUGC )
return false;
m_pSteamAppList = ::SteamAppList();
if ( !m_pSteamAppList )
return false;
m_pSteamMusic = ::SteamMusic();
if ( !m_pSteamMusic )
return false;
m_pSteamMusicRemote = ::SteamMusicRemote();
if ( !m_pSteamMusicRemote )
return false;
#ifndef ANDROID // Not yet supported on Android
m_pSteamHTMLSurface = ::SteamHTMLSurface();
if ( !m_pSteamHTMLSurface )
return false;
#endif
m_pSteamInventory = ::SteamInventory();
if ( !m_pSteamInventory )
return false;
m_pSteamVideo = ::SteamVideo();
if ( !m_pSteamVideo )
return false;
m_pSteamParentalSettings = ::SteamParentalSettings();
if ( !m_pSteamParentalSettings )
return false;
m_pSteamInput = ::SteamInput();
if ( !m_pSteamInput )
return false;
return true;
}
#endif
#endif // STEAM_API_H

View file

@ -0,0 +1,231 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Steamworks SDK minimal include
//
// Defines the minimal set of things we need to use any single interface
// or register for any callback.
//
//=============================================================================
#ifndef STEAM_API_COMMON_H
#define STEAM_API_COMMON_H
#ifdef _WIN32
#pragma once
#endif
#include "steamtypes.h"
#include "steamclientpublic.h"
// S_API defines the linkage and calling conventions for steam_api.dll exports
#if defined( _WIN32 ) && !defined( _X360 )
#if defined( STEAM_API_EXPORTS )
#define S_API extern "C" __declspec( dllexport )
#elif defined( STEAM_API_NODLL )
#define S_API extern "C"
#else
#define S_API extern "C" __declspec( dllimport )
#endif // STEAM_API_EXPORTS
#elif defined( GNUC )
#if defined( STEAM_API_EXPORTS )
#define S_API extern "C" __attribute__ ((visibility("default")))
#else
#define S_API extern "C"
#endif // STEAM_API_EXPORTS
#else // !WIN32
#if defined( STEAM_API_EXPORTS )
#define S_API extern "C"
#else
#define S_API extern "C"
#endif // STEAM_API_EXPORTS
#endif
#if ( defined(STEAM_API_EXPORTS) || defined(STEAM_API_NODLL) ) && !defined(API_GEN)
#define STEAM_PRIVATE_API( ... ) __VA_ARGS__
#elif defined(STEAM_API_EXPORTS) && defined(API_GEN)
#define STEAM_PRIVATE_API( ... )
#else
#define STEAM_PRIVATE_API( ... ) protected: __VA_ARGS__ public:
#endif
// handle to a communication pipe to the Steam client
typedef int32 HSteamPipe;
// handle to single instance of a steam user
typedef int32 HSteamUser;
// function prototype
#if defined( POSIX )
#define __cdecl
#endif
extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *);
extern "C" typedef uint32 ( *SteamAPI_CheckCallbackRegistered_t )( int iCallbackNum );
#if defined( __SNC__ )
#pragma diag_suppress=1700 // warning 1700: class "%s" has virtual functions but non-virtual destructor
#endif
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// 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().
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// Dispatch all queued Steamworks callbacks.
//
// This is safe to call from multiple threads simultaneously,
// but if you choose to do this, callback code could be executed on any thread.
// One alternative is to call SteamAPI_RunCallbacks from the main thread only,
// and call SteamAPI_ReleaseCurrentThreadMemory regularly on other threads.
S_API void S_CALLTYPE SteamAPI_RunCallbacks();
// 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 )
// Dispatch callbacks relevant to the gameserver client and interfaces.
// To register for these, you need to use STEAM_GAMESERVER_CALLBACK.
// (Or call SetGameserverFlag on your CCallbackBase object.)
S_API void S_CALLTYPE SteamGameServer_RunCallbacks();
// Same as STEAM_CALLBACK, but for callbacks on the gameserver interface.
// These will be dispatched during SteamGameServer_RunCallbacks
#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 )
//-----------------------------------------------------------------------------
// 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:
virtual ~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();
~CCallResult();
void Set( SteamAPICall_t hAPICall, T *p, func_t func );
bool IsActive() const;
void Cancel();
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
private:
virtual void Run( void *pvParam );
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall );
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 );
void Register( T *pObj, func_t func );
void Unregister();
protected:
virtual void Run( void *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 >( nullptr, nullptr ) {}
// Inherits public Register and Unregister functions from base class
};
// Internal implementation details for all of the above
#include "steam_api_internal.h"
#endif // STEAM_API_COMMON_H

View file

@ -0,0 +1,925 @@
//====== Copyright (c) 1996-2014, Valve Corporation, All rights reserved. =======
//
// Purpose: Header for flatted SteamAPI. Use this for binding to other languages.
// This file is auto-generated, do not edit it.
//
//=============================================================================
#ifndef STEAMAPIFLAT_H
#define STEAMAPIFLAT_H
#ifdef _WIN32
#pragma once
#endif
#include <stdint.h>
typedef unsigned char uint8;
typedef unsigned char uint8;
typedef signed char int8;
typedef short int16;
typedef unsigned short uint16;
typedef int int32;
typedef unsigned int uint32;
typedef long long int64;
typedef unsigned long long uint64;
typedef int64 lint64;
typedef uint64 ulint64;
typedef uint8 Salt_t[8];
typedef uint64 GID_t;
typedef uint64 JobID_t;
typedef GID_t TxnID_t;
typedef uint32 PackageId_t;
typedef uint32 BundleId_t;
typedef uint32 AppId_t;
typedef uint64 AssetClassId_t;
typedef uint32 PhysicalItemId_t;
typedef uint32 DepotId_t;
typedef uint32 RTime32;
typedef uint32 CellID_t;
typedef uint64 SteamAPICall_t;
typedef uint32 AccountID_t;
typedef uint32 PartnerId_t;
typedef uint64 ManifestId_t;
typedef uint64 SiteId_t;
typedef uint64 PartyBeaconID_t;
typedef uint32 HAuthTicket;
typedef void * BREAKPAD_HANDLE;
typedef char compile_time_assert_type[1];
typedef int32 HSteamPipe;
typedef int32 HSteamUser;
typedef int16 FriendsGroupID_t;
typedef void * HServerListRequest;
typedef int HServerQuery;
typedef uint64 UGCHandle_t;
typedef uint64 PublishedFileUpdateHandle_t;
typedef uint64 PublishedFileId_t;
typedef uint64 UGCFileWriteStreamHandle_t;
typedef char compile_time_assert_type[1];
typedef uint64 SteamLeaderboard_t;
typedef uint64 SteamLeaderboardEntries_t;
typedef uint32 SNetSocket_t;
typedef uint32 SNetListenSocket_t;
typedef uint32 ScreenshotHandle;
typedef uint32 HTTPRequestHandle;
typedef uint32 HTTPCookieContainerHandle;
typedef uint64 InputHandle_t;
typedef uint64 InputActionSetHandle_t;
typedef uint64 InputDigitalActionHandle_t;
typedef uint64 InputAnalogActionHandle_t;
typedef uint64 ControllerHandle_t;
typedef uint64 ControllerActionSetHandle_t;
typedef uint64 ControllerDigitalActionHandle_t;
typedef uint64 ControllerAnalogActionHandle_t;
typedef uint64 UGCQueryHandle_t;
typedef uint64 UGCUpdateHandle_t;
typedef uint32 HHTMLBrowser;
typedef uint64 SteamItemInstanceID_t;
typedef int32 SteamItemDef_t;
typedef int32 SteamInventoryResult_t;
typedef uint64 SteamInventoryUpdateHandle_t;
// OpenVR Constants
int const_k_iSteamUserCallbacks = 100;
int const_k_iSteamGameServerCallbacks = 200;
int const_k_iSteamFriendsCallbacks = 300;
int const_k_iSteamBillingCallbacks = 400;
int const_k_iSteamMatchmakingCallbacks = 500;
int const_k_iSteamContentServerCallbacks = 600;
int const_k_iSteamUtilsCallbacks = 700;
int const_k_iClientFriendsCallbacks = 800;
int const_k_iClientUserCallbacks = 900;
int const_k_iSteamAppsCallbacks = 1000;
int const_k_iSteamUserStatsCallbacks = 1100;
int const_k_iSteamNetworkingCallbacks = 1200;
int const_k_iSteamNetworkingSocketsCallbacks = 1220;
int const_k_iSteamNetworkingMessagesCallbacks = 1250;
int const_k_iClientRemoteStorageCallbacks = 1300;
int const_k_iClientDepotBuilderCallbacks = 1400;
int const_k_iSteamGameServerItemsCallbacks = 1500;
int const_k_iClientUtilsCallbacks = 1600;
int const_k_iSteamGameCoordinatorCallbacks = 1700;
int const_k_iSteamGameServerStatsCallbacks = 1800;
int const_k_iSteam2AsyncCallbacks = 1900;
int const_k_iSteamGameStatsCallbacks = 2000;
int const_k_iClientHTTPCallbacks = 2100;
int const_k_iClientScreenshotsCallbacks = 2200;
int const_k_iSteamScreenshotsCallbacks = 2300;
int const_k_iClientAudioCallbacks = 2400;
int const_k_iClientUnifiedMessagesCallbacks = 2500;
int const_k_iSteamStreamLauncherCallbacks = 2600;
int const_k_iClientControllerCallbacks = 2700;
int const_k_iSteamControllerCallbacks = 2800;
int const_k_iClientParentalSettingsCallbacks = 2900;
int const_k_iClientDeviceAuthCallbacks = 3000;
int const_k_iClientNetworkDeviceManagerCallbacks = 3100;
int const_k_iClientMusicCallbacks = 3200;
int const_k_iClientRemoteClientManagerCallbacks = 3300;
int const_k_iClientUGCCallbacks = 3400;
int const_k_iSteamStreamClientCallbacks = 3500;
int const_k_IClientProductBuilderCallbacks = 3600;
int const_k_iClientShortcutsCallbacks = 3700;
int const_k_iClientRemoteControlManagerCallbacks = 3800;
int const_k_iSteamAppListCallbacks = 3900;
int const_k_iSteamMusicCallbacks = 4000;
int const_k_iSteamMusicRemoteCallbacks = 4100;
int const_k_iClientVRCallbacks = 4200;
int const_k_iClientGameNotificationCallbacks = 4300;
int const_k_iSteamGameNotificationCallbacks = 4400;
int const_k_iSteamHTMLSurfaceCallbacks = 4500;
int const_k_iClientVideoCallbacks = 4600;
int const_k_iClientInventoryCallbacks = 4700;
int const_k_iClientBluetoothManagerCallbacks = 4800;
int const_k_iClientSharedConnectionCallbacks = 4900;
int const_k_ISteamParentalSettingsCallbacks = 5000;
int const_k_iClientShaderCallbacks = 5100;
int const_k_iSteamGameSearchCallbacks = 5200;
int const_k_iSteamPartiesCallbacks = 5300;
int const_k_iClientPartiesCallbacks = 5400;
int const_k_cchPersonaNameMax = 128;
int const_k_cwchPersonaNameMax = 32;
int const_k_cchMaxRichPresenceKeys = 30;
int const_k_cchMaxRichPresenceKeyLength = 64;
int const_k_cchMaxRichPresenceValueLength = 256;
int const_k_cchStatNameMax = 128;
int const_k_cchLeaderboardNameMax = 128;
int const_k_cLeaderboardDetailsMax = 64;
unsigned long const_k_SteamItemInstanceIDInvalid = 0xffffffff;
int const_k_SteamInventoryResultInvalid = -1;
// OpenVR Enums
// OpenVR Structs
S_API HSteamPipe SteamAPI_ISteamClient_CreateSteamPipe(intptr_t instancePtr);
S_API bool SteamAPI_ISteamClient_BReleaseSteamPipe(intptr_t instancePtr, HSteamPipe hSteamPipe);
S_API HSteamUser SteamAPI_ISteamClient_ConnectToGlobalUser(intptr_t instancePtr, HSteamPipe hSteamPipe);
S_API HSteamUser SteamAPI_ISteamClient_CreateLocalUser(intptr_t instancePtr, HSteamPipe * phSteamPipe, EAccountType eAccountType);
S_API void SteamAPI_ISteamClient_ReleaseUser(intptr_t instancePtr, HSteamPipe hSteamPipe, HSteamUser hUser);
S_API class ISteamUser * SteamAPI_ISteamClient_GetISteamUser(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamGameServer * SteamAPI_ISteamClient_GetISteamGameServer(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API void SteamAPI_ISteamClient_SetLocalIPBinding(intptr_t instancePtr, uint32 unIP, uint16 usPort);
S_API class ISteamFriends * SteamAPI_ISteamClient_GetISteamFriends(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamUtils * SteamAPI_ISteamClient_GetISteamUtils(intptr_t instancePtr, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamMatchmaking * SteamAPI_ISteamClient_GetISteamMatchmaking(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamMatchmakingServers * SteamAPI_ISteamClient_GetISteamMatchmakingServers(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API void * SteamAPI_ISteamClient_GetISteamGenericInterface(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamUserStats * SteamAPI_ISteamClient_GetISteamUserStats(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamGameServerStats * SteamAPI_ISteamClient_GetISteamGameServerStats(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamApps * SteamAPI_ISteamClient_GetISteamApps(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamNetworking * SteamAPI_ISteamClient_GetISteamNetworking(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamRemoteStorage * SteamAPI_ISteamClient_GetISteamRemoteStorage(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamScreenshots * SteamAPI_ISteamClient_GetISteamScreenshots(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamGameSearch * SteamAPI_ISteamClient_GetISteamGameSearch(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API uint32 SteamAPI_ISteamClient_GetIPCCallCount(intptr_t instancePtr);
S_API void SteamAPI_ISteamClient_SetWarningMessageHook(intptr_t instancePtr, SteamAPIWarningMessageHook_t pFunction);
S_API bool SteamAPI_ISteamClient_BShutdownIfAllPipesClosed(intptr_t instancePtr);
S_API class ISteamHTTP * SteamAPI_ISteamClient_GetISteamHTTP(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamController * SteamAPI_ISteamClient_GetISteamController(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamUGC * SteamAPI_ISteamClient_GetISteamUGC(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamAppList * SteamAPI_ISteamClient_GetISteamAppList(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamMusic * SteamAPI_ISteamClient_GetISteamMusic(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamMusicRemote * SteamAPI_ISteamClient_GetISteamMusicRemote(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamHTMLSurface * SteamAPI_ISteamClient_GetISteamHTMLSurface(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamInventory * SteamAPI_ISteamClient_GetISteamInventory(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamVideo * SteamAPI_ISteamClient_GetISteamVideo(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamParentalSettings * SteamAPI_ISteamClient_GetISteamParentalSettings(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamInput * SteamAPI_ISteamClient_GetISteamInput(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamParties * SteamAPI_ISteamClient_GetISteamParties(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUser_BLoggedOn(intptr_t instancePtr);
S_API uint64 SteamAPI_ISteamUser_GetSteamID(intptr_t instancePtr);
S_API int SteamAPI_ISteamUser_InitiateGameConnection(intptr_t instancePtr, void * pAuthBlob, int cbMaxAuthBlob, class CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure);
S_API void SteamAPI_ISteamUser_TerminateGameConnection(intptr_t instancePtr, uint32 unIPServer, uint16 usPortServer);
S_API void SteamAPI_ISteamUser_TrackAppUsageEvent(intptr_t instancePtr, class CGameID gameID, int eAppUsageEvent, const char * pchExtraInfo);
S_API bool SteamAPI_ISteamUser_GetUserDataFolder(intptr_t instancePtr, char * pchBuffer, int cubBuffer);
S_API void SteamAPI_ISteamUser_StartVoiceRecording(intptr_t instancePtr);
S_API void SteamAPI_ISteamUser_StopVoiceRecording(intptr_t instancePtr);
S_API EVoiceResult SteamAPI_ISteamUser_GetAvailableVoice(intptr_t instancePtr, uint32 * pcbCompressed, uint32 * pcbUncompressed_Deprecated, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated);
S_API EVoiceResult SteamAPI_ISteamUser_GetVoice(intptr_t instancePtr, bool bWantCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, bool bWantUncompressed_Deprecated, void * pUncompressedDestBuffer_Deprecated, uint32 cbUncompressedDestBufferSize_Deprecated, uint32 * nUncompressBytesWritten_Deprecated, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated);
S_API EVoiceResult SteamAPI_ISteamUser_DecompressVoice(intptr_t instancePtr, const void * pCompressed, uint32 cbCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, uint32 nDesiredSampleRate);
S_API uint32 SteamAPI_ISteamUser_GetVoiceOptimalSampleRate(intptr_t instancePtr);
S_API HAuthTicket SteamAPI_ISteamUser_GetAuthSessionTicket(intptr_t instancePtr, void * pTicket, int cbMaxTicket, uint32 * pcbTicket);
S_API EBeginAuthSessionResult SteamAPI_ISteamUser_BeginAuthSession(intptr_t instancePtr, const void * pAuthTicket, int cbAuthTicket, class CSteamID steamID);
S_API void SteamAPI_ISteamUser_EndAuthSession(intptr_t instancePtr, class CSteamID steamID);
S_API void SteamAPI_ISteamUser_CancelAuthTicket(intptr_t instancePtr, HAuthTicket hAuthTicket);
S_API EUserHasLicenseForAppResult SteamAPI_ISteamUser_UserHasLicenseForApp(intptr_t instancePtr, class CSteamID steamID, AppId_t appID);
S_API bool SteamAPI_ISteamUser_BIsBehindNAT(intptr_t instancePtr);
S_API void SteamAPI_ISteamUser_AdvertiseGame(intptr_t instancePtr, class CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer);
S_API SteamAPICall_t SteamAPI_ISteamUser_RequestEncryptedAppTicket(intptr_t instancePtr, void * pDataToInclude, int cbDataToInclude);
S_API bool SteamAPI_ISteamUser_GetEncryptedAppTicket(intptr_t instancePtr, void * pTicket, int cbMaxTicket, uint32 * pcbTicket);
S_API int SteamAPI_ISteamUser_GetGameBadgeLevel(intptr_t instancePtr, int nSeries, bool bFoil);
S_API int SteamAPI_ISteamUser_GetPlayerSteamLevel(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamUser_RequestStoreAuthURL(intptr_t instancePtr, const char * pchRedirectURL);
S_API bool SteamAPI_ISteamUser_BIsPhoneVerified(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUser_BIsTwoFactorEnabled(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUser_BIsPhoneIdentifying(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUser_BIsPhoneRequiringVerification(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamUser_GetMarketEligibility(intptr_t instancePtr);
S_API const char * SteamAPI_ISteamFriends_GetPersonaName(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamFriends_SetPersonaName(intptr_t instancePtr, const char * pchPersonaName);
S_API EPersonaState SteamAPI_ISteamFriends_GetPersonaState(intptr_t instancePtr);
S_API int SteamAPI_ISteamFriends_GetFriendCount(intptr_t instancePtr, int iFriendFlags);
S_API uint64 SteamAPI_ISteamFriends_GetFriendByIndex(intptr_t instancePtr, int iFriend, int iFriendFlags);
S_API EFriendRelationship SteamAPI_ISteamFriends_GetFriendRelationship(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API EPersonaState SteamAPI_ISteamFriends_GetFriendPersonaState(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API const char * SteamAPI_ISteamFriends_GetFriendPersonaName(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API bool SteamAPI_ISteamFriends_GetFriendGamePlayed(intptr_t instancePtr, class CSteamID steamIDFriend, struct FriendGameInfo_t * pFriendGameInfo);
S_API const char * SteamAPI_ISteamFriends_GetFriendPersonaNameHistory(intptr_t instancePtr, class CSteamID steamIDFriend, int iPersonaName);
S_API int SteamAPI_ISteamFriends_GetFriendSteamLevel(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API const char * SteamAPI_ISteamFriends_GetPlayerNickname(intptr_t instancePtr, class CSteamID steamIDPlayer);
S_API int SteamAPI_ISteamFriends_GetFriendsGroupCount(intptr_t instancePtr);
S_API FriendsGroupID_t SteamAPI_ISteamFriends_GetFriendsGroupIDByIndex(intptr_t instancePtr, int iFG);
S_API const char * SteamAPI_ISteamFriends_GetFriendsGroupName(intptr_t instancePtr, FriendsGroupID_t friendsGroupID);
S_API int SteamAPI_ISteamFriends_GetFriendsGroupMembersCount(intptr_t instancePtr, FriendsGroupID_t friendsGroupID);
S_API void SteamAPI_ISteamFriends_GetFriendsGroupMembersList(intptr_t instancePtr, FriendsGroupID_t friendsGroupID, class CSteamID * pOutSteamIDMembers, int nMembersCount);
S_API bool SteamAPI_ISteamFriends_HasFriend(intptr_t instancePtr, class CSteamID steamIDFriend, int iFriendFlags);
S_API int SteamAPI_ISteamFriends_GetClanCount(intptr_t instancePtr);
S_API uint64 SteamAPI_ISteamFriends_GetClanByIndex(intptr_t instancePtr, int iClan);
S_API const char * SteamAPI_ISteamFriends_GetClanName(intptr_t instancePtr, class CSteamID steamIDClan);
S_API const char * SteamAPI_ISteamFriends_GetClanTag(intptr_t instancePtr, class CSteamID steamIDClan);
S_API bool SteamAPI_ISteamFriends_GetClanActivityCounts(intptr_t instancePtr, class CSteamID steamIDClan, int * pnOnline, int * pnInGame, int * pnChatting);
S_API SteamAPICall_t SteamAPI_ISteamFriends_DownloadClanActivityCounts(intptr_t instancePtr, class CSteamID * psteamIDClans, int cClansToRequest);
S_API int SteamAPI_ISteamFriends_GetFriendCountFromSource(intptr_t instancePtr, class CSteamID steamIDSource);
S_API uint64 SteamAPI_ISteamFriends_GetFriendFromSourceByIndex(intptr_t instancePtr, class CSteamID steamIDSource, int iFriend);
S_API bool SteamAPI_ISteamFriends_IsUserInSource(intptr_t instancePtr, class CSteamID steamIDUser, class CSteamID steamIDSource);
S_API void SteamAPI_ISteamFriends_SetInGameVoiceSpeaking(intptr_t instancePtr, class CSteamID steamIDUser, bool bSpeaking);
S_API void SteamAPI_ISteamFriends_ActivateGameOverlay(intptr_t instancePtr, const char * pchDialog);
S_API void SteamAPI_ISteamFriends_ActivateGameOverlayToUser(intptr_t instancePtr, const char * pchDialog, class CSteamID steamID);
S_API void SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(intptr_t instancePtr, const char * pchURL, EActivateGameOverlayToWebPageMode eMode);
S_API void SteamAPI_ISteamFriends_ActivateGameOverlayToStore(intptr_t instancePtr, AppId_t nAppID, EOverlayToStoreFlag eFlag);
S_API void SteamAPI_ISteamFriends_SetPlayedWith(intptr_t instancePtr, class CSteamID steamIDUserPlayedWith);
S_API void SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API int SteamAPI_ISteamFriends_GetSmallFriendAvatar(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API int SteamAPI_ISteamFriends_GetMediumFriendAvatar(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API int SteamAPI_ISteamFriends_GetLargeFriendAvatar(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API bool SteamAPI_ISteamFriends_RequestUserInformation(intptr_t instancePtr, class CSteamID steamIDUser, bool bRequireNameOnly);
S_API SteamAPICall_t SteamAPI_ISteamFriends_RequestClanOfficerList(intptr_t instancePtr, class CSteamID steamIDClan);
S_API uint64 SteamAPI_ISteamFriends_GetClanOwner(intptr_t instancePtr, class CSteamID steamIDClan);
S_API int SteamAPI_ISteamFriends_GetClanOfficerCount(intptr_t instancePtr, class CSteamID steamIDClan);
S_API uint64 SteamAPI_ISteamFriends_GetClanOfficerByIndex(intptr_t instancePtr, class CSteamID steamIDClan, int iOfficer);
S_API uint32 SteamAPI_ISteamFriends_GetUserRestrictions(intptr_t instancePtr);
S_API bool SteamAPI_ISteamFriends_SetRichPresence(intptr_t instancePtr, const char * pchKey, const char * pchValue);
S_API void SteamAPI_ISteamFriends_ClearRichPresence(intptr_t instancePtr);
S_API const char * SteamAPI_ISteamFriends_GetFriendRichPresence(intptr_t instancePtr, class CSteamID steamIDFriend, const char * pchKey);
S_API int SteamAPI_ISteamFriends_GetFriendRichPresenceKeyCount(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API const char * SteamAPI_ISteamFriends_GetFriendRichPresenceKeyByIndex(intptr_t instancePtr, class CSteamID steamIDFriend, int iKey);
S_API void SteamAPI_ISteamFriends_RequestFriendRichPresence(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API bool SteamAPI_ISteamFriends_InviteUserToGame(intptr_t instancePtr, class CSteamID steamIDFriend, const char * pchConnectString);
S_API int SteamAPI_ISteamFriends_GetCoplayFriendCount(intptr_t instancePtr);
S_API uint64 SteamAPI_ISteamFriends_GetCoplayFriend(intptr_t instancePtr, int iCoplayFriend);
S_API int SteamAPI_ISteamFriends_GetFriendCoplayTime(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API AppId_t SteamAPI_ISteamFriends_GetFriendCoplayGame(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API SteamAPICall_t SteamAPI_ISteamFriends_JoinClanChatRoom(intptr_t instancePtr, class CSteamID steamIDClan);
S_API bool SteamAPI_ISteamFriends_LeaveClanChatRoom(intptr_t instancePtr, class CSteamID steamIDClan);
S_API int SteamAPI_ISteamFriends_GetClanChatMemberCount(intptr_t instancePtr, class CSteamID steamIDClan);
S_API uint64 SteamAPI_ISteamFriends_GetChatMemberByIndex(intptr_t instancePtr, class CSteamID steamIDClan, int iUser);
S_API bool SteamAPI_ISteamFriends_SendClanChatMessage(intptr_t instancePtr, class CSteamID steamIDClanChat, const char * pchText);
S_API int SteamAPI_ISteamFriends_GetClanChatMessage(intptr_t instancePtr, class CSteamID steamIDClanChat, int iMessage, void * prgchText, int cchTextMax, EChatEntryType * peChatEntryType, class CSteamID * psteamidChatter);
S_API bool SteamAPI_ISteamFriends_IsClanChatAdmin(intptr_t instancePtr, class CSteamID steamIDClanChat, class CSteamID steamIDUser);
S_API bool SteamAPI_ISteamFriends_IsClanChatWindowOpenInSteam(intptr_t instancePtr, class CSteamID steamIDClanChat);
S_API bool SteamAPI_ISteamFriends_OpenClanChatWindowInSteam(intptr_t instancePtr, class CSteamID steamIDClanChat);
S_API bool SteamAPI_ISteamFriends_CloseClanChatWindowInSteam(intptr_t instancePtr, class CSteamID steamIDClanChat);
S_API bool SteamAPI_ISteamFriends_SetListenForFriendsMessages(intptr_t instancePtr, bool bInterceptEnabled);
S_API bool SteamAPI_ISteamFriends_ReplyToFriendMessage(intptr_t instancePtr, class CSteamID steamIDFriend, const char * pchMsgToSend);
S_API int SteamAPI_ISteamFriends_GetFriendMessage(intptr_t instancePtr, class CSteamID steamIDFriend, int iMessageID, void * pvData, int cubData, EChatEntryType * peChatEntryType);
S_API SteamAPICall_t SteamAPI_ISteamFriends_GetFollowerCount(intptr_t instancePtr, class CSteamID steamID);
S_API SteamAPICall_t SteamAPI_ISteamFriends_IsFollowing(intptr_t instancePtr, class CSteamID steamID);
S_API SteamAPICall_t SteamAPI_ISteamFriends_EnumerateFollowingList(intptr_t instancePtr, uint32 unStartIndex);
S_API bool SteamAPI_ISteamFriends_IsClanPublic(intptr_t instancePtr, class CSteamID steamIDClan);
S_API bool SteamAPI_ISteamFriends_IsClanOfficialGameGroup(intptr_t instancePtr, class CSteamID steamIDClan);
S_API int SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamUtils_GetSecondsSinceAppActive(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamUtils_GetSecondsSinceComputerActive(intptr_t instancePtr);
S_API EUniverse SteamAPI_ISteamUtils_GetConnectedUniverse(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamUtils_GetServerRealTime(intptr_t instancePtr);
S_API const char * SteamAPI_ISteamUtils_GetIPCountry(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUtils_GetImageSize(intptr_t instancePtr, int iImage, uint32 * pnWidth, uint32 * pnHeight);
S_API bool SteamAPI_ISteamUtils_GetImageRGBA(intptr_t instancePtr, int iImage, uint8 * pubDest, int nDestBufferSize);
S_API bool SteamAPI_ISteamUtils_GetCSERIPPort(intptr_t instancePtr, uint32 * unIP, uint16 * usPort);
S_API uint8 SteamAPI_ISteamUtils_GetCurrentBatteryPower(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamUtils_GetAppID(intptr_t instancePtr);
S_API void SteamAPI_ISteamUtils_SetOverlayNotificationPosition(intptr_t instancePtr, ENotificationPosition eNotificationPosition);
S_API bool SteamAPI_ISteamUtils_IsAPICallCompleted(intptr_t instancePtr, SteamAPICall_t hSteamAPICall, bool * pbFailed);
S_API ESteamAPICallFailure SteamAPI_ISteamUtils_GetAPICallFailureReason(intptr_t instancePtr, SteamAPICall_t hSteamAPICall);
S_API bool SteamAPI_ISteamUtils_GetAPICallResult(intptr_t instancePtr, SteamAPICall_t hSteamAPICall, void * pCallback, int cubCallback, int iCallbackExpected, bool * pbFailed);
S_API uint32 SteamAPI_ISteamUtils_GetIPCCallCount(intptr_t instancePtr);
S_API void SteamAPI_ISteamUtils_SetWarningMessageHook(intptr_t instancePtr, SteamAPIWarningMessageHook_t pFunction);
S_API bool SteamAPI_ISteamUtils_IsOverlayEnabled(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUtils_BOverlayNeedsPresent(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamUtils_CheckFileSignature(intptr_t instancePtr, const char * szFileName);
S_API bool SteamAPI_ISteamUtils_ShowGamepadTextInput(intptr_t instancePtr, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32 unCharMax, const char * pchExistingText);
S_API uint32 SteamAPI_ISteamUtils_GetEnteredGamepadTextLength(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUtils_GetEnteredGamepadTextInput(intptr_t instancePtr, char * pchText, uint32 cchText);
S_API const char * SteamAPI_ISteamUtils_GetSteamUILanguage(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUtils_IsSteamRunningInVR(intptr_t instancePtr);
S_API void SteamAPI_ISteamUtils_SetOverlayNotificationInset(intptr_t instancePtr, int nHorizontalInset, int nVerticalInset);
S_API bool SteamAPI_ISteamUtils_IsSteamInBigPictureMode(intptr_t instancePtr);
S_API void SteamAPI_ISteamUtils_StartVRDashboard(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUtils_IsVRHeadsetStreamingEnabled(intptr_t instancePtr);
S_API void SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled(intptr_t instancePtr, bool bEnabled);
S_API int SteamAPI_ISteamMatchmaking_GetFavoriteGameCount(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMatchmaking_GetFavoriteGame(intptr_t instancePtr, int iGame, AppId_t * pnAppID, uint32 * pnIP, uint16 * pnConnPort, uint16 * pnQueryPort, uint32 * punFlags, uint32 * pRTime32LastPlayedOnServer);
S_API int SteamAPI_ISteamMatchmaking_AddFavoriteGame(intptr_t instancePtr, AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer);
S_API bool SteamAPI_ISteamMatchmaking_RemoveFavoriteGame(intptr_t instancePtr, AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags);
S_API SteamAPICall_t SteamAPI_ISteamMatchmaking_RequestLobbyList(intptr_t instancePtr);
S_API void SteamAPI_ISteamMatchmaking_AddRequestLobbyListStringFilter(intptr_t instancePtr, const char * pchKeyToMatch, const char * pchValueToMatch, ELobbyComparison eComparisonType);
S_API void SteamAPI_ISteamMatchmaking_AddRequestLobbyListNumericalFilter(intptr_t instancePtr, const char * pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType);
S_API void SteamAPI_ISteamMatchmaking_AddRequestLobbyListNearValueFilter(intptr_t instancePtr, const char * pchKeyToMatch, int nValueToBeCloseTo);
S_API void SteamAPI_ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable(intptr_t instancePtr, int nSlotsAvailable);
S_API void SteamAPI_ISteamMatchmaking_AddRequestLobbyListDistanceFilter(intptr_t instancePtr, ELobbyDistanceFilter eLobbyDistanceFilter);
S_API void SteamAPI_ISteamMatchmaking_AddRequestLobbyListResultCountFilter(intptr_t instancePtr, int cMaxResults);
S_API void SteamAPI_ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API uint64 SteamAPI_ISteamMatchmaking_GetLobbyByIndex(intptr_t instancePtr, int iLobby);
S_API SteamAPICall_t SteamAPI_ISteamMatchmaking_CreateLobby(intptr_t instancePtr, ELobbyType eLobbyType, int cMaxMembers);
S_API SteamAPICall_t SteamAPI_ISteamMatchmaking_JoinLobby(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API void SteamAPI_ISteamMatchmaking_LeaveLobby(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API bool SteamAPI_ISteamMatchmaking_InviteUserToLobby(intptr_t instancePtr, class CSteamID steamIDLobby, class CSteamID steamIDInvitee);
S_API int SteamAPI_ISteamMatchmaking_GetNumLobbyMembers(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API uint64 SteamAPI_ISteamMatchmaking_GetLobbyMemberByIndex(intptr_t instancePtr, class CSteamID steamIDLobby, int iMember);
S_API const char * SteamAPI_ISteamMatchmaking_GetLobbyData(intptr_t instancePtr, class CSteamID steamIDLobby, const char * pchKey);
S_API bool SteamAPI_ISteamMatchmaking_SetLobbyData(intptr_t instancePtr, class CSteamID steamIDLobby, const char * pchKey, const char * pchValue);
S_API int SteamAPI_ISteamMatchmaking_GetLobbyDataCount(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API bool SteamAPI_ISteamMatchmaking_GetLobbyDataByIndex(intptr_t instancePtr, class CSteamID steamIDLobby, int iLobbyData, char * pchKey, int cchKeyBufferSize, char * pchValue, int cchValueBufferSize);
S_API bool SteamAPI_ISteamMatchmaking_DeleteLobbyData(intptr_t instancePtr, class CSteamID steamIDLobby, const char * pchKey);
S_API const char * SteamAPI_ISteamMatchmaking_GetLobbyMemberData(intptr_t instancePtr, class CSteamID steamIDLobby, class CSteamID steamIDUser, const char * pchKey);
S_API void SteamAPI_ISteamMatchmaking_SetLobbyMemberData(intptr_t instancePtr, class CSteamID steamIDLobby, const char * pchKey, const char * pchValue);
S_API bool SteamAPI_ISteamMatchmaking_SendLobbyChatMsg(intptr_t instancePtr, class CSteamID steamIDLobby, const void * pvMsgBody, int cubMsgBody);
S_API int SteamAPI_ISteamMatchmaking_GetLobbyChatEntry(intptr_t instancePtr, class CSteamID steamIDLobby, int iChatID, class CSteamID * pSteamIDUser, void * pvData, int cubData, EChatEntryType * peChatEntryType);
S_API bool SteamAPI_ISteamMatchmaking_RequestLobbyData(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API void SteamAPI_ISteamMatchmaking_SetLobbyGameServer(intptr_t instancePtr, class CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, class CSteamID steamIDGameServer);
S_API bool SteamAPI_ISteamMatchmaking_GetLobbyGameServer(intptr_t instancePtr, class CSteamID steamIDLobby, uint32 * punGameServerIP, uint16 * punGameServerPort, class CSteamID * psteamIDGameServer);
S_API bool SteamAPI_ISteamMatchmaking_SetLobbyMemberLimit(intptr_t instancePtr, class CSteamID steamIDLobby, int cMaxMembers);
S_API int SteamAPI_ISteamMatchmaking_GetLobbyMemberLimit(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API bool SteamAPI_ISteamMatchmaking_SetLobbyType(intptr_t instancePtr, class CSteamID steamIDLobby, ELobbyType eLobbyType);
S_API bool SteamAPI_ISteamMatchmaking_SetLobbyJoinable(intptr_t instancePtr, class CSteamID steamIDLobby, bool bLobbyJoinable);
S_API uint64 SteamAPI_ISteamMatchmaking_GetLobbyOwner(intptr_t instancePtr, class CSteamID steamIDLobby);
S_API bool SteamAPI_ISteamMatchmaking_SetLobbyOwner(intptr_t instancePtr, class CSteamID steamIDLobby, class CSteamID steamIDNewOwner);
S_API bool SteamAPI_ISteamMatchmaking_SetLinkedLobby(intptr_t instancePtr, class CSteamID steamIDLobby, class CSteamID steamIDLobbyDependent);
S_API void SteamAPI_ISteamMatchmakingServerListResponse_ServerResponded(intptr_t instancePtr, HServerListRequest hRequest, int iServer);
S_API void SteamAPI_ISteamMatchmakingServerListResponse_ServerFailedToRespond(intptr_t instancePtr, HServerListRequest hRequest, int iServer);
S_API void SteamAPI_ISteamMatchmakingServerListResponse_RefreshComplete(intptr_t instancePtr, HServerListRequest hRequest, EMatchMakingServerResponse response);
S_API void SteamAPI_ISteamMatchmakingPingResponse_ServerResponded(intptr_t instancePtr, class gameserveritem_t & server);
S_API void SteamAPI_ISteamMatchmakingPingResponse_ServerFailedToRespond(intptr_t instancePtr);
S_API void SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList(intptr_t instancePtr, const char * pchName, int nScore, float flTimePlayed);
S_API void SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond(intptr_t instancePtr);
S_API void SteamAPI_ISteamMatchmakingPlayersResponse_PlayersRefreshComplete(intptr_t instancePtr);
S_API void SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded(intptr_t instancePtr, const char * pchRule, const char * pchValue);
S_API void SteamAPI_ISteamMatchmakingRulesResponse_RulesFailedToRespond(intptr_t instancePtr);
S_API void SteamAPI_ISteamMatchmakingRulesResponse_RulesRefreshComplete(intptr_t instancePtr);
S_API HServerListRequest SteamAPI_ISteamMatchmakingServers_RequestInternetServerList(intptr_t instancePtr, AppId_t iApp, struct MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, class ISteamMatchmakingServerListResponse * pRequestServersResponse);
S_API HServerListRequest SteamAPI_ISteamMatchmakingServers_RequestLANServerList(intptr_t instancePtr, AppId_t iApp, class ISteamMatchmakingServerListResponse * pRequestServersResponse);
S_API HServerListRequest SteamAPI_ISteamMatchmakingServers_RequestFriendsServerList(intptr_t instancePtr, AppId_t iApp, struct MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, class ISteamMatchmakingServerListResponse * pRequestServersResponse);
S_API HServerListRequest SteamAPI_ISteamMatchmakingServers_RequestFavoritesServerList(intptr_t instancePtr, AppId_t iApp, struct MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, class ISteamMatchmakingServerListResponse * pRequestServersResponse);
S_API HServerListRequest SteamAPI_ISteamMatchmakingServers_RequestHistoryServerList(intptr_t instancePtr, AppId_t iApp, struct MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, class ISteamMatchmakingServerListResponse * pRequestServersResponse);
S_API HServerListRequest SteamAPI_ISteamMatchmakingServers_RequestSpectatorServerList(intptr_t instancePtr, AppId_t iApp, struct MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, class ISteamMatchmakingServerListResponse * pRequestServersResponse);
S_API void SteamAPI_ISteamMatchmakingServers_ReleaseRequest(intptr_t instancePtr, HServerListRequest hServerListRequest);
S_API class gameserveritem_t * SteamAPI_ISteamMatchmakingServers_GetServerDetails(intptr_t instancePtr, HServerListRequest hRequest, int iServer);
S_API void SteamAPI_ISteamMatchmakingServers_CancelQuery(intptr_t instancePtr, HServerListRequest hRequest);
S_API void SteamAPI_ISteamMatchmakingServers_RefreshQuery(intptr_t instancePtr, HServerListRequest hRequest);
S_API bool SteamAPI_ISteamMatchmakingServers_IsRefreshing(intptr_t instancePtr, HServerListRequest hRequest);
S_API int SteamAPI_ISteamMatchmakingServers_GetServerCount(intptr_t instancePtr, HServerListRequest hRequest);
S_API void SteamAPI_ISteamMatchmakingServers_RefreshServer(intptr_t instancePtr, HServerListRequest hRequest, int iServer);
S_API HServerQuery SteamAPI_ISteamMatchmakingServers_PingServer(intptr_t instancePtr, uint32 unIP, uint16 usPort, class ISteamMatchmakingPingResponse * pRequestServersResponse);
S_API HServerQuery SteamAPI_ISteamMatchmakingServers_PlayerDetails(intptr_t instancePtr, uint32 unIP, uint16 usPort, class ISteamMatchmakingPlayersResponse * pRequestServersResponse);
S_API HServerQuery SteamAPI_ISteamMatchmakingServers_ServerRules(intptr_t instancePtr, uint32 unIP, uint16 usPort, class ISteamMatchmakingRulesResponse * pRequestServersResponse);
S_API void SteamAPI_ISteamMatchmakingServers_CancelServerQuery(intptr_t instancePtr, HServerQuery hServerQuery);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_AddGameSearchParams(intptr_t instancePtr, const char * pchKeyToFind, const char * pchValuesToFind);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SearchForGameWithLobby(intptr_t instancePtr, class CSteamID steamIDLobby, int nPlayerMin, int nPlayerMax);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SearchForGameSolo(intptr_t instancePtr, int nPlayerMin, int nPlayerMax);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_AcceptGame(intptr_t instancePtr);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_DeclineGame(intptr_t instancePtr);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_RetrieveConnectionDetails(intptr_t instancePtr, class CSteamID steamIDHost, char * pchConnectionDetails, int cubConnectionDetails);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_EndGameSearch(intptr_t instancePtr);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SetGameHostParams(intptr_t instancePtr, const char * pchKey, const char * pchValue);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SetConnectionDetails(intptr_t instancePtr, const char * pchConnectionDetails, int cubConnectionDetails);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_RequestPlayersForGame(intptr_t instancePtr, int nPlayerMin, int nPlayerMax, int nMaxTeamSize);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_HostConfirmGameStart(intptr_t instancePtr, uint64 ullUniqueGameID);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame(intptr_t instancePtr);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SubmitPlayerResult(intptr_t instancePtr, uint64 ullUniqueGameID, class CSteamID steamIDPlayer, EPlayerResult_t EPlayerResult);
S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_EndGame(intptr_t instancePtr, uint64 ullUniqueGameID);
S_API uint32 SteamAPI_ISteamParties_GetNumActiveBeacons(intptr_t instancePtr);
S_API PartyBeaconID_t SteamAPI_ISteamParties_GetBeaconByIndex(intptr_t instancePtr, uint32 unIndex);
S_API bool SteamAPI_ISteamParties_GetBeaconDetails(intptr_t instancePtr, PartyBeaconID_t ulBeaconID, class CSteamID * pSteamIDBeaconOwner, struct SteamPartyBeaconLocation_t * pLocation, char * pchMetadata, int cchMetadata);
S_API SteamAPICall_t SteamAPI_ISteamParties_JoinParty(intptr_t instancePtr, PartyBeaconID_t ulBeaconID);
S_API bool SteamAPI_ISteamParties_GetNumAvailableBeaconLocations(intptr_t instancePtr, uint32 * puNumLocations);
S_API bool SteamAPI_ISteamParties_GetAvailableBeaconLocations(intptr_t instancePtr, struct SteamPartyBeaconLocation_t * pLocationList, uint32 uMaxNumLocations);
S_API SteamAPICall_t SteamAPI_ISteamParties_CreateBeacon(intptr_t instancePtr, uint32 unOpenSlots, struct SteamPartyBeaconLocation_t * pBeaconLocation, const char * pchConnectString, const char * pchMetadata);
S_API void SteamAPI_ISteamParties_OnReservationCompleted(intptr_t instancePtr, PartyBeaconID_t ulBeacon, class CSteamID steamIDUser);
S_API void SteamAPI_ISteamParties_CancelReservation(intptr_t instancePtr, PartyBeaconID_t ulBeacon, class CSteamID steamIDUser);
S_API SteamAPICall_t SteamAPI_ISteamParties_ChangeNumOpenSlots(intptr_t instancePtr, PartyBeaconID_t ulBeacon, uint32 unOpenSlots);
S_API bool SteamAPI_ISteamParties_DestroyBeacon(intptr_t instancePtr, PartyBeaconID_t ulBeacon);
S_API bool SteamAPI_ISteamParties_GetBeaconLocationData(intptr_t instancePtr, struct SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, char * pchDataStringOut, int cchDataStringOut);
S_API bool SteamAPI_ISteamRemoteStorage_FileWrite(intptr_t instancePtr, const char * pchFile, const void * pvData, int32 cubData);
S_API int32 SteamAPI_ISteamRemoteStorage_FileRead(intptr_t instancePtr, const char * pchFile, void * pvData, int32 cubDataToRead);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileWriteAsync(intptr_t instancePtr, const char * pchFile, const void * pvData, uint32 cubData);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileReadAsync(intptr_t instancePtr, const char * pchFile, uint32 nOffset, uint32 cubToRead);
S_API bool SteamAPI_ISteamRemoteStorage_FileReadAsyncComplete(intptr_t instancePtr, SteamAPICall_t hReadCall, void * pvBuffer, uint32 cubToRead);
S_API bool SteamAPI_ISteamRemoteStorage_FileForget(intptr_t instancePtr, const char * pchFile);
S_API bool SteamAPI_ISteamRemoteStorage_FileDelete(intptr_t instancePtr, const char * pchFile);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileShare(intptr_t instancePtr, const char * pchFile);
S_API bool SteamAPI_ISteamRemoteStorage_SetSyncPlatforms(intptr_t instancePtr, const char * pchFile, ERemoteStoragePlatform eRemoteStoragePlatform);
S_API UGCFileWriteStreamHandle_t SteamAPI_ISteamRemoteStorage_FileWriteStreamOpen(intptr_t instancePtr, const char * pchFile);
S_API bool SteamAPI_ISteamRemoteStorage_FileWriteStreamWriteChunk(intptr_t instancePtr, UGCFileWriteStreamHandle_t writeHandle, const void * pvData, int32 cubData);
S_API bool SteamAPI_ISteamRemoteStorage_FileWriteStreamClose(intptr_t instancePtr, UGCFileWriteStreamHandle_t writeHandle);
S_API bool SteamAPI_ISteamRemoteStorage_FileWriteStreamCancel(intptr_t instancePtr, UGCFileWriteStreamHandle_t writeHandle);
S_API bool SteamAPI_ISteamRemoteStorage_FileExists(intptr_t instancePtr, const char * pchFile);
S_API bool SteamAPI_ISteamRemoteStorage_FilePersisted(intptr_t instancePtr, const char * pchFile);
S_API int32 SteamAPI_ISteamRemoteStorage_GetFileSize(intptr_t instancePtr, const char * pchFile);
S_API int64 SteamAPI_ISteamRemoteStorage_GetFileTimestamp(intptr_t instancePtr, const char * pchFile);
S_API ERemoteStoragePlatform SteamAPI_ISteamRemoteStorage_GetSyncPlatforms(intptr_t instancePtr, const char * pchFile);
S_API int32 SteamAPI_ISteamRemoteStorage_GetFileCount(intptr_t instancePtr);
S_API const char * SteamAPI_ISteamRemoteStorage_GetFileNameAndSize(intptr_t instancePtr, int iFile, int32 * pnFileSizeInBytes);
S_API bool SteamAPI_ISteamRemoteStorage_GetQuota(intptr_t instancePtr, uint64 * pnTotalBytes, uint64 * puAvailableBytes);
S_API bool SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount(intptr_t instancePtr);
S_API bool SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp(intptr_t instancePtr);
S_API void SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp(intptr_t instancePtr, bool bEnabled);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownload(intptr_t instancePtr, UGCHandle_t hContent, uint32 unPriority);
S_API bool SteamAPI_ISteamRemoteStorage_GetUGCDownloadProgress(intptr_t instancePtr, UGCHandle_t hContent, int32 * pnBytesDownloaded, int32 * pnBytesExpected);
S_API bool SteamAPI_ISteamRemoteStorage_GetUGCDetails(intptr_t instancePtr, UGCHandle_t hContent, AppId_t * pnAppID, char ** ppchName, int32 * pnFileSizeInBytes, class CSteamID * pSteamIDOwner);
S_API int32 SteamAPI_ISteamRemoteStorage_UGCRead(intptr_t instancePtr, UGCHandle_t hContent, void * pvData, int32 cubDataToRead, uint32 cOffset, EUGCReadAction eAction);
S_API int32 SteamAPI_ISteamRemoteStorage_GetCachedUGCCount(intptr_t instancePtr);
S_API UGCHandle_t SteamAPI_ISteamRemoteStorage_GetCachedUGCHandle(intptr_t instancePtr, int32 iCachedContent);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_PublishWorkshopFile(intptr_t instancePtr, const char * pchFile, const char * pchPreviewFile, AppId_t nConsumerAppId, const char * pchTitle, const char * pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, struct SteamParamStringArray_t * pTags, EWorkshopFileType eWorkshopFileType);
S_API PublishedFileUpdateHandle_t SteamAPI_ISteamRemoteStorage_CreatePublishedFileUpdateRequest(intptr_t instancePtr, PublishedFileId_t unPublishedFileId);
S_API bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileFile(intptr_t instancePtr, PublishedFileUpdateHandle_t updateHandle, const char * pchFile);
S_API bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFilePreviewFile(intptr_t instancePtr, PublishedFileUpdateHandle_t updateHandle, const char * pchPreviewFile);
S_API bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileTitle(intptr_t instancePtr, PublishedFileUpdateHandle_t updateHandle, const char * pchTitle);
S_API bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileDescription(intptr_t instancePtr, PublishedFileUpdateHandle_t updateHandle, const char * pchDescription);
S_API bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileVisibility(intptr_t instancePtr, PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility);
S_API bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileTags(intptr_t instancePtr, PublishedFileUpdateHandle_t updateHandle, struct SteamParamStringArray_t * pTags);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_CommitPublishedFileUpdate(intptr_t instancePtr, PublishedFileUpdateHandle_t updateHandle);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_GetPublishedFileDetails(intptr_t instancePtr, PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_DeletePublishedFile(intptr_t instancePtr, PublishedFileId_t unPublishedFileId);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumerateUserPublishedFiles(intptr_t instancePtr, uint32 unStartIndex);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_SubscribePublishedFile(intptr_t instancePtr, PublishedFileId_t unPublishedFileId);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumerateUserSubscribedFiles(intptr_t instancePtr, uint32 unStartIndex);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UnsubscribePublishedFile(intptr_t instancePtr, PublishedFileId_t unPublishedFileId);
S_API bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription(intptr_t instancePtr, PublishedFileUpdateHandle_t updateHandle, const char * pchChangeDescription);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_GetPublishedItemVoteDetails(intptr_t instancePtr, PublishedFileId_t unPublishedFileId);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UpdateUserPublishedItemVote(intptr_t instancePtr, PublishedFileId_t unPublishedFileId, bool bVoteUp);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_GetUserPublishedItemVoteDetails(intptr_t instancePtr, PublishedFileId_t unPublishedFileId);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles(intptr_t instancePtr, class CSteamID steamId, uint32 unStartIndex, struct SteamParamStringArray_t * pRequiredTags, struct SteamParamStringArray_t * pExcludedTags);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_PublishVideo(intptr_t instancePtr, EWorkshopVideoProvider eVideoProvider, const char * pchVideoAccount, const char * pchVideoIdentifier, const char * pchPreviewFile, AppId_t nConsumerAppId, const char * pchTitle, const char * pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, struct SteamParamStringArray_t * pTags);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_SetUserPublishedFileAction(intptr_t instancePtr, PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedFilesByUserAction(intptr_t instancePtr, EWorkshopFileAction eAction, uint32 unStartIndex);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedWorkshopFiles(intptr_t instancePtr, EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, struct SteamParamStringArray_t * pTags, struct SteamParamStringArray_t * pUserTags);
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation(intptr_t instancePtr, UGCHandle_t hContent, const char * pchLocation, uint32 unPriority);
S_API bool SteamAPI_ISteamUserStats_RequestCurrentStats(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUserStats_GetStat(intptr_t instancePtr, const char * pchName, int32 * pData);
S_API bool SteamAPI_ISteamUserStats_GetStat0(intptr_t instancePtr, const char * pchName, float * pData);
S_API bool SteamAPI_ISteamUserStats_SetStat(intptr_t instancePtr, const char * pchName, int32 nData);
S_API bool SteamAPI_ISteamUserStats_SetStat0(intptr_t instancePtr, const char * pchName, float fData);
S_API bool SteamAPI_ISteamUserStats_UpdateAvgRateStat(intptr_t instancePtr, const char * pchName, float flCountThisSession, double dSessionLength);
S_API bool SteamAPI_ISteamUserStats_GetAchievement(intptr_t instancePtr, const char * pchName, bool * pbAchieved);
S_API bool SteamAPI_ISteamUserStats_SetAchievement(intptr_t instancePtr, const char * pchName);
S_API bool SteamAPI_ISteamUserStats_ClearAchievement(intptr_t instancePtr, const char * pchName);
S_API bool SteamAPI_ISteamUserStats_GetAchievementAndUnlockTime(intptr_t instancePtr, const char * pchName, bool * pbAchieved, uint32 * punUnlockTime);
S_API bool SteamAPI_ISteamUserStats_StoreStats(intptr_t instancePtr);
S_API int SteamAPI_ISteamUserStats_GetAchievementIcon(intptr_t instancePtr, const char * pchName);
S_API const char * SteamAPI_ISteamUserStats_GetAchievementDisplayAttribute(intptr_t instancePtr, const char * pchName, const char * pchKey);
S_API bool SteamAPI_ISteamUserStats_IndicateAchievementProgress(intptr_t instancePtr, const char * pchName, uint32 nCurProgress, uint32 nMaxProgress);
S_API uint32 SteamAPI_ISteamUserStats_GetNumAchievements(intptr_t instancePtr);
S_API const char * SteamAPI_ISteamUserStats_GetAchievementName(intptr_t instancePtr, uint32 iAchievement);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_RequestUserStats(intptr_t instancePtr, class CSteamID steamIDUser);
S_API bool SteamAPI_ISteamUserStats_GetUserStat(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, int32 * pData);
S_API bool SteamAPI_ISteamUserStats_GetUserStat0(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, float * pData);
S_API bool SteamAPI_ISteamUserStats_GetUserAchievement(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, bool * pbAchieved);
S_API bool SteamAPI_ISteamUserStats_GetUserAchievementAndUnlockTime(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, bool * pbAchieved, uint32 * punUnlockTime);
S_API bool SteamAPI_ISteamUserStats_ResetAllStats(intptr_t instancePtr, bool bAchievementsToo);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_FindOrCreateLeaderboard(intptr_t instancePtr, const char * pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_FindLeaderboard(intptr_t instancePtr, const char * pchLeaderboardName);
S_API const char * SteamAPI_ISteamUserStats_GetLeaderboardName(intptr_t instancePtr, SteamLeaderboard_t hSteamLeaderboard);
S_API int SteamAPI_ISteamUserStats_GetLeaderboardEntryCount(intptr_t instancePtr, SteamLeaderboard_t hSteamLeaderboard);
S_API ELeaderboardSortMethod SteamAPI_ISteamUserStats_GetLeaderboardSortMethod(intptr_t instancePtr, SteamLeaderboard_t hSteamLeaderboard);
S_API ELeaderboardDisplayType SteamAPI_ISteamUserStats_GetLeaderboardDisplayType(intptr_t instancePtr, SteamLeaderboard_t hSteamLeaderboard);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_DownloadLeaderboardEntries(intptr_t instancePtr, SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_DownloadLeaderboardEntriesForUsers(intptr_t instancePtr, SteamLeaderboard_t hSteamLeaderboard, class CSteamID * prgUsers, int cUsers);
S_API bool SteamAPI_ISteamUserStats_GetDownloadedLeaderboardEntry(intptr_t instancePtr, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, struct LeaderboardEntry_t * pLeaderboardEntry, int32 * pDetails, int cDetailsMax);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_UploadLeaderboardScore(intptr_t instancePtr, SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 * pScoreDetails, int cScoreDetailsCount);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_AttachLeaderboardUGC(intptr_t instancePtr, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_GetNumberOfCurrentPlayers(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_RequestGlobalAchievementPercentages(intptr_t instancePtr);
S_API int SteamAPI_ISteamUserStats_GetMostAchievedAchievementInfo(intptr_t instancePtr, char * pchName, uint32 unNameBufLen, float * pflPercent, bool * pbAchieved);
S_API int SteamAPI_ISteamUserStats_GetNextMostAchievedAchievementInfo(intptr_t instancePtr, int iIteratorPrevious, char * pchName, uint32 unNameBufLen, float * pflPercent, bool * pbAchieved);
S_API bool SteamAPI_ISteamUserStats_GetAchievementAchievedPercent(intptr_t instancePtr, const char * pchName, float * pflPercent);
S_API SteamAPICall_t SteamAPI_ISteamUserStats_RequestGlobalStats(intptr_t instancePtr, int nHistoryDays);
S_API bool SteamAPI_ISteamUserStats_GetGlobalStat(intptr_t instancePtr, const char * pchStatName, int64 * pData);
S_API bool SteamAPI_ISteamUserStats_GetGlobalStat0(intptr_t instancePtr, const char * pchStatName, double * pData);
S_API int32 SteamAPI_ISteamUserStats_GetGlobalStatHistory(intptr_t instancePtr, const char * pchStatName, int64 * pData, uint32 cubData);
S_API int32 SteamAPI_ISteamUserStats_GetGlobalStatHistory0(intptr_t instancePtr, const char * pchStatName, double * pData, uint32 cubData);
S_API bool SteamAPI_ISteamApps_BIsSubscribed(intptr_t instancePtr);
S_API bool SteamAPI_ISteamApps_BIsLowViolence(intptr_t instancePtr);
S_API bool SteamAPI_ISteamApps_BIsCybercafe(intptr_t instancePtr);
S_API bool SteamAPI_ISteamApps_BIsVACBanned(intptr_t instancePtr);
S_API const char * SteamAPI_ISteamApps_GetCurrentGameLanguage(intptr_t instancePtr);
S_API const char * SteamAPI_ISteamApps_GetAvailableGameLanguages(intptr_t instancePtr);
S_API bool SteamAPI_ISteamApps_BIsSubscribedApp(intptr_t instancePtr, AppId_t appID);
S_API bool SteamAPI_ISteamApps_BIsDlcInstalled(intptr_t instancePtr, AppId_t appID);
S_API uint32 SteamAPI_ISteamApps_GetEarliestPurchaseUnixTime(intptr_t instancePtr, AppId_t nAppID);
S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend(intptr_t instancePtr);
S_API int SteamAPI_ISteamApps_GetDLCCount(intptr_t instancePtr);
S_API bool SteamAPI_ISteamApps_BGetDLCDataByIndex(intptr_t instancePtr, int iDLC, AppId_t * pAppID, bool * pbAvailable, char * pchName, int cchNameBufferSize);
S_API void SteamAPI_ISteamApps_InstallDLC(intptr_t instancePtr, AppId_t nAppID);
S_API void SteamAPI_ISteamApps_UninstallDLC(intptr_t instancePtr, AppId_t nAppID);
S_API void SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey(intptr_t instancePtr, AppId_t nAppID);
S_API bool SteamAPI_ISteamApps_GetCurrentBetaName(intptr_t instancePtr, char * pchName, int cchNameBufferSize);
S_API bool SteamAPI_ISteamApps_MarkContentCorrupt(intptr_t instancePtr, bool bMissingFilesOnly);
S_API uint32 SteamAPI_ISteamApps_GetInstalledDepots(intptr_t instancePtr, AppId_t appID, DepotId_t * pvecDepots, uint32 cMaxDepots);
S_API uint32 SteamAPI_ISteamApps_GetAppInstallDir(intptr_t instancePtr, AppId_t appID, char * pchFolder, uint32 cchFolderBufferSize);
S_API bool SteamAPI_ISteamApps_BIsAppInstalled(intptr_t instancePtr, AppId_t appID);
S_API uint64 SteamAPI_ISteamApps_GetAppOwner(intptr_t instancePtr);
S_API const char * SteamAPI_ISteamApps_GetLaunchQueryParam(intptr_t instancePtr, const char * pchKey);
S_API bool SteamAPI_ISteamApps_GetDlcDownloadProgress(intptr_t instancePtr, AppId_t nAppID, uint64 * punBytesDownloaded, uint64 * punBytesTotal);
S_API int SteamAPI_ISteamApps_GetAppBuildId(intptr_t instancePtr);
S_API void SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamApps_GetFileDetails(intptr_t instancePtr, const char * pszFileName);
S_API int SteamAPI_ISteamApps_GetLaunchCommandLine(intptr_t instancePtr, char * pszCommandLine, int cubCommandLine);
S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing(intptr_t instancePtr);
S_API bool SteamAPI_ISteamNetworking_SendP2PPacket(intptr_t instancePtr, class CSteamID steamIDRemote, const void * pubData, uint32 cubData, EP2PSend eP2PSendType, int nChannel);
S_API bool SteamAPI_ISteamNetworking_IsP2PPacketAvailable(intptr_t instancePtr, uint32 * pcubMsgSize, int nChannel);
S_API bool SteamAPI_ISteamNetworking_ReadP2PPacket(intptr_t instancePtr, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize, class CSteamID * psteamIDRemote, int nChannel);
S_API bool SteamAPI_ISteamNetworking_AcceptP2PSessionWithUser(intptr_t instancePtr, class CSteamID steamIDRemote);
S_API bool SteamAPI_ISteamNetworking_CloseP2PSessionWithUser(intptr_t instancePtr, class CSteamID steamIDRemote);
S_API bool SteamAPI_ISteamNetworking_CloseP2PChannelWithUser(intptr_t instancePtr, class CSteamID steamIDRemote, int nChannel);
S_API bool SteamAPI_ISteamNetworking_GetP2PSessionState(intptr_t instancePtr, class CSteamID steamIDRemote, struct P2PSessionState_t * pConnectionState);
S_API bool SteamAPI_ISteamNetworking_AllowP2PPacketRelay(intptr_t instancePtr, bool bAllow);
S_API SNetListenSocket_t SteamAPI_ISteamNetworking_CreateListenSocket(intptr_t instancePtr, int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay);
S_API SNetSocket_t SteamAPI_ISteamNetworking_CreateP2PConnectionSocket(intptr_t instancePtr, class CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay);
S_API SNetSocket_t SteamAPI_ISteamNetworking_CreateConnectionSocket(intptr_t instancePtr, uint32 nIP, uint16 nPort, int nTimeoutSec);
S_API bool SteamAPI_ISteamNetworking_DestroySocket(intptr_t instancePtr, SNetSocket_t hSocket, bool bNotifyRemoteEnd);
S_API bool SteamAPI_ISteamNetworking_DestroyListenSocket(intptr_t instancePtr, SNetListenSocket_t hSocket, bool bNotifyRemoteEnd);
S_API bool SteamAPI_ISteamNetworking_SendDataOnSocket(intptr_t instancePtr, SNetSocket_t hSocket, void * pubData, uint32 cubData, bool bReliable);
S_API bool SteamAPI_ISteamNetworking_IsDataAvailableOnSocket(intptr_t instancePtr, SNetSocket_t hSocket, uint32 * pcubMsgSize);
S_API bool SteamAPI_ISteamNetworking_RetrieveDataFromSocket(intptr_t instancePtr, SNetSocket_t hSocket, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize);
S_API bool SteamAPI_ISteamNetworking_IsDataAvailable(intptr_t instancePtr, SNetListenSocket_t hListenSocket, uint32 * pcubMsgSize, SNetSocket_t * phSocket);
S_API bool SteamAPI_ISteamNetworking_RetrieveData(intptr_t instancePtr, SNetListenSocket_t hListenSocket, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize, SNetSocket_t * phSocket);
S_API bool SteamAPI_ISteamNetworking_GetSocketInfo(intptr_t instancePtr, SNetSocket_t hSocket, class CSteamID * pSteamIDRemote, int * peSocketStatus, uint32 * punIPRemote, uint16 * punPortRemote);
S_API bool SteamAPI_ISteamNetworking_GetListenSocketInfo(intptr_t instancePtr, SNetListenSocket_t hListenSocket, uint32 * pnIP, uint16 * pnPort);
S_API ESNetSocketConnectionType SteamAPI_ISteamNetworking_GetSocketConnectionType(intptr_t instancePtr, SNetSocket_t hSocket);
S_API int SteamAPI_ISteamNetworking_GetMaxPacketSize(intptr_t instancePtr, SNetSocket_t hSocket);
S_API ScreenshotHandle SteamAPI_ISteamScreenshots_WriteScreenshot(intptr_t instancePtr, void * pubRGB, uint32 cubRGB, int nWidth, int nHeight);
S_API ScreenshotHandle SteamAPI_ISteamScreenshots_AddScreenshotToLibrary(intptr_t instancePtr, const char * pchFilename, const char * pchThumbnailFilename, int nWidth, int nHeight);
S_API void SteamAPI_ISteamScreenshots_TriggerScreenshot(intptr_t instancePtr);
S_API void SteamAPI_ISteamScreenshots_HookScreenshots(intptr_t instancePtr, bool bHook);
S_API bool SteamAPI_ISteamScreenshots_SetLocation(intptr_t instancePtr, ScreenshotHandle hScreenshot, const char * pchLocation);
S_API bool SteamAPI_ISteamScreenshots_TagUser(intptr_t instancePtr, ScreenshotHandle hScreenshot, class CSteamID steamID);
S_API bool SteamAPI_ISteamScreenshots_TagPublishedFile(intptr_t instancePtr, ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID);
S_API bool SteamAPI_ISteamScreenshots_IsScreenshotsHooked(intptr_t instancePtr);
S_API ScreenshotHandle SteamAPI_ISteamScreenshots_AddVRScreenshotToLibrary(intptr_t instancePtr, EVRScreenshotType eType, const char * pchFilename, const char * pchVRFilename);
S_API bool SteamAPI_ISteamMusic_BIsEnabled(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusic_BIsPlaying(intptr_t instancePtr);
S_API AudioPlayback_Status SteamAPI_ISteamMusic_GetPlaybackStatus(intptr_t instancePtr);
S_API void SteamAPI_ISteamMusic_Play(intptr_t instancePtr);
S_API void SteamAPI_ISteamMusic_Pause(intptr_t instancePtr);
S_API void SteamAPI_ISteamMusic_PlayPrevious(intptr_t instancePtr);
S_API void SteamAPI_ISteamMusic_PlayNext(intptr_t instancePtr);
S_API void SteamAPI_ISteamMusic_SetVolume(intptr_t instancePtr, float flVolume);
S_API float SteamAPI_ISteamMusic_GetVolume(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_RegisterSteamMusicRemote(intptr_t instancePtr, const char * pchName);
S_API bool SteamAPI_ISteamMusicRemote_DeregisterSteamMusicRemote(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_BIsCurrentMusicRemote(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_BActivationSuccess(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_SetDisplayName(intptr_t instancePtr, const char * pchDisplayName);
S_API bool SteamAPI_ISteamMusicRemote_SetPNGIcon_64x64(intptr_t instancePtr, void * pvBuffer, uint32 cbBufferLength);
S_API bool SteamAPI_ISteamMusicRemote_EnablePlayPrevious(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_EnablePlayNext(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_EnableShuffled(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_EnableLooped(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_EnableQueue(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_EnablePlaylists(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_UpdatePlaybackStatus(intptr_t instancePtr, AudioPlayback_Status nStatus);
S_API bool SteamAPI_ISteamMusicRemote_UpdateShuffled(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_UpdateLooped(intptr_t instancePtr, bool bValue);
S_API bool SteamAPI_ISteamMusicRemote_UpdateVolume(intptr_t instancePtr, float flValue);
S_API bool SteamAPI_ISteamMusicRemote_CurrentEntryWillChange(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_CurrentEntryIsAvailable(intptr_t instancePtr, bool bAvailable);
S_API bool SteamAPI_ISteamMusicRemote_UpdateCurrentEntryText(intptr_t instancePtr, const char * pchText);
S_API bool SteamAPI_ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds(intptr_t instancePtr, int nValue);
S_API bool SteamAPI_ISteamMusicRemote_UpdateCurrentEntryCoverArt(intptr_t instancePtr, void * pvBuffer, uint32 cbBufferLength);
S_API bool SteamAPI_ISteamMusicRemote_CurrentEntryDidChange(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_QueueWillChange(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_ResetQueueEntries(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_SetQueueEntry(intptr_t instancePtr, int nID, int nPosition, const char * pchEntryText);
S_API bool SteamAPI_ISteamMusicRemote_SetCurrentQueueEntry(intptr_t instancePtr, int nID);
S_API bool SteamAPI_ISteamMusicRemote_QueueDidChange(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_PlaylistWillChange(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_ResetPlaylistEntries(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMusicRemote_SetPlaylistEntry(intptr_t instancePtr, int nID, int nPosition, const char * pchEntryText);
S_API bool SteamAPI_ISteamMusicRemote_SetCurrentPlaylistEntry(intptr_t instancePtr, int nID);
S_API bool SteamAPI_ISteamMusicRemote_PlaylistDidChange(intptr_t instancePtr);
S_API HTTPRequestHandle SteamAPI_ISteamHTTP_CreateHTTPRequest(intptr_t instancePtr, EHTTPMethod eHTTPRequestMethod, const char * pchAbsoluteURL);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestContextValue(intptr_t instancePtr, HTTPRequestHandle hRequest, uint64 ulContextValue);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestNetworkActivityTimeout(intptr_t instancePtr, HTTPRequestHandle hRequest, uint32 unTimeoutSeconds);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestHeaderValue(intptr_t instancePtr, HTTPRequestHandle hRequest, const char * pchHeaderName, const char * pchHeaderValue);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestGetOrPostParameter(intptr_t instancePtr, HTTPRequestHandle hRequest, const char * pchParamName, const char * pchParamValue);
S_API bool SteamAPI_ISteamHTTP_SendHTTPRequest(intptr_t instancePtr, HTTPRequestHandle hRequest, SteamAPICall_t * pCallHandle);
S_API bool SteamAPI_ISteamHTTP_SendHTTPRequestAndStreamResponse(intptr_t instancePtr, HTTPRequestHandle hRequest, SteamAPICall_t * pCallHandle);
S_API bool SteamAPI_ISteamHTTP_DeferHTTPRequest(intptr_t instancePtr, HTTPRequestHandle hRequest);
S_API bool SteamAPI_ISteamHTTP_PrioritizeHTTPRequest(intptr_t instancePtr, HTTPRequestHandle hRequest);
S_API bool SteamAPI_ISteamHTTP_GetHTTPResponseHeaderSize(intptr_t instancePtr, HTTPRequestHandle hRequest, const char * pchHeaderName, uint32 * unResponseHeaderSize);
S_API bool SteamAPI_ISteamHTTP_GetHTTPResponseHeaderValue(intptr_t instancePtr, HTTPRequestHandle hRequest, const char * pchHeaderName, uint8 * pHeaderValueBuffer, uint32 unBufferSize);
S_API bool SteamAPI_ISteamHTTP_GetHTTPResponseBodySize(intptr_t instancePtr, HTTPRequestHandle hRequest, uint32 * unBodySize);
S_API bool SteamAPI_ISteamHTTP_GetHTTPResponseBodyData(intptr_t instancePtr, HTTPRequestHandle hRequest, uint8 * pBodyDataBuffer, uint32 unBufferSize);
S_API bool SteamAPI_ISteamHTTP_GetHTTPStreamingResponseBodyData(intptr_t instancePtr, HTTPRequestHandle hRequest, uint32 cOffset, uint8 * pBodyDataBuffer, uint32 unBufferSize);
S_API bool SteamAPI_ISteamHTTP_ReleaseHTTPRequest(intptr_t instancePtr, HTTPRequestHandle hRequest);
S_API bool SteamAPI_ISteamHTTP_GetHTTPDownloadProgressPct(intptr_t instancePtr, HTTPRequestHandle hRequest, float * pflPercentOut);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestRawPostBody(intptr_t instancePtr, HTTPRequestHandle hRequest, const char * pchContentType, uint8 * pubBody, uint32 unBodyLen);
S_API HTTPCookieContainerHandle SteamAPI_ISteamHTTP_CreateCookieContainer(intptr_t instancePtr, bool bAllowResponsesToModify);
S_API bool SteamAPI_ISteamHTTP_ReleaseCookieContainer(intptr_t instancePtr, HTTPCookieContainerHandle hCookieContainer);
S_API bool SteamAPI_ISteamHTTP_SetCookie(intptr_t instancePtr, HTTPCookieContainerHandle hCookieContainer, const char * pchHost, const char * pchUrl, const char * pchCookie);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestCookieContainer(intptr_t instancePtr, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo(intptr_t instancePtr, HTTPRequestHandle hRequest, const char * pchUserAgentInfo);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(intptr_t instancePtr, HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate);
S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(intptr_t instancePtr, HTTPRequestHandle hRequest, uint32 unMilliseconds);
S_API bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut(intptr_t instancePtr, HTTPRequestHandle hRequest, bool * pbWasTimedOut);
S_API bool SteamAPI_ISteamInput_Init(intptr_t instancePtr);
S_API bool SteamAPI_ISteamInput_Shutdown(intptr_t instancePtr);
S_API void SteamAPI_ISteamInput_RunFrame(intptr_t instancePtr);
S_API int SteamAPI_ISteamInput_GetConnectedControllers(intptr_t instancePtr, InputHandle_t * handlesOut);
S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetActionSetHandle(intptr_t instancePtr, const char * pszActionSetName);
S_API void SteamAPI_ISteamInput_ActivateActionSet(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle);
S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetCurrentActionSet(intptr_t instancePtr, InputHandle_t inputHandle);
S_API void SteamAPI_ISteamInput_ActivateActionSetLayer(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle);
S_API void SteamAPI_ISteamInput_DeactivateActionSetLayer(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle);
S_API void SteamAPI_ISteamInput_DeactivateAllActionSetLayers(intptr_t instancePtr, InputHandle_t inputHandle);
S_API int SteamAPI_ISteamInput_GetActiveActionSetLayers(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t * handlesOut);
S_API InputDigitalActionHandle_t SteamAPI_ISteamInput_GetDigitalActionHandle(intptr_t instancePtr, const char * pszActionName);
S_API struct InputDigitalActionData_t SteamAPI_ISteamInput_GetDigitalActionData(intptr_t instancePtr, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle);
S_API int SteamAPI_ISteamInput_GetDigitalActionOrigins(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin * originsOut);
S_API InputAnalogActionHandle_t SteamAPI_ISteamInput_GetAnalogActionHandle(intptr_t instancePtr, const char * pszActionName);
S_API struct InputAnalogActionData_t SteamAPI_ISteamInput_GetAnalogActionData(intptr_t instancePtr, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle);
S_API int SteamAPI_ISteamInput_GetAnalogActionOrigins(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin * originsOut);
S_API const char * SteamAPI_ISteamInput_GetGlyphForActionOrigin(intptr_t instancePtr, EInputActionOrigin eOrigin);
S_API const char * SteamAPI_ISteamInput_GetStringForActionOrigin(intptr_t instancePtr, EInputActionOrigin eOrigin);
S_API void SteamAPI_ISteamInput_StopAnalogActionMomentum(intptr_t instancePtr, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction);
S_API struct InputMotionData_t SteamAPI_ISteamInput_GetMotionData(intptr_t instancePtr, InputHandle_t inputHandle);
S_API void SteamAPI_ISteamInput_TriggerVibration(intptr_t instancePtr, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed);
S_API void SteamAPI_ISteamInput_SetLEDColor(intptr_t instancePtr, InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags);
S_API void SteamAPI_ISteamInput_TriggerHapticPulse(intptr_t instancePtr, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec);
S_API void SteamAPI_ISteamInput_TriggerRepeatedHapticPulse(intptr_t instancePtr, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags);
S_API bool SteamAPI_ISteamInput_ShowBindingPanel(intptr_t instancePtr, InputHandle_t inputHandle);
S_API ESteamInputType SteamAPI_ISteamInput_GetInputTypeForHandle(intptr_t instancePtr, InputHandle_t inputHandle);
S_API InputHandle_t SteamAPI_ISteamInput_GetControllerForGamepadIndex(intptr_t instancePtr, int nIndex);
S_API int SteamAPI_ISteamInput_GetGamepadIndexForController(intptr_t instancePtr, InputHandle_t ulinputHandle);
S_API const char * SteamAPI_ISteamInput_GetStringForXboxOrigin(intptr_t instancePtr, EXboxOrigin eOrigin);
S_API const char * SteamAPI_ISteamInput_GetGlyphForXboxOrigin(intptr_t instancePtr, EXboxOrigin eOrigin);
S_API EInputActionOrigin SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin(intptr_t instancePtr, InputHandle_t inputHandle, EXboxOrigin eOrigin);
S_API EInputActionOrigin SteamAPI_ISteamInput_TranslateActionOrigin(intptr_t instancePtr, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin);
S_API bool SteamAPI_ISteamController_Init(intptr_t instancePtr);
S_API bool SteamAPI_ISteamController_Shutdown(intptr_t instancePtr);
S_API void SteamAPI_ISteamController_RunFrame(intptr_t instancePtr);
S_API int SteamAPI_ISteamController_GetConnectedControllers(intptr_t instancePtr, ControllerHandle_t * handlesOut);
S_API ControllerActionSetHandle_t SteamAPI_ISteamController_GetActionSetHandle(intptr_t instancePtr, const char * pszActionSetName);
S_API void SteamAPI_ISteamController_ActivateActionSet(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle);
S_API ControllerActionSetHandle_t SteamAPI_ISteamController_GetCurrentActionSet(intptr_t instancePtr, ControllerHandle_t controllerHandle);
S_API void SteamAPI_ISteamController_ActivateActionSetLayer(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle);
S_API void SteamAPI_ISteamController_DeactivateActionSetLayer(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle);
S_API void SteamAPI_ISteamController_DeactivateAllActionSetLayers(intptr_t instancePtr, ControllerHandle_t controllerHandle);
S_API int SteamAPI_ISteamController_GetActiveActionSetLayers(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t * handlesOut);
S_API ControllerDigitalActionHandle_t SteamAPI_ISteamController_GetDigitalActionHandle(intptr_t instancePtr, const char * pszActionName);
S_API struct InputDigitalActionData_t SteamAPI_ISteamController_GetDigitalActionData(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle);
S_API int SteamAPI_ISteamController_GetDigitalActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin * originsOut);
S_API ControllerAnalogActionHandle_t SteamAPI_ISteamController_GetAnalogActionHandle(intptr_t instancePtr, const char * pszActionName);
S_API struct InputAnalogActionData_t SteamAPI_ISteamController_GetAnalogActionData(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle);
S_API int SteamAPI_ISteamController_GetAnalogActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin * originsOut);
S_API const char * SteamAPI_ISteamController_GetGlyphForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin);
S_API const char * SteamAPI_ISteamController_GetStringForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin);
S_API void SteamAPI_ISteamController_StopAnalogActionMomentum(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction);
S_API struct InputMotionData_t SteamAPI_ISteamController_GetMotionData(intptr_t instancePtr, ControllerHandle_t controllerHandle);
S_API void SteamAPI_ISteamController_TriggerHapticPulse(intptr_t instancePtr, ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec);
S_API void SteamAPI_ISteamController_TriggerRepeatedHapticPulse(intptr_t instancePtr, ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags);
S_API void SteamAPI_ISteamController_TriggerVibration(intptr_t instancePtr, ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed);
S_API void SteamAPI_ISteamController_SetLEDColor(intptr_t instancePtr, ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags);
S_API bool SteamAPI_ISteamController_ShowBindingPanel(intptr_t instancePtr, ControllerHandle_t controllerHandle);
S_API ESteamInputType SteamAPI_ISteamController_GetInputTypeForHandle(intptr_t instancePtr, ControllerHandle_t controllerHandle);
S_API ControllerHandle_t SteamAPI_ISteamController_GetControllerForGamepadIndex(intptr_t instancePtr, int nIndex);
S_API int SteamAPI_ISteamController_GetGamepadIndexForController(intptr_t instancePtr, ControllerHandle_t ulControllerHandle);
S_API const char * SteamAPI_ISteamController_GetStringForXboxOrigin(intptr_t instancePtr, EXboxOrigin eOrigin);
S_API const char * SteamAPI_ISteamController_GetGlyphForXboxOrigin(intptr_t instancePtr, EXboxOrigin eOrigin);
S_API EControllerActionOrigin SteamAPI_ISteamController_GetActionOriginFromXboxOrigin(intptr_t instancePtr, ControllerHandle_t controllerHandle, EXboxOrigin eOrigin);
S_API EControllerActionOrigin SteamAPI_ISteamController_TranslateActionOrigin(intptr_t instancePtr, ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin);
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest(intptr_t instancePtr, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage);
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequest(intptr_t instancePtr, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage);
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0(intptr_t instancePtr, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor);
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs);
S_API SteamAPICall_t SteamAPI_ISteamUGC_SendQueryUGCRequest(intptr_t instancePtr, UGCQueryHandle_t handle);
S_API bool SteamAPI_ISteamUGC_GetQueryUGCResult(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, struct SteamUGCDetails_t * pDetails);
S_API bool SteamAPI_ISteamUGC_GetQueryUGCPreviewURL(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, char * pchURL, uint32 cchURLSize);
S_API bool SteamAPI_ISteamUGC_GetQueryUGCMetadata(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, char * pchMetadata, uint32 cchMetadatasize);
S_API bool SteamAPI_ISteamUGC_GetQueryUGCChildren(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, PublishedFileId_t * pvecPublishedFileID, uint32 cMaxEntries);
S_API bool SteamAPI_ISteamUGC_GetQueryUGCStatistic(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 * pStatValue);
S_API uint32 SteamAPI_ISteamUGC_GetQueryUGCNumAdditionalPreviews(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index);
S_API bool SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, char * pchURLOrVideoID, uint32 cchURLSize, char * pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType * pPreviewType);
S_API uint32 SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index);
S_API bool SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, char * pchKey, uint32 cchKeySize, char * pchValue, uint32 cchValueSize);
S_API bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest(intptr_t instancePtr, UGCQueryHandle_t handle);
S_API bool SteamAPI_ISteamUGC_AddRequiredTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pTagName);
S_API bool SteamAPI_ISteamUGC_AddExcludedTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pTagName);
S_API bool SteamAPI_ISteamUGC_SetReturnOnlyIDs(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnOnlyIDs);
S_API bool SteamAPI_ISteamUGC_SetReturnKeyValueTags(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnKeyValueTags);
S_API bool SteamAPI_ISteamUGC_SetReturnLongDescription(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnLongDescription);
S_API bool SteamAPI_ISteamUGC_SetReturnMetadata(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnMetadata);
S_API bool SteamAPI_ISteamUGC_SetReturnChildren(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnChildren);
S_API bool SteamAPI_ISteamUGC_SetReturnAdditionalPreviews(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnAdditionalPreviews);
S_API bool SteamAPI_ISteamUGC_SetReturnTotalOnly(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnTotalOnly);
S_API bool SteamAPI_ISteamUGC_SetReturnPlaytimeStats(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 unDays);
S_API bool SteamAPI_ISteamUGC_SetLanguage(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pchLanguage);
S_API bool SteamAPI_ISteamUGC_SetAllowCachedResponse(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 unMaxAgeSeconds);
S_API bool SteamAPI_ISteamUGC_SetCloudFileNameFilter(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pMatchCloudFileName);
S_API bool SteamAPI_ISteamUGC_SetMatchAnyTag(intptr_t instancePtr, UGCQueryHandle_t handle, bool bMatchAnyTag);
S_API bool SteamAPI_ISteamUGC_SetSearchText(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pSearchText);
S_API bool SteamAPI_ISteamUGC_SetRankedByTrendDays(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 unDays);
S_API bool SteamAPI_ISteamUGC_AddRequiredKeyValueTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pKey, const char * pValue);
S_API SteamAPICall_t SteamAPI_ISteamUGC_RequestUGCDetails(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds);
S_API SteamAPICall_t SteamAPI_ISteamUGC_CreateItem(intptr_t instancePtr, AppId_t nConsumerAppId, EWorkshopFileType eFileType);
S_API UGCUpdateHandle_t SteamAPI_ISteamUGC_StartItemUpdate(intptr_t instancePtr, AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID);
S_API bool SteamAPI_ISteamUGC_SetItemTitle(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchTitle);
S_API bool SteamAPI_ISteamUGC_SetItemDescription(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchDescription);
S_API bool SteamAPI_ISteamUGC_SetItemUpdateLanguage(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchLanguage);
S_API bool SteamAPI_ISteamUGC_SetItemMetadata(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchMetaData);
S_API bool SteamAPI_ISteamUGC_SetItemVisibility(intptr_t instancePtr, UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility);
S_API bool SteamAPI_ISteamUGC_SetItemTags(intptr_t instancePtr, UGCUpdateHandle_t updateHandle, const struct SteamParamStringArray_t * pTags);
S_API bool SteamAPI_ISteamUGC_SetItemContent(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszContentFolder);
S_API bool SteamAPI_ISteamUGC_SetItemPreview(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszPreviewFile);
S_API bool SteamAPI_ISteamUGC_SetAllowLegacyUpload(intptr_t instancePtr, UGCUpdateHandle_t handle, bool bAllowLegacyUpload);
S_API bool SteamAPI_ISteamUGC_RemoveItemKeyValueTags(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchKey);
S_API bool SteamAPI_ISteamUGC_AddItemKeyValueTag(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchKey, const char * pchValue);
S_API bool SteamAPI_ISteamUGC_AddItemPreviewFile(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszPreviewFile, EItemPreviewType type);
S_API bool SteamAPI_ISteamUGC_AddItemPreviewVideo(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszVideoID);
S_API bool SteamAPI_ISteamUGC_UpdateItemPreviewFile(intptr_t instancePtr, UGCUpdateHandle_t handle, uint32 index, const char * pszPreviewFile);
S_API bool SteamAPI_ISteamUGC_UpdateItemPreviewVideo(intptr_t instancePtr, UGCUpdateHandle_t handle, uint32 index, const char * pszVideoID);
S_API bool SteamAPI_ISteamUGC_RemoveItemPreview(intptr_t instancePtr, UGCUpdateHandle_t handle, uint32 index);
S_API SteamAPICall_t SteamAPI_ISteamUGC_SubmitItemUpdate(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchChangeNote);
S_API EItemUpdateStatus SteamAPI_ISteamUGC_GetItemUpdateProgress(intptr_t instancePtr, UGCUpdateHandle_t handle, uint64 * punBytesProcessed, uint64 * punBytesTotal);
S_API SteamAPICall_t SteamAPI_ISteamUGC_SetUserItemVote(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, bool bVoteUp);
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetUserItemVote(intptr_t instancePtr, PublishedFileId_t nPublishedFileID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_AddItemToFavorites(intptr_t instancePtr, AppId_t nAppId, PublishedFileId_t nPublishedFileID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_RemoveItemFromFavorites(intptr_t instancePtr, AppId_t nAppId, PublishedFileId_t nPublishedFileID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_SubscribeItem(intptr_t instancePtr, PublishedFileId_t nPublishedFileID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_UnsubscribeItem(intptr_t instancePtr, PublishedFileId_t nPublishedFileID);
S_API uint32 SteamAPI_ISteamUGC_GetNumSubscribedItems(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamUGC_GetSubscribedItems(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 cMaxEntries);
S_API uint32 SteamAPI_ISteamUGC_GetItemState(intptr_t instancePtr, PublishedFileId_t nPublishedFileID);
S_API bool SteamAPI_ISteamUGC_GetItemInstallInfo(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, uint64 * punSizeOnDisk, char * pchFolder, uint32 cchFolderSize, uint32 * punTimeStamp);
S_API bool SteamAPI_ISteamUGC_GetItemDownloadInfo(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, uint64 * punBytesDownloaded, uint64 * punBytesTotal);
S_API bool SteamAPI_ISteamUGC_DownloadItem(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, bool bHighPriority);
S_API bool SteamAPI_ISteamUGC_BInitWorkshopForGameServer(intptr_t instancePtr, DepotId_t unWorkshopDepotID, const char * pszFolder);
S_API void SteamAPI_ISteamUGC_SuspendDownloads(intptr_t instancePtr, bool bSuspend);
S_API SteamAPICall_t SteamAPI_ISteamUGC_StartPlaytimeTracking(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs);
S_API SteamAPICall_t SteamAPI_ISteamUGC_StopPlaytimeTracking(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs);
S_API SteamAPICall_t SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamUGC_AddDependency(intptr_t instancePtr, PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_RemoveDependency(intptr_t instancePtr, PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_AddAppDependency(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, AppId_t nAppID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_RemoveAppDependency(intptr_t instancePtr, PublishedFileId_t nPublishedFileID, AppId_t nAppID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies(intptr_t instancePtr, PublishedFileId_t nPublishedFileID);
S_API SteamAPICall_t SteamAPI_ISteamUGC_DeleteItem(intptr_t instancePtr, PublishedFileId_t nPublishedFileID);
S_API uint32 SteamAPI_ISteamAppList_GetNumInstalledApps(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamAppList_GetInstalledApps(intptr_t instancePtr, AppId_t * pvecAppID, uint32 unMaxAppIDs);
S_API int SteamAPI_ISteamAppList_GetAppName(intptr_t instancePtr, AppId_t nAppID, char * pchName, int cchNameMax);
S_API int SteamAPI_ISteamAppList_GetAppInstallDir(intptr_t instancePtr, AppId_t nAppID, char * pchDirectory, int cchNameMax);
S_API int SteamAPI_ISteamAppList_GetAppBuildId(intptr_t instancePtr, AppId_t nAppID);
S_API void SteamAPI_ISteamHTMLSurface_DestructISteamHTMLSurface(intptr_t instancePtr);
S_API bool SteamAPI_ISteamHTMLSurface_Init(intptr_t instancePtr);
S_API bool SteamAPI_ISteamHTMLSurface_Shutdown(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamHTMLSurface_CreateBrowser(intptr_t instancePtr, const char * pchUserAgent, const char * pchUserCSS);
S_API void SteamAPI_ISteamHTMLSurface_RemoveBrowser(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_LoadURL(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, const char * pchURL, const char * pchPostData);
S_API void SteamAPI_ISteamHTMLSurface_SetSize(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight);
S_API void SteamAPI_ISteamHTMLSurface_StopLoad(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_Reload(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_GoBack(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_GoForward(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_AddHeader(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, const char * pchKey, const char * pchValue);
S_API void SteamAPI_ISteamHTMLSurface_ExecuteJavascript(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, const char * pchScript);
S_API void SteamAPI_ISteamHTMLSurface_MouseUp(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton);
S_API void SteamAPI_ISteamHTMLSurface_MouseDown(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton);
S_API void SteamAPI_ISteamHTMLSurface_MouseDoubleClick(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton);
S_API void SteamAPI_ISteamHTMLSurface_MouseMove(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, int x, int y);
S_API void SteamAPI_ISteamHTMLSurface_MouseWheel(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, int32 nDelta);
S_API void SteamAPI_ISteamHTMLSurface_KeyDown(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers, bool bIsSystemKey);
S_API void SteamAPI_ISteamHTMLSurface_KeyUp(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers);
S_API void SteamAPI_ISteamHTMLSurface_KeyChar(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers);
S_API void SteamAPI_ISteamHTMLSurface_SetHorizontalScroll(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll);
S_API void SteamAPI_ISteamHTMLSurface_SetVerticalScroll(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll);
S_API void SteamAPI_ISteamHTMLSurface_SetKeyFocus(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bHasKeyFocus);
S_API void SteamAPI_ISteamHTMLSurface_ViewSource(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_CopyToClipboard(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_PasteFromClipboard(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_Find(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, const char * pchSearchStr, bool bCurrentlyInFind, bool bReverse);
S_API void SteamAPI_ISteamHTMLSurface_StopFind(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_GetLinkAtPosition(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, int x, int y);
S_API void SteamAPI_ISteamHTMLSurface_SetCookie(intptr_t instancePtr, const char * pchHostname, const char * pchKey, const char * pchValue, const char * pchPath, RTime32 nExpires, bool bSecure, bool bHTTPOnly);
S_API void SteamAPI_ISteamHTMLSurface_SetPageScaleFactor(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY);
S_API void SteamAPI_ISteamHTMLSurface_SetBackgroundMode(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bBackgroundMode);
S_API void SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, float flDPIScaling);
S_API void SteamAPI_ISteamHTMLSurface_OpenDeveloperTools(intptr_t instancePtr, HHTMLBrowser unBrowserHandle);
S_API void SteamAPI_ISteamHTMLSurface_AllowStartRequest(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bAllowed);
S_API void SteamAPI_ISteamHTMLSurface_JSDialogResponse(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bResult);
S_API EResult SteamAPI_ISteamInventory_GetResultStatus(intptr_t instancePtr, SteamInventoryResult_t resultHandle);
S_API bool SteamAPI_ISteamInventory_GetResultItems(intptr_t instancePtr, SteamInventoryResult_t resultHandle, struct SteamItemDetails_t * pOutItemsArray, uint32 * punOutItemsArraySize);
S_API bool SteamAPI_ISteamInventory_GetResultItemProperty(intptr_t instancePtr, SteamInventoryResult_t resultHandle, uint32 unItemIndex, const char * pchPropertyName, char * pchValueBuffer, uint32 * punValueBufferSizeOut);
S_API uint32 SteamAPI_ISteamInventory_GetResultTimestamp(intptr_t instancePtr, SteamInventoryResult_t resultHandle);
S_API bool SteamAPI_ISteamInventory_CheckResultSteamID(intptr_t instancePtr, SteamInventoryResult_t resultHandle, class CSteamID steamIDExpected);
S_API void SteamAPI_ISteamInventory_DestroyResult(intptr_t instancePtr, SteamInventoryResult_t resultHandle);
S_API bool SteamAPI_ISteamInventory_GetAllItems(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle);
S_API bool SteamAPI_ISteamInventory_GetItemsByID(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, const SteamItemInstanceID_t * pInstanceIDs, uint32 unCountInstanceIDs);
S_API bool SteamAPI_ISteamInventory_SerializeResult(intptr_t instancePtr, SteamInventoryResult_t resultHandle, void * pOutBuffer, uint32 * punOutBufferSize);
S_API bool SteamAPI_ISteamInventory_DeserializeResult(intptr_t instancePtr, SteamInventoryResult_t * pOutResultHandle, const void * pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE);
S_API bool SteamAPI_ISteamInventory_GenerateItems(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, const SteamItemDef_t * pArrayItemDefs, const uint32 * punArrayQuantity, uint32 unArrayLength);
S_API bool SteamAPI_ISteamInventory_GrantPromoItems(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle);
S_API bool SteamAPI_ISteamInventory_AddPromoItem(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, SteamItemDef_t itemDef);
S_API bool SteamAPI_ISteamInventory_AddPromoItems(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, const SteamItemDef_t * pArrayItemDefs, uint32 unArrayLength);
S_API bool SteamAPI_ISteamInventory_ConsumeItem(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity);
S_API bool SteamAPI_ISteamInventory_ExchangeItems(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, const SteamItemDef_t * pArrayGenerate, const uint32 * punArrayGenerateQuantity, uint32 unArrayGenerateLength, const SteamItemInstanceID_t * pArrayDestroy, const uint32 * punArrayDestroyQuantity, uint32 unArrayDestroyLength);
S_API bool SteamAPI_ISteamInventory_TransferItemQuantity(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest);
S_API void SteamAPI_ISteamInventory_SendItemDropHeartbeat(intptr_t instancePtr);
S_API bool SteamAPI_ISteamInventory_TriggerItemDrop(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, SteamItemDef_t dropListDefinition);
S_API bool SteamAPI_ISteamInventory_TradeItems(intptr_t instancePtr, SteamInventoryResult_t * pResultHandle, class CSteamID steamIDTradePartner, const SteamItemInstanceID_t * pArrayGive, const uint32 * pArrayGiveQuantity, uint32 nArrayGiveLength, const SteamItemInstanceID_t * pArrayGet, const uint32 * pArrayGetQuantity, uint32 nArrayGetLength);
S_API bool SteamAPI_ISteamInventory_LoadItemDefinitions(intptr_t instancePtr);
S_API bool SteamAPI_ISteamInventory_GetItemDefinitionIDs(intptr_t instancePtr, SteamItemDef_t * pItemDefIDs, uint32 * punItemDefIDsArraySize);
S_API bool SteamAPI_ISteamInventory_GetItemDefinitionProperty(intptr_t instancePtr, SteamItemDef_t iDefinition, const char * pchPropertyName, char * pchValueBuffer, uint32 * punValueBufferSizeOut);
S_API SteamAPICall_t SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs(intptr_t instancePtr, class CSteamID steamID);
S_API bool SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs(intptr_t instancePtr, class CSteamID steamID, SteamItemDef_t * pItemDefIDs, uint32 * punItemDefIDsArraySize);
S_API SteamAPICall_t SteamAPI_ISteamInventory_StartPurchase(intptr_t instancePtr, const SteamItemDef_t * pArrayItemDefs, const uint32 * punArrayQuantity, uint32 unArrayLength);
S_API SteamAPICall_t SteamAPI_ISteamInventory_RequestPrices(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamInventory_GetNumItemsWithPrices(intptr_t instancePtr);
S_API bool SteamAPI_ISteamInventory_GetItemsWithPrices(intptr_t instancePtr, SteamItemDef_t * pArrayItemDefs, uint64 * pCurrentPrices, uint64 * pBasePrices, uint32 unArrayLength);
S_API bool SteamAPI_ISteamInventory_GetItemPrice(intptr_t instancePtr, SteamItemDef_t iDefinition, uint64 * pCurrentPrice, uint64 * pBasePrice);
S_API SteamInventoryUpdateHandle_t SteamAPI_ISteamInventory_StartUpdateProperties(intptr_t instancePtr);
S_API bool SteamAPI_ISteamInventory_RemoveProperty(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName);
S_API bool SteamAPI_ISteamInventory_SetProperty(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, const char * pchPropertyValue);
S_API bool SteamAPI_ISteamInventory_SetProperty0(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, bool bValue);
S_API bool SteamAPI_ISteamInventory_SetProperty1(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, int64 nValue);
S_API bool SteamAPI_ISteamInventory_SetProperty2(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, float flValue);
S_API bool SteamAPI_ISteamInventory_SubmitUpdateProperties(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle);
S_API void SteamAPI_ISteamVideo_GetVideoURL(intptr_t instancePtr, AppId_t unVideoAppID);
S_API bool SteamAPI_ISteamVideo_IsBroadcasting(intptr_t instancePtr, int * pnNumViewers);
S_API void SteamAPI_ISteamVideo_GetOPFSettings(intptr_t instancePtr, AppId_t unVideoAppID);
S_API bool SteamAPI_ISteamVideo_GetOPFStringForApp(intptr_t instancePtr, AppId_t unVideoAppID, char * pchBuffer, int32 * pnBufferSize);
S_API bool SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled(intptr_t instancePtr);
S_API bool SteamAPI_ISteamParentalSettings_BIsParentalLockLocked(intptr_t instancePtr);
S_API bool SteamAPI_ISteamParentalSettings_BIsAppBlocked(intptr_t instancePtr, AppId_t nAppID);
S_API bool SteamAPI_ISteamParentalSettings_BIsAppInBlockList(intptr_t instancePtr, AppId_t nAppID);
S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureBlocked(intptr_t instancePtr, EParentalFeature eFeature);
S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList(intptr_t instancePtr, EParentalFeature eFeature);
S_API bool SteamAPI_ISteamGameServer_InitGameServer(intptr_t instancePtr, uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char * pchVersionString);
S_API void SteamAPI_ISteamGameServer_SetProduct(intptr_t instancePtr, const char * pszProduct);
S_API void SteamAPI_ISteamGameServer_SetGameDescription(intptr_t instancePtr, const char * pszGameDescription);
S_API void SteamAPI_ISteamGameServer_SetModDir(intptr_t instancePtr, const char * pszModDir);
S_API void SteamAPI_ISteamGameServer_SetDedicatedServer(intptr_t instancePtr, bool bDedicated);
S_API void SteamAPI_ISteamGameServer_LogOn(intptr_t instancePtr, const char * pszToken);
S_API void SteamAPI_ISteamGameServer_LogOnAnonymous(intptr_t instancePtr);
S_API void SteamAPI_ISteamGameServer_LogOff(intptr_t instancePtr);
S_API bool SteamAPI_ISteamGameServer_BLoggedOn(intptr_t instancePtr);
S_API bool SteamAPI_ISteamGameServer_BSecure(intptr_t instancePtr);
S_API uint64 SteamAPI_ISteamGameServer_GetSteamID(intptr_t instancePtr);
S_API bool SteamAPI_ISteamGameServer_WasRestartRequested(intptr_t instancePtr);
S_API void SteamAPI_ISteamGameServer_SetMaxPlayerCount(intptr_t instancePtr, int cPlayersMax);
S_API void SteamAPI_ISteamGameServer_SetBotPlayerCount(intptr_t instancePtr, int cBotplayers);
S_API void SteamAPI_ISteamGameServer_SetServerName(intptr_t instancePtr, const char * pszServerName);
S_API void SteamAPI_ISteamGameServer_SetMapName(intptr_t instancePtr, const char * pszMapName);
S_API void SteamAPI_ISteamGameServer_SetPasswordProtected(intptr_t instancePtr, bool bPasswordProtected);
S_API void SteamAPI_ISteamGameServer_SetSpectatorPort(intptr_t instancePtr, uint16 unSpectatorPort);
S_API void SteamAPI_ISteamGameServer_SetSpectatorServerName(intptr_t instancePtr, const char * pszSpectatorServerName);
S_API void SteamAPI_ISteamGameServer_ClearAllKeyValues(intptr_t instancePtr);
S_API void SteamAPI_ISteamGameServer_SetKeyValue(intptr_t instancePtr, const char * pKey, const char * pValue);
S_API void SteamAPI_ISteamGameServer_SetGameTags(intptr_t instancePtr, const char * pchGameTags);
S_API void SteamAPI_ISteamGameServer_SetGameData(intptr_t instancePtr, const char * pchGameData);
S_API void SteamAPI_ISteamGameServer_SetRegion(intptr_t instancePtr, const char * pszRegion);
S_API bool SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate(intptr_t instancePtr, uint32 unIPClient, const void * pvAuthBlob, uint32 cubAuthBlobSize, class CSteamID * pSteamIDUser);
S_API uint64 SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection(intptr_t instancePtr);
S_API void SteamAPI_ISteamGameServer_SendUserDisconnect(intptr_t instancePtr, class CSteamID steamIDUser);
S_API bool SteamAPI_ISteamGameServer_BUpdateUserData(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchPlayerName, uint32 uScore);
S_API HAuthTicket SteamAPI_ISteamGameServer_GetAuthSessionTicket(intptr_t instancePtr, void * pTicket, int cbMaxTicket, uint32 * pcbTicket);
S_API EBeginAuthSessionResult SteamAPI_ISteamGameServer_BeginAuthSession(intptr_t instancePtr, const void * pAuthTicket, int cbAuthTicket, class CSteamID steamID);
S_API void SteamAPI_ISteamGameServer_EndAuthSession(intptr_t instancePtr, class CSteamID steamID);
S_API void SteamAPI_ISteamGameServer_CancelAuthTicket(intptr_t instancePtr, HAuthTicket hAuthTicket);
S_API EUserHasLicenseForAppResult SteamAPI_ISteamGameServer_UserHasLicenseForApp(intptr_t instancePtr, class CSteamID steamID, AppId_t appID);
S_API bool SteamAPI_ISteamGameServer_RequestUserGroupStatus(intptr_t instancePtr, class CSteamID steamIDUser, class CSteamID steamIDGroup);
S_API void SteamAPI_ISteamGameServer_GetGameplayStats(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamGameServer_GetPublicIP(intptr_t instancePtr);
S_API bool SteamAPI_ISteamGameServer_HandleIncomingPacket(intptr_t instancePtr, const void * pData, int cbData, uint32 srcIP, uint16 srcPort);
S_API int SteamAPI_ISteamGameServer_GetNextOutgoingPacket(intptr_t instancePtr, void * pOut, int cbMaxOut, uint32 * pNetAdr, uint16 * pPort);
S_API void SteamAPI_ISteamGameServer_EnableHeartbeats(intptr_t instancePtr, bool bActive);
S_API void SteamAPI_ISteamGameServer_SetHeartbeatInterval(intptr_t instancePtr, int iHeartbeatInterval);
S_API void SteamAPI_ISteamGameServer_ForceHeartbeat(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamGameServer_AssociateWithClan(intptr_t instancePtr, class CSteamID steamIDClan);
S_API SteamAPICall_t SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility(intptr_t instancePtr, class CSteamID steamIDNewPlayer);
S_API SteamAPICall_t SteamAPI_ISteamGameServerStats_RequestUserStats(intptr_t instancePtr, class CSteamID steamIDUser);
S_API bool SteamAPI_ISteamGameServerStats_GetUserStat(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, int32 * pData);
S_API bool SteamAPI_ISteamGameServerStats_GetUserStat0(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, float * pData);
S_API bool SteamAPI_ISteamGameServerStats_GetUserAchievement(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, bool * pbAchieved);
S_API bool SteamAPI_ISteamGameServerStats_SetUserStat(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, int32 nData);
S_API bool SteamAPI_ISteamGameServerStats_SetUserStat0(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, float fData);
S_API bool SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName, float flCountThisSession, double dSessionLength);
S_API bool SteamAPI_ISteamGameServerStats_SetUserAchievement(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName);
S_API bool SteamAPI_ISteamGameServerStats_ClearUserAchievement(intptr_t instancePtr, class CSteamID steamIDUser, const char * pchName);
S_API SteamAPICall_t SteamAPI_ISteamGameServerStats_StoreUserStats(intptr_t instancePtr, class CSteamID steamIDUser);
#endif // STEAMAPIFLAT_H

View file

@ -0,0 +1,385 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Internal implementation details of the steamworks SDK.
//
// You should be able to figure out how to use the SDK by reading
// steam_api_common.h, and should not need to understand anything in here.
//
//-----------------------------------------------------------------------------
#ifdef STEAM_CALLBACK_BEGIN
#error "This file should only be included from steam_api_common.h"
#endif
#include <string.h>
// Internal functions used by the utility CCallback objects to receive callbacks
S_API void S_CALLTYPE SteamAPI_RegisterCallback( class CCallbackBase *pCallback, int iCallback );
S_API void S_CALLTYPE SteamAPI_UnregisterCallback( class CCallbackBase *pCallback );
// Internal functions used by the utility CCallResult objects to receive async call results
S_API void S_CALLTYPE SteamAPI_RegisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
S_API HSteamPipe S_CALLTYPE SteamAPI_GetHSteamPipe();
S_API HSteamUser S_CALLTYPE SteamAPI_GetHSteamUser();
S_API HSteamPipe S_CALLTYPE SteamGameServer_GetHSteamPipe();
S_API HSteamUser S_CALLTYPE SteamGameServer_GetHSteamUser();
S_API void *S_CALLTYPE SteamInternal_ContextInit( void *pContextInitData );
S_API void *S_CALLTYPE SteamInternal_CreateInterface( const char *ver );
S_API void *S_CALLTYPE SteamInternal_FindOrCreateUserInterface( HSteamUser hSteamUser, const char *pszVersion );
S_API void *S_CALLTYPE SteamInternal_FindOrCreateGameServerInterface( HSteamUser hSteamUser, const char *pszVersion );
// disable this warning; this pattern need for steam callback registration
#ifdef _MSVC_VER
#pragma warning( push )
#pragma warning( disable: 4355 ) // 'this' : used in base member initializer list
#endif
#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<thisclass*>( reinterpret_cast<char*>(this) - offsetof( thisclass, m_steamcallback_ ## func ) ); \
pOuter->func( reinterpret_cast<param*>( pvParam ) ); \
} \
} m_steamcallback_ ## func ; void func( param *pParam )
#define _STEAM_CALLBACK_4( _, thisclass, func, param, var ) \
CCallback< thisclass, param > var; void func( param *pParam )
#define _STEAM_CALLBACK_GS( _, thisclass, func, param, var ) \
CCallback< thisclass, param, true > var; void func( param *pParam )
template< class T, class P >
inline CCallResult<T, P>::CCallResult()
{
m_hAPICall = k_uAPICallInvalid;
m_pObj = nullptr;
m_Func = nullptr;
m_iCallback = P::k_iCallback;
}
template< class T, class P >
inline void CCallResult<T, P>::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 );
}
template< class T, class P >
inline bool CCallResult<T, P>::IsActive() const
{
return (m_hAPICall != k_uAPICallInvalid);
}
template< class T, class P >
inline void CCallResult<T, P>::Cancel()
{
if ( m_hAPICall != k_uAPICallInvalid )
{
SteamAPI_UnregisterCallResult( this, m_hAPICall );
m_hAPICall = k_uAPICallInvalid;
}
}
template< class T, class P >
inline CCallResult<T, P>::~CCallResult()
{
Cancel();
}
template< class T, class P >
inline void CCallResult<T, P>::Run( void *pvParam )
{
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
(m_pObj->*m_Func)((P *)pvParam, false);
}
template< class T, class P >
inline void CCallResult<T, P>::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);
}
}
template< class T, class P, bool bGameserver >
inline CCallback< T, P, bGameserver >::CCallback( T *pObj, func_t func )
: m_pObj( nullptr ), m_Func( nullptr )
{
if ( bGameserver )
{
this->SetGameserverFlag();
}
Register( pObj, func );
}
template< class T, class P, bool bGameserver >
inline void CCallback< T, P, bGameserver >::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 );
}
template< class T, class P, bool bGameserver >
inline void CCallback< T, P, bGameserver >::Unregister()
{
// SteamAPI_UnregisterCallback removes k_ECallbackFlagsRegistered
SteamAPI_UnregisterCallback( this );
}
template< class T, class P, bool bGameserver >
inline void CCallback< T, P, bGameserver >::Run( void *pvParam )
{
(m_pObj->*m_Func)((P *)pvParam);
}
//-----------------------------------------------------------------------------
// Macros to define steam callback structures. Used internally for debugging
//-----------------------------------------------------------------------------
#ifdef STEAM_CALLBACK_INSPECTION_ENABLED
#include "../../clientdll/steam_api_callback_inspection.h"
#else
#define STEAM_CALLBACK_BEGIN( callbackname, callbackid ) struct callbackname { enum { k_iCallback = callbackid };
#define STEAM_CALLBACK_MEMBER( varidx, vartype, varname ) vartype varname ;
#define STEAM_CALLBACK_MEMBER_ARRAY( varidx, vartype, varname, varcount ) vartype varname [ varcount ];
#define STEAM_CALLBACK_END(nArgs) };
#endif
// Forward declare all of the Steam interfaces. (Do we really need to do this?)
class ISteamClient;
class ISteamUser;
class ISteamGameServer;
class ISteamFriends;
class ISteamUtils;
class ISteamMatchmaking;
class ISteamContentServer;
class ISteamMatchmakingServers;
class ISteamUserStats;
class ISteamApps;
class ISteamNetworking;
class ISteamRemoteStorage;
class ISteamScreenshots;
class ISteamMusic;
class ISteamMusicRemote;
class ISteamGameServerStats;
class ISteamPS3OverlayRender;
class ISteamHTTP;
class ISteamController;
class ISteamUGC;
class ISteamAppList;
class ISteamHTMLSurface;
class ISteamInventory;
class ISteamVideo;
class ISteamParentalSettings;
class ISteamGameSearch;
class ISteamInput;
class ISteamParties;
//-----------------------------------------------------------------------------
// Purpose: Base values for callback identifiers, each callback must
// have a unique ID.
//-----------------------------------------------------------------------------
enum { k_iSteamUserCallbacks = 100 };
enum { k_iSteamGameServerCallbacks = 200 };
enum { k_iSteamFriendsCallbacks = 300 };
enum { k_iSteamBillingCallbacks = 400 };
enum { k_iSteamMatchmakingCallbacks = 500 };
enum { k_iSteamContentServerCallbacks = 600 };
enum { k_iSteamUtilsCallbacks = 700 };
enum { k_iClientFriendsCallbacks = 800 };
enum { k_iClientUserCallbacks = 900 };
enum { k_iSteamAppsCallbacks = 1000 };
enum { k_iSteamUserStatsCallbacks = 1100 };
enum { k_iSteamNetworkingCallbacks = 1200 };
enum { k_iSteamNetworkingSocketsCallbacks = 1220 };
enum { k_iSteamNetworkingMessagesCallbacks = 1250 };
enum { k_iClientRemoteStorageCallbacks = 1300 };
enum { k_iClientDepotBuilderCallbacks = 1400 };
enum { k_iSteamGameServerItemsCallbacks = 1500 };
enum { k_iClientUtilsCallbacks = 1600 };
enum { k_iSteamGameCoordinatorCallbacks = 1700 };
enum { k_iSteamGameServerStatsCallbacks = 1800 };
enum { k_iSteam2AsyncCallbacks = 1900 };
enum { k_iSteamGameStatsCallbacks = 2000 };
enum { k_iClientHTTPCallbacks = 2100 };
enum { k_iClientScreenshotsCallbacks = 2200 };
enum { k_iSteamScreenshotsCallbacks = 2300 };
enum { k_iClientAudioCallbacks = 2400 };
enum { k_iClientUnifiedMessagesCallbacks = 2500 };
enum { k_iSteamStreamLauncherCallbacks = 2600 };
enum { k_iClientControllerCallbacks = 2700 };
enum { k_iSteamControllerCallbacks = 2800 };
enum { k_iClientParentalSettingsCallbacks = 2900 };
enum { k_iClientDeviceAuthCallbacks = 3000 };
enum { k_iClientNetworkDeviceManagerCallbacks = 3100 };
enum { k_iClientMusicCallbacks = 3200 };
enum { k_iClientRemoteClientManagerCallbacks = 3300 };
enum { k_iClientUGCCallbacks = 3400 };
enum { k_iSteamStreamClientCallbacks = 3500 };
enum { k_IClientProductBuilderCallbacks = 3600 };
enum { k_iClientShortcutsCallbacks = 3700 };
enum { k_iClientRemoteControlManagerCallbacks = 3800 };
enum { k_iSteamAppListCallbacks = 3900 };
enum { k_iSteamMusicCallbacks = 4000 };
enum { k_iSteamMusicRemoteCallbacks = 4100 };
enum { k_iClientVRCallbacks = 4200 };
enum { k_iClientGameNotificationCallbacks = 4300 };
enum { k_iSteamGameNotificationCallbacks = 4400 };
enum { k_iSteamHTMLSurfaceCallbacks = 4500 };
enum { k_iClientVideoCallbacks = 4600 };
enum { k_iClientInventoryCallbacks = 4700 };
enum { k_iClientBluetoothManagerCallbacks = 4800 };
enum { k_iClientSharedConnectionCallbacks = 4900 };
enum { k_ISteamParentalSettingsCallbacks = 5000 };
enum { k_iClientShaderCallbacks = 5100 };
enum { k_iSteamGameSearchCallbacks = 5200 };
enum { k_iSteamPartiesCallbacks = 5300 };
enum { k_iClientPartiesCallbacks = 5400 };
// Macro used to define a type-safe accessor that will always return the version
// of the interface of the *header file* you are compiling with! We also bounce
// through a safety function that checks for interfaces being created or destroyed.
#ifndef STEAM_API_EXPORTS
// SteamInternal_ContextInit takes a base pointer for the equivalent of
// struct { void (*pFn)(void* pCtx); uintp counter; CSteamAPIContext ctx; }
// Do not change layout of 2 + sizeof... or add non-pointer aligned data!
// NOTE: declaring "static CSteamAPIConext" creates a large function
// which queries the initialization status of the object. We know that
// it is pointer-aligned and fully memset with zeros, so just alias a
// static buffer of the appropriate size and call it a CSteamAPIContext.
#define STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, expr ) \
inline void S_CALLTYPE SteamInternal_Init_ ## name( type *p ) { *p = (type)( expr ); } \
inline type name() { \
static void* s_CallbackCounterAndContext[ 3 ] = { (void*)&SteamInternal_Init_ ## name, 0, 0 }; \
return *(type*)SteamInternal_ContextInit( s_CallbackCounterAndContext ); \
}
#else
// Stub when we're compiling steam_api.dll itself. These are inline
// functions defined when the header is included. not functions exported
// by the lib!
#define STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, expr )
#endif
#define STEAM_DEFINE_USER_INTERFACE_ACCESSOR( type, name, version ) \
STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, SteamInternal_FindOrCreateUserInterface( SteamAPI_GetHSteamUser(), version ) )
#define STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( type, name, version ) \
STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, SteamInternal_FindOrCreateGameServerInterface( SteamGameServer_GetHSteamUser(), version ) )
#ifdef _MSVC_VER
#pragma warning( pop )
#endif
// CSteamAPIContext encapsulates the Steamworks API global accessors into
// a single object.
//
// DEPRECATED: Used the global interface accessors instead!
//
// This will be removed in a future iteration of the SDK
class CSteamAPIContext
{
public:
CSteamAPIContext() { Clear(); }
inline void Clear() { memset( this, 0, sizeof(*this) ); }
inline bool Init(); // NOTE: This is defined in steam_api.h, to avoid this file having to include everything
ISteamClient* SteamClient() const { return m_pSteamClient; }
ISteamUser* SteamUser() const { return m_pSteamUser; }
ISteamFriends* SteamFriends() const { return m_pSteamFriends; }
ISteamUtils* SteamUtils() const { return m_pSteamUtils; }
ISteamMatchmaking* SteamMatchmaking() const { return m_pSteamMatchmaking; }
ISteamGameSearch* SteamGameSearch() const { return m_pSteamGameSearch; }
ISteamUserStats* SteamUserStats() const { return m_pSteamUserStats; }
ISteamApps* SteamApps() const { return m_pSteamApps; }
ISteamMatchmakingServers* SteamMatchmakingServers() const { return m_pSteamMatchmakingServers; }
ISteamNetworking* SteamNetworking() const { return m_pSteamNetworking; }
ISteamRemoteStorage* SteamRemoteStorage() const { return m_pSteamRemoteStorage; }
ISteamScreenshots* SteamScreenshots() const { return m_pSteamScreenshots; }
ISteamHTTP* SteamHTTP() const { return m_pSteamHTTP; }
ISteamController* SteamController() const { return m_pController; }
ISteamUGC* SteamUGC() const { return m_pSteamUGC; }
ISteamAppList* SteamAppList() const { return m_pSteamAppList; }
ISteamMusic* SteamMusic() const { return m_pSteamMusic; }
ISteamMusicRemote* SteamMusicRemote() const { return m_pSteamMusicRemote; }
ISteamHTMLSurface* SteamHTMLSurface() const { return m_pSteamHTMLSurface; }
ISteamInventory* SteamInventory() const { return m_pSteamInventory; }
ISteamVideo* SteamVideo() const { return m_pSteamVideo; }
ISteamParentalSettings* SteamParentalSettings() const { return m_pSteamParentalSettings; }
ISteamInput* SteamInput() const { return m_pSteamInput; }
private:
ISteamClient *m_pSteamClient;
ISteamUser *m_pSteamUser;
ISteamFriends *m_pSteamFriends;
ISteamUtils *m_pSteamUtils;
ISteamMatchmaking *m_pSteamMatchmaking;
ISteamGameSearch *m_pSteamGameSearch;
ISteamUserStats *m_pSteamUserStats;
ISteamApps *m_pSteamApps;
ISteamMatchmakingServers *m_pSteamMatchmakingServers;
ISteamNetworking *m_pSteamNetworking;
ISteamRemoteStorage *m_pSteamRemoteStorage;
ISteamScreenshots *m_pSteamScreenshots;
ISteamHTTP *m_pSteamHTTP;
ISteamController *m_pController;
ISteamUGC *m_pSteamUGC;
ISteamAppList *m_pSteamAppList;
ISteamMusic *m_pSteamMusic;
ISteamMusicRemote *m_pSteamMusicRemote;
ISteamHTMLSurface *m_pSteamHTMLSurface;
ISteamInventory *m_pSteamInventory;
ISteamVideo *m_pSteamVideo;
ISteamParentalSettings *m_pSteamParentalSettings;
ISteamInput *m_pSteamInput;
};
class CSteamGameServerAPIContext
{
public:
CSteamGameServerAPIContext() { Clear(); }
inline void Clear() { memset( this, 0, sizeof(*this) ); }
inline bool Init(); // NOTE: This is defined in steam_gameserver.h, to avoid this file having to include everything
ISteamClient *SteamClient() const { return m_pSteamClient; }
ISteamGameServer *SteamGameServer() const { return m_pSteamGameServer; }
ISteamUtils *SteamGameServerUtils() const { return m_pSteamGameServerUtils; }
ISteamNetworking *SteamGameServerNetworking() const { return m_pSteamGameServerNetworking; }
ISteamGameServerStats *SteamGameServerStats() const { return m_pSteamGameServerStats; }
ISteamHTTP *SteamHTTP() const { return m_pSteamHTTP; }
ISteamInventory *SteamInventory() const { return m_pSteamInventory; }
ISteamUGC *SteamUGC() const { return m_pSteamUGC; }
ISteamApps *SteamApps() const { return m_pSteamApps; }
private:
ISteamClient *m_pSteamClient;
ISteamGameServer *m_pSteamGameServer;
ISteamUtils *m_pSteamGameServerUtils;
ISteamNetworking *m_pSteamGameServerNetworking;
ISteamGameServerStats *m_pSteamGameServerStats;
ISteamHTTP *m_pSteamHTTP;
ISteamInventory *m_pSteamInventory;
ISteamUGC *m_pSteamUGC;
ISteamApps *m_pSteamApps;
};

View file

@ -0,0 +1,110 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose:
//
//=============================================================================
#ifndef STEAM_GAMESERVER_H
#define STEAM_GAMESERVER_H
#ifdef _WIN32
#pragma once
#endif
#include "steam_api.h"
#include "isteamgameserver.h"
#include "isteamgameserverstats.h"
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
};
// Initialize SteamGameServer client and interface objects, and set server properties which may not be changed.
//
// After calling this function, you should set any additional server parameters, and then
// call ISteamGameServer::LogOnAnonymous() or ISteamGameServer::LogOn()
//
// - usSteamPort is the local port used to communicate with the steam servers.
// NOTE: unless you are using ver old Steam client binaries, this parameter is ignored, and
// you should pass 0. Gameservers now always use WebSockets to talk to Steam.
// This protocol is TCP-based and thus always uses an ephemeral local port.
// Older steam client binaries used UDP to talk to Steam, and this argument was useful.
// A future version of the SDK will remove this argument.
// - usGamePort is the port that clients will connect to for gameplay.
// - usQueryPort is the port that will manage server browser related duties and info
// pings from clients. 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 isteamgameserver.h.
// - The version string is usually in the form x.x.x.x, and is used by the master server to detect when the
// server is out of date. (Only servers with the latest version will be listed.)
inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
// Shutdown SteamGameSeverXxx interfaces, log out, and free resources.
S_API void SteamGameServer_Shutdown();
// Most Steam API functions allocate some amount of thread-local memory for
// parameter storage. Calling SteamGameServer_ReleaseCurrentThreadMemory()
// will free all API-related memory associated with the calling thread.
// This memory is released automatically by SteamGameServer_RunCallbacks(),
// so single-threaded servers do not need to explicitly call this function.
inline void SteamGameServer_ReleaseCurrentThreadMemory();
S_API bool SteamGameServer_BSecure();
S_API uint64 SteamGameServer_GetSteamID();
// Older SDKs exported this global pointer, but it is no longer supported.
// You should use SteamGameServerClient() or CSteamGameServerAPIContext to
// safely access the ISteamClient APIs from your game server application.
//S_API ISteamClient *g_pSteamClientGameServer;
// SteamGameServer_InitSafe has been replaced with SteamGameServer_Init and
// is no longer supported. Use SteamGameServer_Init instead.
//S_API void S_CALLTYPE SteamGameServer_InitSafe();
//=============================================================================
//
// Internal implementation details below
//
//=============================================================================
#ifndef STEAM_API_EXPORTS
// This function must be declared inline in the header so the module using steam_api.dll gets the version names they want.
inline bool CSteamGameServerAPIContext::Init()
{
m_pSteamClient = ::SteamGameServerClient();
if ( !m_pSteamClient )
return false;
m_pSteamGameServer = ::SteamGameServer();
m_pSteamGameServerUtils = ::SteamGameServerUtils();
m_pSteamGameServerNetworking = ::SteamGameServerNetworking();
m_pSteamGameServerStats = ::SteamGameServerStats();
m_pSteamHTTP = ::SteamGameServerHTTP();
m_pSteamInventory = ::SteamGameServerInventory();
m_pSteamUGC = ::SteamGameServerUGC();
m_pSteamApps = ::SteamGameServerApps();
if ( !m_pSteamGameServer || !m_pSteamGameServerUtils || !m_pSteamGameServerNetworking || !m_pSteamGameServerStats
|| !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC || !m_pSteamApps )
return false;
return true;
}
#endif
S_API bool S_CALLTYPE SteamInternal_GameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString )
{
if ( !SteamInternal_GameServer_Init( unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString ) )
return false;
return true;
}
inline void SteamGameServer_ReleaseCurrentThreadMemory()
{
SteamAPI_ReleaseCurrentThreadMemory();
}
#endif // STEAM_GAMESERVER_H

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
//========= Copyright © 1996-2010, Valve LLC, All rights reserved. ============
//
// 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
//
//=============================================================================
#include "steam_api.h"
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 );

View file

@ -0,0 +1,98 @@
//====== Copyright © 1996-2010, Valve Corporation, All rights reserved. =======
//
// Purpose: HTTP related enums, stuff that is shared by both clients and servers, and our
// UI projects goes here.
//
//=============================================================================
#ifndef STEAMHTTPENUMS_H
#define STEAMHTTPENUMS_H
#ifdef _WIN32
#pragma once
#endif
// HTTP related types
// 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,
k_EHTTPMethodOPTIONS,
k_EHTTPMethodPATCH,
// 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_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.
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, // You probably want 403 or something else. 401 implies you're sending a WWW-Authenticate header and the client can sent an Authorization header in response.
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_EHTTPStatusCode4xxUnknown = 418, // 418 is reserved, so we'll use it to mean unknown
k_EHTTPStatusCode429TooManyRequests = 429,
// Server error codes
k_EHTTPStatusCode500InternalServerError = 500,
k_EHTTPStatusCode501NotImplemented = 501,
k_EHTTPStatusCode502BadGateway = 502,
k_EHTTPStatusCode503ServiceUnavailable = 503,
k_EHTTPStatusCode504GatewayTimeout = 504,
k_EHTTPStatusCode505HTTPVersionNotSupported = 505,
k_EHTTPStatusCode5xxUnknown = 599,
};
#endif // STEAMHTTPENUMS_H

View file

@ -0,0 +1,112 @@
//====== Copyright 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose:
//
//=============================================================================
#ifndef STEAMPS3PARAMS_H
#define STEAMPS3PARAMS_H
#ifdef _WIN32
#pragma once
#endif
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// PlayStation 3 initialization parameters
//
// The following structure must be passed to when loading steam_api_ps3.prx
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
#define STEAM_PS3_PATH_MAX 1055
#define STEAM_PS3_SERVICE_ID_MAX 32
#define STEAM_PS3_COMMUNICATION_ID_MAX 10
#define STEAM_PS3_COMMUNICATION_SIG_MAX 160
#define STEAM_PS3_LANGUAGE_MAX 64
#define STEAM_PS3_REGION_CODE_MAX 16
#define STEAM_PS3_CURRENT_PARAMS_VER 2
struct SteamPS3Params_t
{
uint32 m_unVersion; // set to STEAM_PS3_CURRENT_PARAMS_VER
void *pReserved;
uint32 m_nAppId; // set to your game's appid
char m_rgchInstallationPath[ STEAM_PS3_PATH_MAX ]; // directory containing latest steam prx's and sdata. Can be read only (BDVD)
char m_rgchSystemCache[ STEAM_PS3_PATH_MAX ]; // temp working cache, not persistent
char m_rgchGameData[ STEAM_PS3_PATH_MAX ]; // persistent game data path for storing user data
char m_rgchNpServiceID[ STEAM_PS3_SERVICE_ID_MAX ];
char m_rgchNpCommunicationID[ STEAM_PS3_COMMUNICATION_ID_MAX ];
char m_rgchNpCommunicationSig[ STEAM_PS3_COMMUNICATION_SIG_MAX ];
// Language should be one of the following. must be zero terminated
// danish
// dutch
// english
// finnish
// french
// german
// italian
// korean
// norwegian
// polish
// portuguese
// russian
// schinese
// spanish
// swedish
// tchinese
char m_rgchSteamLanguage[ STEAM_PS3_LANGUAGE_MAX ];
// region codes are "SCEA", "SCEE", "SCEJ". must be zero terminated
char m_rgchRegionCode[ STEAM_PS3_REGION_CODE_MAX ];
// Should be SYS_TTYP3 through SYS_TTYP10, if it's 0 then Steam won't spawn a
// thread to read console input at all. Using this let's you use Steam console commands
// like: profile_on, profile_off, profile_dump, mem_stats, mem_validate.
unsigned int m_cSteamInputTTY;
struct Ps3netInit_t
{
bool m_bNeedInit;
void *m_pMemory;
int m_nMemorySize;
int m_flags;
} m_sysNetInitInfo;
struct Ps3jpgInit_t
{
bool m_bNeedInit;
} m_sysJpgInitInfo;
struct Ps3pngInit_t
{
bool m_bNeedInit;
} m_sysPngInitInfo;
struct Ps3sysutilUserInfo_t
{
bool m_bNeedInit;
} m_sysSysUtilUserInfo;
bool m_bIncludeNewsPage;
};
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// PlayStation 3 memory structure
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
#define STEAMPS3_MALLOC_INUSE 0x53D04A51
#define STEAMPS3_MALLOC_SYSTEM 0x0D102C48
#define STEAMPS3_MALLOC_OK 0xFFD04A51
struct SteamPS3Memory_t
{
bool m_bSingleAllocation; // If true, Steam will request one 6MB allocation and use the returned memory for all future allocations
// If false, Steam will make call malloc for each allocation
// required function pointers
void* (*m_pfMalloc)(size_t);
void* (*m_pfRealloc)(void *, size_t);
void (*m_pfFree)(void *);
size_t (*m_pUsable_size)(void*);
};
#endif // STEAMPS3PARAMS_H

View file

@ -0,0 +1,187 @@
//========= Copyright © 1996-2008, Valve LLC, All rights reserved. ============
//
// Purpose:
//
//=============================================================================
#ifndef STEAMTYPES_H
#define STEAMTYPES_H
#ifdef _WIN32
#pragma once
#endif
#define S_CALLTYPE __cdecl
// Steam-specific types. Defined here so this header file can be included in other code bases.
#ifndef WCHARTYPES_H
typedef unsigned char uint8;
#endif
#if defined( __GNUC__ ) && !defined(POSIX)
#if __GNUC__ < 4
#error "Steamworks requires GCC 4.X (4.2 or 4.4 have been tested)"
#endif
#define POSIX 1
#endif
#if defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__)
#define X64BITS
#endif
// Make sure VALVE_BIG_ENDIAN gets set on PS3, may already be set previously in Valve internal code.
#if !defined(VALVE_BIG_ENDIAN) && defined(_PS3)
#define VALVE_BIG_ENDIAN
#endif
typedef unsigned char uint8;
typedef signed char int8;
#if defined( _WIN32 )
typedef __int16 int16;
typedef unsigned __int16 uint16;
typedef __int32 int32;
typedef unsigned __int32 uint32;
typedef __int64 int64;
typedef unsigned __int64 uint64;
typedef int64 lint64;
typedef uint64 ulint64;
#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 // _WIN32
typedef short int16;
typedef unsigned short uint16;
typedef int int32;
typedef unsigned int uint32;
typedef long long int64;
typedef unsigned long long uint64;
// [u]int64 are actually defined as 'long long' and gcc 64-bit
// doesn't automatically consider them the same as 'long int'.
// Changing the types for [u]int64 is complicated by
// there being many definitions, so we just
// define a 'long int' here and use it in places that would
// otherwise confuse the compiler.
typedef long int lint64;
typedef unsigned long int ulint64;
#ifdef X64BITS
typedef long long intp;
typedef unsigned long long uintp;
#else
typedef int intp;
typedef unsigned int uintp;
#endif
#endif // else _WIN32
#ifdef API_GEN
# define STEAM_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
#else
# define STEAM_CLANG_ATTR(ATTR)
#endif
#define STEAM_METHOD_DESC(DESC) STEAM_CLANG_ATTR( "desc:" #DESC ";" )
#define STEAM_IGNOREATTR() STEAM_CLANG_ATTR( "ignore" )
#define STEAM_OUT_STRUCT() STEAM_CLANG_ATTR( "out_struct: ;" )
#define STEAM_OUT_STRING() STEAM_CLANG_ATTR( "out_string: ;" )
#define STEAM_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) STEAM_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC) STEAM_CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC )
#define STEAM_ARRAY_COUNT(COUNTER) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";" )
#define STEAM_ARRAY_COUNT_D(COUNTER, DESC) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
#define STEAM_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
#define STEAM_OUT_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
#define STEAM_OUT_STRING_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
#define STEAM_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";")
#define STEAM_CALL_RESULT(RESULT_TYPE) STEAM_CLANG_ATTR("callresult:" #RESULT_TYPE ";")
#define STEAM_CALL_BACK(RESULT_TYPE) STEAM_CLANG_ATTR("callback:" #RESULT_TYPE ";")
const int k_cubSaltSize = 8;
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 GID_t k_TxnIDNil = k_GIDNil;
const GID_t k_TxnIDUnknown = 0;
const JobID_t k_JobIDNil = 0xffffffffffffffffull;
// 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;
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;
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;
// 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;
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;
const PartnerId_t k_uPartnerIdInvalid = 0;
// ID for a depot content manifest
typedef uint64 ManifestId_t;
const ManifestId_t k_uManifestIdInvalid = 0;
// ID for cafe sites
typedef uint64 SiteId_t;
const SiteId_t k_ulSiteIdInvalid = 0;
// Party Beacon ID
typedef uint64 PartyBeaconID_t;
const PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0;
#endif // STEAMTYPES_H

View file

@ -0,0 +1,27 @@
//========= Copyright <20> 1996-2008, Valve LLC, All rights reserved. ============
//
// Purpose:
//
//=============================================================================
#ifndef STEAMUNIVERSE_H
#define STEAMUNIVERSE_H
#ifdef _WIN32
#pragma once
#endif
// 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, // no such universe anymore
k_EUniverseMax
};
#endif // STEAMUNIVERSE_H

View file

@ -10,7 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
#include "steamtypes.h"
//-----------------------------------------------------------------------------
@ -25,7 +25,7 @@ public:
virtual uint32 GetNumInstalledApps() = 0;
virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0;
virtual int GetAppName( AppId_t nAppID, OUT_STRING() char *pchName, int cchNameMax ) = 0; // returns -1 if no name was found
virtual int GetAppName( AppId_t nAppID, STEAM_OUT_STRING() 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
@ -33,30 +33,34 @@ public:
#define STEAMAPPLIST_INTERFACE_VERSION "STEAMAPPLIST_INTERFACE_VERSION001"
// Global interface accessor
inline ISteamAppList *SteamAppList();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIST_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//---------------------------------------------------------------------------------
// Purpose: Sent when a new app is installed
//---------------------------------------------------------------------------------
DEFINE_CALLBACK( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 );
CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 );
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_END(1)
//---------------------------------------------------------------------------------
// Purpose: Sent when an app is uninstalled
//---------------------------------------------------------------------------------
DEFINE_CALLBACK( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 );
CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 );
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_END(1)
#pragma pack( pop )

View file

@ -10,6 +10,8 @@
#pragma once
#endif
#include "steam_api_common.h"
const int k_cubAppProofOfPurchaseKeyMax = 240; // max supported length of a legacy cd key
@ -65,13 +67,16 @@ public:
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 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/<appid>//?param1=value1;param2=value2;param3=value3 etc.
// Returns the associated launch param if the game is run via steam://run/<appid>//?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;
// 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;
@ -85,19 +90,40 @@ public:
// member is k_uAppIdInvalid (zero).
virtual void RequestAllProofOfPurchaseKeys() = 0;
CALL_RESULT( FileDetailsResult_t )
STEAM_CALL_RESULT( FileDetailsResult_t )
virtual SteamAPICall_t GetFileDetails( const char* pszFileName ) = 0;
// Get command line if game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/.
// 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;
};
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"
// Global interface accessor
inline ISteamApps *SteamApps();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamApps *, SteamApps, STEAMAPPS_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamApps *SteamGameServerApps();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamApps *, SteamGameServerApps, STEAMAPPS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: posted after the user gains ownership of DLC & that DLC is installed
@ -134,12 +160,12 @@ struct RegisterActivationCodeResponse_t
//---------------------------------------------------------------------------------
// Purpose: posted after the user gains executes a steam url with query parameters
// such as steam://run/<appid>//?param1=value1;param2=value2;param3=value3; etc
// Purpose: posted after the user gains executes a Steam URL with command line or query parameters
// such as steam://run/<appid>//-commandline/?param1=value1&param2=value2&param3=value3 etc
// while the game is already running. The new params can be queried
// with GetLaunchQueryParam.
// with GetLaunchQueryParam and GetLaunchCommandLine
//---------------------------------------------------------------------------------
struct NewLaunchQueryParameters_t
struct NewUrlLaunchParameters_t
{
enum { k_iCallback = k_iSteamAppsCallbacks + 14 };
};

View file

@ -1,8 +1,9 @@
//====== Copyright <EFBFBD> 1996-2008, Valve Corporation, All rights reserved. =======
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Purpose: Main interface for loading and accessing Steamworks API's from the
// Steam client.
// For most uses, this code is wrapped inside of SteamAPI_Init()
// 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.
//=============================================================================
#ifndef ISTEAMCLIENT_H
@ -11,102 +12,7 @@
#pragma once
#endif
#include "steamtypes.h"
#include "steamclientpublic.h"
// Define compile time assert macros to let us validate the structure sizes.
#define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1];
#ifndef REFERENCE
#define REFERENCE(arg) ((void)arg)
#endif
#if ( defined(STEAM_API_EXPORTS) || defined(STEAM_API_NODLL) ) && !defined(API_GEN)
#define STEAM_PRIVATE_API( ... ) __VA_ARGS__
#elif defined(STEAM_API_EXPORTS) && defined(API_GEN)
#define STEAM_PRIVATE_API( ... )
#else
#define STEAM_PRIVATE_API( ... ) protected: __VA_ARGS__ public:
#endif
#if defined(__linux__) || defined(__APPLE__)
// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
// The 64-bit version of gcc has the alignment requirement for these types set to
// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
#define VALVE_CALLBACK_PACK_SMALL
#else
#define VALVE_CALLBACK_PACK_LARGE
#endif
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error ???
#endif
typedef struct ValvePackingSentinel_t
{
uint32 m_u32;
uint64 m_u64;
uint16 m_u16;
double m_d;
} ValvePackingSentinel_t;
#pragma pack( pop )
#if defined(VALVE_CALLBACK_PACK_SMALL)
VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 24 )
#elif defined(VALVE_CALLBACK_PACK_LARGE)
VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 32 )
#else
#error ???
#endif
// handle to a communication pipe to the Steam client
typedef int32 HSteamPipe;
// handle to single instance of a steam user
typedef int32 HSteamUser;
// function prototype
#if defined( POSIX )
#define __cdecl
#endif
extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *);
extern "C" typedef uint32 ( *SteamAPI_CheckCallbackRegistered_t )( int iCallbackNum );
#if defined( __SNC__ )
#pragma diag_suppress=1700 // warning 1700: class "%s" has virtual functions but non-virtual destructor
#endif
// interface predec
class ISteamUser;
class ISteamGameServer;
class ISteamFriends;
class ISteamUtils;
class ISteamMatchmaking;
class ISteamContentServer;
class ISteamMatchmakingServers;
class ISteamUserStats;
class ISteamApps;
class ISteamNetworking;
class ISteamRemoteStorage;
class ISteamScreenshots;
class ISteamMusic;
class ISteamMusicRemote;
class ISteamGameServerStats;
class ISteamPS3OverlayRender;
class ISteamHTTP;
class ISteamController;
class ISteamUGC;
class ISteamAppList;
class ISteamHTMLSurface;
class ISteamInventory;
class ISteamVideo;
class ISteamParentalSettings;
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
// Purpose: Interface to creating a new steam instance, or to
@ -185,6 +91,9 @@ public:
// user screenshots
virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// game search
virtual ISteamGameSearch *GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead.
STEAM_PRIVATE_API( virtual void RunFrame() = 0; )
@ -209,7 +118,7 @@ public:
// Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption.
STEAM_PRIVATE_API( virtual void *DEPRECATED_GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0 ; )
// Exposes the ISteamController interface
// 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
@ -240,287 +149,26 @@ public:
// Parental controls
virtual ISteamParentalSettings *GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Exposes the Steam Input interface for controller support
virtual ISteamInput *GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Steam Parties interface
virtual ISteamParties *GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
};
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient018"
#ifndef STEAM_API_EXPORTS
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient017"
// Global ISteamClient interface accessor
inline ISteamClient *SteamClient();
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamClient *, SteamClient, SteamInternal_CreateInterface( STEAMCLIENT_INTERFACE_VERSION ) );
//-----------------------------------------------------------------------------
// Purpose: Base values for callback identifiers, each callback must
// have a unique ID.
//-----------------------------------------------------------------------------
enum { k_iSteamUserCallbacks = 100 };
enum { k_iSteamGameServerCallbacks = 200 };
enum { k_iSteamFriendsCallbacks = 300 };
enum { k_iSteamBillingCallbacks = 400 };
enum { k_iSteamMatchmakingCallbacks = 500 };
enum { k_iSteamContentServerCallbacks = 600 };
enum { k_iSteamUtilsCallbacks = 700 };
enum { k_iClientFriendsCallbacks = 800 };
enum { k_iClientUserCallbacks = 900 };
enum { k_iSteamAppsCallbacks = 1000 };
enum { k_iSteamUserStatsCallbacks = 1100 };
enum { k_iSteamNetworkingCallbacks = 1200 };
enum { k_iClientRemoteStorageCallbacks = 1300 };
enum { k_iClientDepotBuilderCallbacks = 1400 };
enum { k_iSteamGameServerItemsCallbacks = 1500 };
enum { k_iClientUtilsCallbacks = 1600 };
enum { k_iSteamGameCoordinatorCallbacks = 1700 };
enum { k_iSteamGameServerStatsCallbacks = 1800 };
enum { k_iSteam2AsyncCallbacks = 1900 };
enum { k_iSteamGameStatsCallbacks = 2000 };
enum { k_iClientHTTPCallbacks = 2100 };
enum { k_iClientScreenshotsCallbacks = 2200 };
enum { k_iSteamScreenshotsCallbacks = 2300 };
enum { k_iClientAudioCallbacks = 2400 };
enum { k_iClientUnifiedMessagesCallbacks = 2500 };
enum { k_iSteamStreamLauncherCallbacks = 2600 };
enum { k_iClientControllerCallbacks = 2700 };
enum { k_iSteamControllerCallbacks = 2800 };
enum { k_iClientParentalSettingsCallbacks = 2900 };
enum { k_iClientDeviceAuthCallbacks = 3000 };
enum { k_iClientNetworkDeviceManagerCallbacks = 3100 };
enum { k_iClientMusicCallbacks = 3200 };
enum { k_iClientRemoteClientManagerCallbacks = 3300 };
enum { k_iClientUGCCallbacks = 3400 };
enum { k_iSteamStreamClientCallbacks = 3500 };
enum { k_IClientProductBuilderCallbacks = 3600 };
enum { k_iClientShortcutsCallbacks = 3700 };
enum { k_iClientRemoteControlManagerCallbacks = 3800 };
enum { k_iSteamAppListCallbacks = 3900 };
enum { k_iSteamMusicCallbacks = 4000 };
enum { k_iSteamMusicRemoteCallbacks = 4100 };
enum { k_iClientVRCallbacks = 4200 };
enum { k_iClientGameNotificationCallbacks = 4300 };
enum { k_iSteamGameNotificationCallbacks = 4400 };
enum { k_iSteamHTMLSurfaceCallbacks = 4500 };
enum { k_iClientVideoCallbacks = 4600 };
enum { k_iClientInventoryCallbacks = 4700 };
enum { k_iClientBluetoothManagerCallbacks = 4800 };
enum { k_iClientSharedConnectionCallbacks = 4900 };
enum { k_ISteamParentalSettingsCallbacks = 5000 };
enum { k_iClientShaderCallbacks = 5100 };
//-----------------------------------------------------------------------------
// The CALLBACK macros are for client side callback logging enabled with
// log_callback <first callnbackID> <last callbackID>
// Do not change any of these.
//-----------------------------------------------------------------------------
#ifdef STEAM_CALLBACK_INSPECTION_ENABLED
#define DEFINE_CALLBACK( callbackname, callbackid ) \
struct callbackname { \
typedef 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; } \
};
#else
#define DEFINE_CALLBACK( callbackname, callbackid ) struct callbackname { typedef callbackname SteamCallback_t; enum { k_iCallback = callbackid };
#define CALLBACK_MEMBER( varidx, vartype, varname ) public: vartype varname ;
#define CALLBACK_ARRAY( varidx, vartype, varname, varcount ) public: vartype varname [ varcount ];
#define END_CALLBACK_INTERNAL_BEGIN( numvars )
#define END_CALLBACK_INTERNAL_SWITCH( varidx )
#define END_CALLBACK_INTERNAL_END() };
#define END_DEFINE_CALLBACK_0() };
// The internal ISteamClient used for the gameserver interface.
// (This is actually the same thing. You really shouldn't need to access any of this stuff directly.)
inline ISteamClient *SteamGameServerClient() { return SteamClient(); }
#endif
#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( 4 ) \
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()
#endif // ISTEAMCLIENT_H

View file

@ -1,6 +1,12 @@
//====== Copyright 1996-2013, Valve Corporation, All rights reserved. =======
//====== Copyright 1996-2018, Valve Corporation, All rights reserved. =======
// Note: The older ISteamController interface has been deprecated in favor of ISteamInput - this interface
// was updated in this SDK but will be removed from future SDK's. The Steam Client will retain
// compatibility with the older interfaces so your any existing integrations should be unaffected.
//
// Purpose: interface to valve controller
// 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
//
//=============================================================================
@ -10,7 +16,8 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
#include "isteaminput.h"
#define STEAM_CONTROLLER_MAX_COUNT 16
@ -26,11 +33,13 @@
#define STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA -1.0f
#define STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA 1.0f
#ifndef ISTEAMINPUT_H
enum ESteamControllerPad
{
k_ESteamControllerPad_Left,
k_ESteamControllerPad_Right
};
#endif
enum EControllerSource
{
@ -42,12 +51,15 @@ enum EControllerSource
k_EControllerSource_Switch,
k_EControllerSource_LeftTrigger,
k_EControllerSource_RightTrigger,
k_EControllerSource_LeftBumper,
k_EControllerSource_RightBumper,
k_EControllerSource_Gyro,
k_EControllerSource_CenterTrackpad, // PS4
k_EControllerSource_RightJoystick, // Traditional Controllers
k_EControllerSource_DPad, // Traditional Controllers
k_EControllerSource_Key, // Keyboards with scan codes
k_EControllerSource_Mouse, // Traditional mouse
k_EControllerSource_Key, // Keyboards with scan codes - Unused
k_EControllerSource_Mouse, // Traditional mouse - Unused
k_EControllerSource_LeftGyro, // Secondary Gyro - Switch - Unused
k_EControllerSource_Count
};
@ -72,6 +84,10 @@ enum EControllerSourceMode
k_EControllerSourceMode_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 if you're
// using a lookup table please check the bounds of any origins returned by Steam.
enum EControllerActionOrigin
{
// Steam Controller
@ -237,9 +253,9 @@ enum EControllerActionOrigin
k_EControllerActionOrigin_SteamV2_Y,
k_EControllerActionOrigin_SteamV2_LeftBumper,
k_EControllerActionOrigin_SteamV2_RightBumper,
k_EControllerActionOrigin_SteamV2_LeftGrip,
k_EControllerActionOrigin_SteamV2_RightGrip,
k_EControllerActionOrigin_SteamV2_LeftGrip_Lower,
k_EControllerActionOrigin_SteamV2_LeftGrip_Upper,
k_EControllerActionOrigin_SteamV2_RightGrip_Lower,
k_EControllerActionOrigin_SteamV2_RightGrip_Upper,
k_EControllerActionOrigin_SteamV2_LeftBumper_Pressure,
k_EControllerActionOrigin_SteamV2_RightBumper_Pressure,
@ -280,13 +296,90 @@ enum EControllerActionOrigin
k_EControllerActionOrigin_SteamV2_Gyro_Yaw,
k_EControllerActionOrigin_SteamV2_Gyro_Roll,
k_EControllerActionOrigin_Count
// Switch - Pro or Joycons used as a single input device.
// This does not apply to a single joycon
k_EControllerActionOrigin_Switch_A,
k_EControllerActionOrigin_Switch_B,
k_EControllerActionOrigin_Switch_X,
k_EControllerActionOrigin_Switch_Y,
k_EControllerActionOrigin_Switch_LeftBumper,
k_EControllerActionOrigin_Switch_RightBumper,
k_EControllerActionOrigin_Switch_Plus, //Start
k_EControllerActionOrigin_Switch_Minus, //Back
k_EControllerActionOrigin_Switch_Capture,
k_EControllerActionOrigin_Switch_LeftTrigger_Pull,
k_EControllerActionOrigin_Switch_LeftTrigger_Click,
k_EControllerActionOrigin_Switch_RightTrigger_Pull,
k_EControllerActionOrigin_Switch_RightTrigger_Click,
k_EControllerActionOrigin_Switch_LeftStick_Move,
k_EControllerActionOrigin_Switch_LeftStick_Click,
k_EControllerActionOrigin_Switch_LeftStick_DPadNorth,
k_EControllerActionOrigin_Switch_LeftStick_DPadSouth,
k_EControllerActionOrigin_Switch_LeftStick_DPadWest,
k_EControllerActionOrigin_Switch_LeftStick_DPadEast,
k_EControllerActionOrigin_Switch_RightStick_Move,
k_EControllerActionOrigin_Switch_RightStick_Click,
k_EControllerActionOrigin_Switch_RightStick_DPadNorth,
k_EControllerActionOrigin_Switch_RightStick_DPadSouth,
k_EControllerActionOrigin_Switch_RightStick_DPadWest,
k_EControllerActionOrigin_Switch_RightStick_DPadEast,
k_EControllerActionOrigin_Switch_DPad_North,
k_EControllerActionOrigin_Switch_DPad_South,
k_EControllerActionOrigin_Switch_DPad_West,
k_EControllerActionOrigin_Switch_DPad_East,
k_EControllerActionOrigin_Switch_ProGyro_Move, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Pitch, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Yaw, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Roll, // Primary Gyro in Pro Controller, or Right JoyCon
// Switch JoyCon Specific
k_EControllerActionOrigin_Switch_RightGyro_Move, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Pitch, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Yaw, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Roll, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_LeftGyro_Move,
k_EControllerActionOrigin_Switch_LeftGyro_Pitch,
k_EControllerActionOrigin_Switch_LeftGyro_Yaw,
k_EControllerActionOrigin_Switch_LeftGyro_Roll,
k_EControllerActionOrigin_Switch_LeftGrip_Lower, // Left JoyCon SR Button
k_EControllerActionOrigin_Switch_LeftGrip_Upper, // Left JoyCon SL Button
k_EControllerActionOrigin_Switch_RightGrip_Lower, // Right JoyCon SL Button
k_EControllerActionOrigin_Switch_RightGrip_Upper, // Right JoyCon SR Button
k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
};
enum ESteamControllerLEDFlag
#ifndef ISTEAMINPUT_H
enum EXboxOrigin
{
k_ESteamControllerLEDFlag_SetColor,
k_ESteamControllerLEDFlag_RestoreUserDefault
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
@ -295,8 +388,24 @@ enum ESteamInputType
k_ESteamInputType_SteamController,
k_ESteamInputType_XBox360Controller,
k_ESteamInputType_XBoxOneController,
k_ESteamInputType_GenericXInput,
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,
};
#endif
enum ESteamControllerLEDFlag
{
k_ESteamControllerLEDFlag_SetColor,
k_ESteamControllerLEDFlag_RestoreUserDefault
};
// ControllerHandle_t is used to refer to a specific controller.
@ -312,6 +421,11 @@ typedef uint64 ControllerAnalogActionHandle_t;
#pragma pack( push, 1 )
#ifdef ISTEAMINPUT_H
#define ControllerAnalogActionData_t InputAnalogActionData_t
#define ControllerDigitalActionData_t InputDigitalActionData_t
#define ControllerMotionData_t InputMotionData_t
#else
struct ControllerAnalogActionData_t
{
// Type of data coming from this action, this will match what got specified in the action set
@ -351,12 +465,12 @@ struct ControllerMotionData_t
float rotVelY;
float rotVelZ;
};
#endif
#pragma pack( pop )
//-----------------------------------------------------------------------------
// Purpose: Native Steam controller support API
// Purpose: Steam Input API
//-----------------------------------------------------------------------------
class ISteamController
{
@ -368,7 +482,8 @@ public:
// 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.
// 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
@ -376,11 +491,10 @@ public:
// 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;
@ -390,13 +504,16 @@ public:
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;
@ -404,7 +521,8 @@ public:
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
// 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.
@ -414,11 +532,25 @@ public:
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
// 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;
virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 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;
@ -426,36 +558,48 @@ public:
// 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.
// 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;
// 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;
//-----------------------------------------------------------------------------
// Utility functions availible without using the rest of Steam Input API
//-----------------------------------------------------------------------------
// 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;
// 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;
};
#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController006"
#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController007"
// Global interface accessor
inline ISteamController *SteamController();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamController *, SteamController, STEAMCONTROLLER_INTERFACE_VERSION );
#endif // ISTEAMCONTROLLER_H

View file

@ -1,4 +1,4 @@
//====== Copyright (C) 1996-2008, Valve Corporation, All rights reserved. =====
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Purpose: interface to both friends list data and general information about users
//
@ -10,9 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steamclientpublic.h"
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
// Purpose: set of relationships to other users
@ -59,6 +57,7 @@ enum EPersonaState
k_EPersonaStateSnooze = 4, // auto-away for a long time
k_EPersonaStateLookingToTrade = 5, // Online, trading
k_EPersonaStateLookingToPlay = 6, // Online, wanting to play
k_EPersonaStateInvisible = 7, // Online, but appears offline to friends. This status is never published to clients.
k_EPersonaStateMax,
};
@ -92,7 +91,7 @@ enum EFriendFlags
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct FriendGameInfo_t
{
@ -143,7 +142,7 @@ struct FriendSessionStateInfo_t
const uint32 k_cubChatMetadataMax = 8192;
// size limits on Rich Presence data
enum { k_cchMaxRichPresenceKeys = 20 };
enum { k_cchMaxRichPresenceKeys = 30 };
enum { k_cchMaxRichPresenceKeyLength = 64 };
enum { k_cchMaxRichPresenceValueLength = 256 };
@ -155,6 +154,21 @@ enum EOverlayToStoreFlag
k_EOverlayToStoreFlag_AddToCartAndShow = 2,
};
//-----------------------------------------------------------------------------
// Purpose: Tells Steam where to place the browser window inside the overlay
//-----------------------------------------------------------------------------
enum EActivateGameOverlayToWebPageMode
{
k_EActivateGameOverlayToWebPageMode_Default = 0, // Browser will open next to all other windows that the user has open in the overlay.
// The window will remain open, even if the user closes then re-opens the overlay.
k_EActivateGameOverlayToWebPageMode_Modal = 1 // Browser will be opened in a special overlay configuration which hides all other windows
// that the user has open in the overlay. When the user closes the overlay, the browser window
// will also close. When the user closes the browser window, the overlay will automatically close.
};
//-----------------------------------------------------------------------------
// 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
@ -176,7 +190,7 @@ public:
//
// 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.
CALL_RESULT( SetPersonaNameResponse_t )
STEAM_CALL_RESULT( SetPersonaNameResponse_t )
virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0;
// gets the status of the current user
@ -207,13 +221,14 @@ public:
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, OUT_STRUCT() FriendGameInfo_t *pFriendGameInfo ) = 0;
virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, STEAM_OUT_STRUCT() 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
@ -226,7 +241,7 @@ public:
// 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, OUT_ARRAY_CALL(nMembersCount, GetFriendsGroupMembersCount, friendsGroupID ) CSteamID *pOutSteamIDMembers, int nMembersCount ) = 0;
virtual void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, STEAM_OUT_ARRAY_CALL(nMembersCount, GetFriendsGroupMembersCount, 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
@ -240,7 +255,7 @@ public:
// 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( ARRAY_COUNT(cClansToRequest) CSteamID *psteamIDClans, int cClansToRequest ) = 0;
virtual SteamAPICall_t DownloadClanActivityCounts( STEAM_ARRAY_COUNT(cClansToRequest) 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
@ -256,7 +271,8 @@ public:
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"
// 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
@ -274,7 +290,7 @@ public:
// 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;
virtual void ActivateGameOverlayToWebPage( const char *pchURL, EActivateGameOverlayToWebPageMode eMode = k_EActivateGameOverlayToWebPageMode_Default ) = 0;
// activates game overlay to store page for app
virtual void ActivateGameOverlayToStore( AppId_t nAppID, EOverlayToStoreFlag eFlag ) = 0;
@ -309,7 +325,7 @@ public:
// 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
CALL_RESULT( ClanOfficerListResponse_t )
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
@ -343,10 +359,10 @@ public:
// 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
// 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
@ -361,13 +377,13 @@ public:
// 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
CALL_RESULT( JoinClanChatRoomCompletionResult_t )
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, OUT_STRUCT() CSteamID *psteamidChatter ) = 0;
virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, STEAM_OUT_STRUCT() CSteamID *psteamidChatter ) = 0;
virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0;
// interact with the Steam (game overlay / desktop)
@ -382,18 +398,30 @@ public:
virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
// following apis
CALL_RESULT( FriendsGetFollowerCount_t )
STEAM_CALL_RESULT( FriendsGetFollowerCount_t )
virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0;
CALL_RESULT( FriendsIsFollowing_t )
STEAM_CALL_RESULT( FriendsIsFollowing_t )
virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0;
CALL_RESULT( FriendsEnumerateFollowingList_t )
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;
};
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends015"
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017"
// Global interface accessor
inline ISteamFriends *SteamFriends();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamFriends *, SteamFriends, STEAMFRIENDS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@ -401,7 +429,7 @@ public:
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
@ -431,9 +459,10 @@ enum EPersonaChange
k_EPersonaChangeLeftSource = 0x0100,
k_EPersonaChangeRelationshipChanged = 0x0200,
k_EPersonaChangeNameFirstSet = 0x0400,
k_EPersonaChangeFacebookInfo = 0x0800,
k_EPersonaChangeBroadcast = 0x0800,
k_EPersonaChangeNickname = 0x1000,
k_EPersonaChangeSteamLevel = 0x2000,
k_EPersonaChangeRichPresence = 0x4000,
};
@ -633,6 +662,13 @@ struct SetPersonaNameResponse_t
EResult m_result; // detailed result code
};
//-----------------------------------------------------------------------------
// Purpose: Invoked when the status of unread messages changes
//-----------------------------------------------------------------------------
struct UnreadChatMessagesChanged_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 48 };
};
#pragma pack( pop )

View file

@ -10,9 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steamtypes.h"
#include "steamclientpublic.h"
#include "steam_api_common.h"
// list of possible return values from the ISteamGameCoordinator API
@ -55,7 +53,7 @@ public:
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
// callback notification - A new message is available for reading from the message queue

View file

@ -10,7 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1)
@ -193,7 +193,7 @@ public:
// these two functions s are deprecated, and will not return results
// they will be removed in a future version of the SDK
virtual void GetGameplayStats( ) = 0;
CALL_RESULT( GSReputation_t )
STEAM_CALL_RESULT( GSReputation_t )
virtual SteamAPICall_t GetServerReputation() = 0;
// Returns the public IP of the server according to Steam, useful when the server is
@ -241,17 +241,21 @@ public:
virtual void ForceHeartbeat() = 0;
// associate this game server with this clan for the purposes of computing player compat
CALL_RESULT( AssociateWithClanResult_t )
STEAM_CALL_RESULT( AssociateWithClanResult_t )
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
CALL_RESULT( ComputeNewPlayerCompatibilityResult_t )
STEAM_CALL_RESULT( ComputeNewPlayerCompatibilityResult_t )
virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0;
};
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer012"
// Global accessor
inline ISteamGameServer *SteamGameServer();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServer *, SteamGameServer, STEAMGAMESERVER_INTERFACE_VERSION );
// game server flags
const uint32 k_unServerFlagNone = 0x00;
const uint32 k_unServerFlagActive = 0x01; // server has users playing
@ -271,7 +275,7 @@ const uint32 k_unServerFlagPrivate = 0x20; // server shouldn't list on master
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif

View file

@ -10,7 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
// Purpose: Functions for authenticating users via Steam to play on a game server
@ -23,7 +23,7 @@ public:
// 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
CALL_RESULT( GSStatsReceived_t )
STEAM_CALL_RESULT( GSStatsReceived_t )
virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0;
// requests stat information for a user, usable after a successful call to RequestUserStats()
@ -48,19 +48,23 @@ public:
// 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.
CALL_RESULT( GSStatsStored_t )
STEAM_CALL_RESULT( GSStatsStored_t )
virtual SteamAPICall_t StoreUserStats( CSteamID steamIDUser ) = 0;
};
#define STEAMGAMESERVERSTATS_INTERFACE_VERSION "SteamGameServerStats001"
// Global accessor
inline ISteamGameServerStats *SteamGameServerStats();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServerStats *, SteamGameServerStats, STEAMGAMESERVERSTATS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------

View file

@ -10,7 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
typedef uint32 HHTMLBrowser;
const uint32 INVALID_HTMLBROWSER = 0;
@ -40,7 +40,7 @@ public:
// not implement these callback handlers, the browser may appear to hang instead of
// navigating to new pages or triggering javascript popups.
//
CALL_RESULT( HTML_BrowserReady_t )
STEAM_CALL_RESULT( HTML_BrowserReady_t )
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
@ -137,8 +137,9 @@ public:
k_eHTMLKeyModifier_ShiftDown = 1 << 2,
};
// keyboard interactions, native keycode is the virtual key code value from your OS
virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0;
// 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;
@ -181,6 +182,9 @@ public:
// 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
@ -197,11 +201,15 @@ public:
virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0;
// You MUST call this in response to a HTML_FileOpenDialog_t callback
IGNOREATTR()
STEAM_IGNOREATTR()
virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
};
#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_004"
#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_005"
// Global interface accessor
inline ISteamHTMLSurface *SteamHTMLSurface();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTMLSurface *, SteamHTMLSurface, STEAMHTMLSURFACE_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@ -209,156 +217,156 @@ public:
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// 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()
STEAM_CALLBACK_BEGIN( HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN(HTML_NeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 2)
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint
STEAM_CALLBACK_MEMBER(1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called
STEAM_CALLBACK_MEMBER(2, uint32, unWide) // the total width of the pBGRA texture
STEAM_CALLBACK_MEMBER(3, uint32, unTall) // the total height of the pBGRA texture
STEAM_CALLBACK_MEMBER(4, uint32, unUpdateX) // the offset in X for the damage rect for this update
STEAM_CALLBACK_MEMBER(5, uint32, unUpdateY) // the offset in Y for the damage rect for this update
STEAM_CALLBACK_MEMBER(6, uint32, unUpdateWide) // the width of the damage rect for this update
STEAM_CALLBACK_MEMBER(7, uint32, unUpdateTall) // the height of the damage rect for this update
STEAM_CALLBACK_MEMBER(8, uint32, unScrollX) // the page scroll the browser was at when this texture was rendered
STEAM_CALLBACK_MEMBER(9, uint32, unScrollY) // the page scroll the browser was at when this texture was rendered
STEAM_CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this page when rendered
STEAM_CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN(HTML_StartRequest_t, k_iSteamHTMLSurfaceCallbacks + 3)
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface navigating
STEAM_CALLBACK_MEMBER(1, const char *, pchURL) // the url they wish to navigate to
STEAM_CALLBACK_MEMBER(2, const char *, pchTarget) // the html link target type (i.e _blank, _self, _parent, _top )
STEAM_CALLBACK_MEMBER(3, const char *, pchPostData ) // any posted data for the request
STEAM_CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4)
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_URLChanged_t, k_iSteamHTMLSurfaceCallbacks + 5 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface navigating
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // the url they wish to navigate to
STEAM_CALLBACK_MEMBER( 2, const char *, pchPostData ) // any posted data for the request
STEAM_CALLBACK_MEMBER( 3, bool, bIsRedirect ) // true if this was a http/html redirect from the last load request
STEAM_CALLBACK_MEMBER( 4, const char *, pchPageTitle ) // the title of the page
STEAM_CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_FinishedRequest_t, k_iSteamHTMLSurfaceCallbacks + 6 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) //
STEAM_CALLBACK_MEMBER( 2, const char *, pchPageTitle ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_OpenLinkInNewTab_t, k_iSteamHTMLSurfaceCallbacks + 7 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_ChangedTitle_t, k_iSteamHTMLSurfaceCallbacks + 8 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_SearchResults_t, k_iSteamHTMLSurfaceCallbacks + 9 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, unResults ) //
STEAM_CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_CanGoBackAndForward_t, k_iSteamHTMLSurfaceCallbacks + 10 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, bool, bCanGoBack ) //
STEAM_CALLBACK_MEMBER( 2, bool, bCanGoForward ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_HorizontalScroll_t, k_iSteamHTMLSurfaceCallbacks + 11 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, unScrollMax ) //
STEAM_CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) //
STEAM_CALLBACK_MEMBER( 3, float, flPageScale ) //
STEAM_CALLBACK_MEMBER( 4, bool , bVisible ) //
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_VerticalScroll_t, k_iSteamHTMLSurfaceCallbacks + 12 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, unScrollMax ) //
STEAM_CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) //
STEAM_CALLBACK_MEMBER( 3, float, flPageScale ) //
STEAM_CALLBACK_MEMBER( 4, bool, bVisible ) //
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, x ) // NOTE - Not currently set
STEAM_CALLBACK_MEMBER( 2, uint32, y ) // NOTE - Not currently set
STEAM_CALLBACK_MEMBER( 3, const char *, pchURL ) //
STEAM_CALLBACK_MEMBER( 4, bool, bInput ) //
STEAM_CALLBACK_MEMBER( 5, bool, bLiveLink ) //
STEAM_CALLBACK_END(6)
@ -366,98 +374,104 @@ 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()
STEAM_CALLBACK_BEGIN( HTML_JSAlert_t, k_iSteamHTMLSurfaceCallbacks + 14 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_JSConfirm_t, k_iSteamHTMLSurfaceCallbacks + 15 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_FileOpenDialog_t, k_iSteamHTMLSurfaceCallbacks + 16 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) //
STEAM_CALLBACK_MEMBER( 2, const char *, pchInitialFile ) //
STEAM_CALLBACK_END(3)
//-----------------------------------------------------------------------------
// Purpose: a new html window has been created
// Purpose: a new html window is being created.
//
// IMPORTANT NOTE: at this time, the API does not allow you to acknowledge or
// render the contents of this new window, so the new window is always destroyed
// immediately. The URL and other parameters of the new window are passed here
// to give your application the opportunity to call CreateBrowser and set up
// a new browser in response to the attempted popup, if you wish to do so.
//-----------------------------------------------------------------------------
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()
STEAM_CALLBACK_BEGIN( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the current surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // the page to load
STEAM_CALLBACK_MEMBER( 2, uint32, unX ) // the x pos into the page to display the popup
STEAM_CALLBACK_MEMBER( 3, uint32, unY ) // the y pos into the page to display the popup
STEAM_CALLBACK_MEMBER( 4, uint32, unWide ) // the total width of the pBGRA texture
STEAM_CALLBACK_MEMBER( 5, uint32, unTall ) // the total height of the pBGRA texture
STEAM_CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle_IGNORE )
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
STEAM_CALLBACK_END(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()
STEAM_CALLBACK_BEGIN( HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
STEAM_CALLBACK_END(1)
//-----------------------------------------------------------------------------
// Purpose: The browser has restarted due to an internal failure, use this new handle value
//-----------------------------------------------------------------------------
DEFINE_CALLBACK( HTML_BrowserRestarted_t, k_iSteamHTMLSurfaceCallbacks + 27 )
CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this is the new browser handle after the restart
CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls
END_DEFINE_CALLBACK_2()
STEAM_CALLBACK_BEGIN( HTML_BrowserRestarted_t, k_iSteamHTMLSurfaceCallbacks + 27 )
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this is the new browser handle after the restart
STEAM_CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls
STEAM_CALLBACK_END(2)
#pragma pack( pop )

View file

@ -10,7 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
#include "steamhttpenums.h"
// Handle to a HTTP Request handle
@ -128,7 +128,8 @@ public:
// 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
// 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
@ -139,7 +140,15 @@ public:
virtual bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, bool *pbWasTimedOut ) = 0;
};
#define STEAMHTTP_INTERFACE_VERSION "STEAMHTTP_INTERFACE_VERSION002"
#define STEAMHTTP_INTERFACE_VERSION "STEAMHTTP_INTERFACE_VERSION003"
// Global interface accessor
inline ISteamHTTP *SteamHTTP();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamHTTP, STEAMHTTP_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamHTTP *SteamGameServerHTTP();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamGameServerHTTP, STEAMHTTP_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@ -147,7 +156,7 @@ public:
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct HTTPRequestCompleted_t

View file

@ -0,0 +1,619 @@
//====== 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 "steam_api_common.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 ISteamInput
{
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_VERSION "SteamInput001"
// Global interface accessor
inline ISteamInput *SteamInput();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTERFACE_VERSION );
#endif // ISTEAMINPUT_H

View file

@ -10,7 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@ -18,7 +18,7 @@
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
@ -86,14 +86,14 @@ public:
// 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.)
STEAM_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.)
STEAM_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,
STEAM_OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray,
uint32 *punOutItemsArraySize ) = 0;
// In combination with GetResultItems, you can use GetResultItemProperty to retrieve
@ -111,21 +111,21 @@ public:
virtual bool GetResultItemProperty( SteamInventoryResult_t resultHandle,
uint32 unItemIndex,
const char *pchPropertyName,
OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
STEAM_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.)
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.
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.)
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.
METHOD_DESC(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;
@ -139,7 +139,7 @@ public:
// 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.)
STEAM_METHOD_DESC(Captures the entire state of the current users Steam inventory.)
virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0;
@ -150,8 +150,8 @@ public:
// 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;
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, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0;
// RESULT SERIALIZATION AND AUTHENTICATION
@ -169,7 +169,7 @@ public:
// 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;
virtual bool SerializeResult( SteamInventoryResult_t resultHandle, STEAM_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.
@ -187,7 +187,7 @@ public:
// 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;
virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0;
// INVENTORY ASYNC MODIFICATION
@ -199,13 +199,13 @@ public:
// 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;
virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_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).)
STEAM_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
@ -213,12 +213,12 @@ public:
// 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;
virtual bool AddPromoItems( SteamInventoryResult_t *pResultHandle, STEAM_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.)
STEAM_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.
@ -230,8 +230,8 @@ public:
// 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;
STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength,
STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0;
// TransferItemQuantity() is intended for use with items which are "stackable" (can have
@ -245,7 +245,7 @@ public:
//
// Deprecated. Calling this method is not required for proper playtime accounting.
METHOD_DESC( Deprecated method. Playtime accounting is performed on the Steam servers. )
STEAM_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
@ -257,14 +257,14 @@ public:
// 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.)
STEAM_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;
STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength,
STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0;
// ITEM DEFINITIONS
@ -281,7 +281,7 @@ public:
// 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.)
STEAM_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
@ -290,8 +290,8 @@ public:
// 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;
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
STEAM_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
@ -303,12 +303,12 @@ public:
// 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;
STEAM_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.
CALL_RESULT( SteamInventoryEligiblePromoItemDefIDs_t )
STEAM_CALL_RESULT( SteamInventoryEligiblePromoItemDefIDs_t )
virtual SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs( CSteamID steamID ) = 0;
// After handling a SteamInventoryEligiblePromoItemDefIDs_t call result, use this
@ -316,19 +316,19 @@ public:
// 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;
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
STEAM_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.
CALL_RESULT( SteamInventoryStartPurchaseResult_t )
virtual SteamAPICall_t StartPurchase( ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
STEAM_CALL_RESULT( SteamInventoryStartPurchaseResult_t )
virtual SteamAPICall_t StartPurchase( STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
// Request current prices for all applicable item definitions
CALL_RESULT( SteamInventoryRequestPricesResult_t )
STEAM_CALL_RESULT( SteamInventoryRequestPricesResult_t )
virtual SteamAPICall_t RequestPrices() = 0;
// Returns the number of items with prices. Need to call RequestPrices() first.
@ -336,13 +336,14 @@ public:
// 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,
virtual bool GetItemsWithPrices( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs,
STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pCurrentPrices,
STEAM_ARRAY_COUNT(unArrayLength) STEAM_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 *pPrice ) = 0;
virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pCurrentPrice, uint64 *pBasePrice ) = 0;
// Create a request to update properties on items
virtual SteamInventoryUpdateHandle_t StartUpdateProperties() = 0;
@ -358,8 +359,15 @@ public:
};
#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V002"
#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V003"
// Global interface accessor
inline ISteamInventory *SteamInventory();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInventory *, SteamInventory, STEAMINVENTORY_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamInventory *SteamGameServerInventory();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamInventory *, SteamGameServerInventory, STEAMINVENTORY_INTERFACE_VERSION );
// SteamInventoryResultReady_t callbacks are fired whenever asynchronous
// results transition from "Pending" to "OK" or an error state. There will

View file

@ -10,10 +10,8 @@
#pragma once
#endif
#include "steamtypes.h"
#include "steamclientpublic.h"
#include "steam_api_common.h"
#include "matchmakingtypes.h"
#include "isteamclient.h"
#include "isteamfriends.h"
// lobby type description
@ -103,7 +101,7 @@ public:
}
*/
//
CALL_RESULT( LobbyMatchList_t )
STEAM_CALL_RESULT( LobbyMatchList_t )
virtual SteamAPICall_t RequestLobbyList() = 0;
// filters for lobbies
// this needs to be called before RequestLobbyList() to take effect
@ -134,14 +132,14 @@ public:
// 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)
CALL_RESULT( LobbyCreated_t )
STEAM_CALL_RESULT( LobbyCreated_t )
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
CALL_RESULT( LobbyEnter_t )
STEAM_CALL_RESULT( LobbyEnter_t )
virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0;
// Leave a lobby; this will take effect immediately on the client side
@ -204,7 +202,7 @@ public:
// *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, OUT_STRUCT() CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, STEAM_OUT_STRUCT() 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
@ -220,7 +218,7 @@ public:
// 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, OUT_STRUCT() CSteamID *psteamIDGameServer ) = 0;
virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, STEAM_OUT_STRUCT() CSteamID *psteamIDGameServer ) = 0;
// set the limit on the # of users who can join the lobby
virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0;
@ -256,10 +254,13 @@ public:
// after completion, the local user will no longer be the owner
virtual void CheckForPSNGameBootInvite( unsigned int iGameBootAttributes ) = 0;
#endif
CALL_BACK( LobbyChatUpdate_t )
STEAM_CALL_BACK( LobbyChatUpdate_t )
};
#define STEAMMATCHMAKING_INTERFACE_VERSION "SteamMatchMaking009"
// Global interface accessor
inline ISteamMatchmaking *SteamMatchmaking();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMatchmaking *, SteamMatchmaking, STEAMMATCHMAKING_INTERFACE_VERSION );
//-----------------------------------------------------------------------------
// Callback interfaces for server list functions (see ISteamMatchmakingServers below)
@ -391,12 +392,12 @@ 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, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestInternetServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestLANServerList( AppId_t iApp, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestFriendsServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestFavoritesServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestHistoryServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestSpectatorServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestFriendsServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestFavoritesServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestHistoryServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual HServerListRequest RequestSpectatorServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) 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.
@ -522,6 +523,10 @@ public:
};
#define STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION "SteamMatchMakingServers002"
// Global interface accessor
inline ISteamMatchmakingServers *SteamMatchmakingServers();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMatchmakingServers *, SteamMatchmakingServers, STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION );
// game server flags
const uint32 k_unFavoriteFlagNone = 0x00;
const uint32 k_unFavoriteFlagFavorite = 0x01; // this game favorite entry is for the favorites list
@ -545,16 +550,181 @@ enum EChatMemberStateChange
#define BChatMemberStateChangeRemoved( rgfChatMemberStateChangeFlags ) ( rgfChatMemberStateChangeFlags & ( k_EChatMemberStateChangeDisconnected | k_EChatMemberStateChangeLeft | k_EChatMemberStateChangeKicked | k_EChatMemberStateChangeBanned ) )
//-----------------------------------------------------------------------------
// Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system)
// Purpose: Functions for match making services for clients to get to favorites
// and to operate on game lobbies.
//-----------------------------------------------------------------------------
class ISteamGameSearch
{
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 EGameSearchErrorCode_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 EGameSearchErrorCode_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 EGameSearchErrorCode_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 EGameSearchErrorCode_t AcceptGame() = 0;
virtual EGameSearchErrorCode_t DeclineGame() = 0;
// after receiving GameStartedByHostCallback_t get connection details to server
virtual EGameSearchErrorCode_t RetrieveConnectionDetails( CSteamID steamIDHost, char *pchConnectionDetails, int cubConnectionDetails ) = 0;
// leaves queue if still waiting
virtual EGameSearchErrorCode_t EndGameSearch() = 0;
// =============================================================================================
// Game Host APIs
// a keyname and a list of comma separated values: all the values you allow
virtual EGameSearchErrorCode_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 EGameSearchErrorCode_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 EGameSearchErrorCode_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 EGameSearchErrorCode_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 EGameSearchErrorCode_t CancelRequestPlayersForGame() = 0;
// submit a result for one player. does not end the game. ullUniqueGameID continues to describe this game
virtual EGameSearchErrorCode_t SubmitPlayerResult( uint64 ullUniqueGameID, CSteamID steamIDPlayer, EPlayerResult_t EPlayerResult ) = 0;
// ends the game. no further SubmitPlayerResults for ullUniqueGameID will be accepted
// any future requests will provide a new ullUniqueGameID
virtual EGameSearchErrorCode_t EndGame( uint64 ullUniqueGameID ) = 0;
};
#define STEAMGAMESEARCH_INTERFACE_VERSION "SteamMatchGameSearch001"
// Global interface accessor
inline ISteamGameSearch *SteamGameSearch();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamGameSearch *, SteamGameSearch, STEAMGAMESEARCH_INTERFACE_VERSION );
//-----------------------------------------------------------------------------
// Purpose: Functions for quickly creating a Party with friends or acquaintances,
// EG from chat rooms.
//-----------------------------------------------------------------------------
enum ESteamPartyBeaconLocationType
{
k_ESteamPartyBeaconLocationType_Invalid = 0,
k_ESteamPartyBeaconLocationType_ChatGroup = 1,
k_ESteamPartyBeaconLocationType_Max,
};
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct SteamPartyBeaconLocation_t
{
ESteamPartyBeaconLocationType m_eType;
uint64 m_ulLocationID;
};
enum ESteamPartyBeaconLocationData
{
k_ESteamPartyBeaconLocationDataInvalid = 0,
k_ESteamPartyBeaconLocationDataName = 1,
k_ESteamPartyBeaconLocationDataIconURLSmall = 2,
k_ESteamPartyBeaconLocationDataIconURLMedium = 3,
k_ESteamPartyBeaconLocationDataIconURLLarge = 4,
};
class ISteamParties
{
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, STEAM_OUT_STRUCT() SteamPartyBeaconLocation_t *pLocation, STEAM_OUT_STRING_COUNT(cchMetadata) 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
STEAM_CALL_RESULT( JoinPartyCallback_t )
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.
STEAM_CALL_RESULT( CreateBeaconCallback_t )
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).
STEAM_CALL_RESULT( ChangeNumOpenSlotsCallback_t )
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, STEAM_OUT_STRING_COUNT(cchDataStringOut) char *pchDataStringOut, int cchDataStringOut ) = 0;
};
#define STEAMPARTIES_INTERFACE_VERSION "SteamParties002"
// Global interface accessor
inline ISteamParties *SteamParties();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamParties *, SteamParties, STEAMPARTIES_INTERFACE_VERSION );
//-----------------------------------------------------------------------------
// Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system)
//-----------------------------------------------------------------------------
// Purpose: a server was added/removed from the favorites list, you should refresh now
//-----------------------------------------------------------------------------
@ -745,6 +915,171 @@ struct FavoritesListAccountsUpdated_t
EResult m_eResult;
};
//-----------------------------------------------------------------------------
// Callbacks for ISteamGameSearch (which go through the regular Steam callback registration system)
struct SearchForGameProgressCallback_t
{
enum { k_iCallback = k_iSteamGameSearchCallbacks + 1 };
uint64 m_ullSearchID; // all future callbacks referencing this search will include this Search ID
EResult m_eResult; // if search has started this result will be k_EResultOK, any other value indicates search has failed to start or has terminated
CSteamID m_lobbyID; // lobby ID if lobby search, invalid steamID otherwise
CSteamID m_steamIDEndedSearch; // if search was terminated, steamID that terminated search
int32 m_nSecondsRemainingEstimate;
int32 m_cPlayersSearching;
};
// notification to all players searching that a game has been found
struct SearchForGameResultCallback_t
{
enum { k_iCallback = k_iSteamGameSearchCallbacks + 2 };
uint64 m_ullSearchID;
EResult m_eResult; // if game/host was lost this will be an error value
// if m_bGameFound is true the following are non-zero
int32 m_nCountPlayersInGame;
int32 m_nCountAcceptedGame;
// if m_steamIDHost is valid the host has started the game
CSteamID m_steamIDHost;
bool m_bFinalCallback;
};
//-----------------------------------------------------------------------------
// ISteamGameSearch : Game Host API callbacks
// callback from RequestPlayersForGame when the matchmaking service has started or ended search
// callback will also follow a call from CancelRequestPlayersForGame - m_bSearchInProgress will be false
struct RequestPlayersForGameProgressCallback_t
{
enum { k_iCallback = k_iSteamGameSearchCallbacks + 11 };
EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK
uint64 m_ullSearchID; // all future callbacks referencing this search will include this Search ID
};
// callback from RequestPlayersForGame
// one of these will be sent per player
// followed by additional callbacks when players accept or decline the game
struct RequestPlayersForGameResultCallback_t
{
enum { k_iCallback = k_iSteamGameSearchCallbacks + 12 };
EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK
uint64 m_ullSearchID;
CSteamID m_SteamIDPlayerFound; // player steamID
CSteamID m_SteamIDLobby; // if the player is in a lobby, the lobby ID
enum PlayerAcceptState_t
{
k_EStateUnknown = 0,
k_EStatePlayerAccepted = 1,
k_EStatePlayerDeclined = 2,
};
PlayerAcceptState_t m_ePlayerAcceptState;
int32 m_nPlayerIndex;
int32 m_nTotalPlayersFound; // expect this many callbacks at minimum
int32 m_nTotalPlayersAcceptedGame;
int32 m_nSuggestedTeamIndex;
uint64 m_ullUniqueGameID;
};
struct RequestPlayersForGameFinalResultCallback_t
{
enum { k_iCallback = k_iSteamGameSearchCallbacks + 13 };
EResult m_eResult;
uint64 m_ullSearchID;
uint64 m_ullUniqueGameID;
};
// this callback confirms that results were received by the matchmaking service for this player
struct SubmitPlayerResultResultCallback_t
{
enum { k_iCallback = k_iSteamGameSearchCallbacks + 14 };
EResult m_eResult;
uint64 ullUniqueGameID;
CSteamID steamIDPlayer;
};
// this callback confirms that the game is recorded as complete on the matchmaking service
// the next call to RequestPlayersForGame will generate a new unique game ID
struct EndGameResultCallback_t
{
enum { k_iCallback = k_iSteamGameSearchCallbacks + 15 };
EResult m_eResult;
uint64 ullUniqueGameID;
};
// Steam has responded to the user request to join a party via the given Beacon ID.
// If successful, the connect string contains game-specific instructions to connect
// to the game with that party.
struct JoinPartyCallback_t
{
enum { k_iCallback = k_iSteamPartiesCallbacks + 1 };
EResult m_eResult;
PartyBeaconID_t m_ulBeaconID;
CSteamID m_SteamIDBeaconOwner;
char m_rgchConnectString[256];
};
// Response to CreateBeacon request. If successful, the beacon ID is provided.
struct CreateBeaconCallback_t
{
enum { k_iCallback = k_iSteamPartiesCallbacks + 2 };
EResult m_eResult;
PartyBeaconID_t m_ulBeaconID;
};
// Someone has used the beacon to join your party - they are in-flight now
// and we've reserved one of the open slots for them.
// You should confirm when they join your party by calling OnReservationCompleted().
// Otherwise, Steam may timeout their reservation eventually.
struct ReservationNotificationCallback_t
{
enum { k_iCallback = k_iSteamPartiesCallbacks + 3 };
PartyBeaconID_t m_ulBeaconID;
CSteamID m_steamIDJoiner;
};
// Response to ChangeNumOpenSlots call
struct ChangeNumOpenSlotsCallback_t
{
enum { k_iCallback = k_iSteamPartiesCallbacks + 4 };
EResult m_eResult;
};
// The list of possible Party beacon locations has changed
struct AvailableBeaconLocationsUpdated_t
{
enum { k_iCallback = k_iSteamPartiesCallbacks + 5 };
};
// The list of active beacons may have changed
struct ActiveBeaconsUpdated_t
{
enum { k_iCallback = k_iSteamPartiesCallbacks + 6 };
};
#pragma pack( pop )

View file

@ -6,7 +6,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
// Purpose:
@ -44,22 +44,26 @@ public:
#define STEAMMUSIC_INTERFACE_VERSION "STEAMMUSIC_INTERFACE_VERSION001"
// Global interface accessor
inline ISteamMusic *SteamMusic();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusic *, SteamMusic, STEAMMUSIC_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
DEFINE_CALLBACK( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 )
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 )
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( VolumeHasChanged_t, k_iSteamMusicCallbacks + 2 )
CALLBACK_MEMBER( 0, float, m_flNewVolume )
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( VolumeHasChanged_t, k_iSteamMusicCallbacks + 2 )
STEAM_CALLBACK_MEMBER( 0, float, m_flNewVolume )
STEAM_CALLBACK_END(1)
#pragma pack( pop )

View file

@ -6,7 +6,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
#include "isteammusic.h"
#define k_SteamMusicNameMaxLength 255
@ -64,63 +64,67 @@ public:
#define STEAMMUSICREMOTE_INTERFACE_VERSION "STEAMMUSICREMOTE_INTERFACE_VERSION001"
// Global interface accessor
inline ISteamMusicRemote *SteamMusicRemote();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusicRemote *, SteamMusicRemote, STEAMMUSICREMOTE_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
DEFINE_CALLBACK( MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1)
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1)
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( MusicPlayerRemoteWillDeactivate_t, k_iSteamMusicRemoteCallbacks + 2 )
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillDeactivate_t, k_iSteamMusicRemoteCallbacks + 2 )
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( MusicPlayerRemoteToFront_t, k_iSteamMusicRemoteCallbacks + 3 )
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteToFront_t, k_iSteamMusicRemoteCallbacks + 3 )
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( MusicPlayerWillQuit_t, k_iSteamMusicRemoteCallbacks + 4 )
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( MusicPlayerWillQuit_t, k_iSteamMusicRemoteCallbacks + 4 )
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( MusicPlayerWantsPlay_t, k_iSteamMusicRemoteCallbacks + 5 )
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlay_t, k_iSteamMusicRemoteCallbacks + 5 )
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( MusicPlayerWantsPause_t, k_iSteamMusicRemoteCallbacks + 6 )
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPause_t, k_iSteamMusicRemoteCallbacks + 6 )
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( MusicPlayerWantsPlayPrevious_t, k_iSteamMusicRemoteCallbacks + 7 )
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayPrevious_t, k_iSteamMusicRemoteCallbacks + 7 )
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( MusicPlayerWantsPlayNext_t, k_iSteamMusicRemoteCallbacks + 8 )
END_DEFINE_CALLBACK_0()
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayNext_t, k_iSteamMusicRemoteCallbacks + 8 )
STEAM_CALLBACK_END(0)
DEFINE_CALLBACK( MusicPlayerWantsShuffled_t, k_iSteamMusicRemoteCallbacks + 9 )
CALLBACK_MEMBER( 0, bool, m_bShuffled )
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( MusicPlayerWantsShuffled_t, k_iSteamMusicRemoteCallbacks + 9 )
STEAM_CALLBACK_MEMBER( 0, bool, m_bShuffled )
STEAM_CALLBACK_END(1)
DEFINE_CALLBACK( MusicPlayerWantsLooped_t, k_iSteamMusicRemoteCallbacks + 10 )
CALLBACK_MEMBER(0, bool, m_bLooped )
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( MusicPlayerWantsLooped_t, k_iSteamMusicRemoteCallbacks + 10 )
STEAM_CALLBACK_MEMBER(0, bool, m_bLooped )
STEAM_CALLBACK_END(1)
DEFINE_CALLBACK( MusicPlayerWantsVolume_t, k_iSteamMusicCallbacks + 11 )
CALLBACK_MEMBER(0, float, m_flNewVolume)
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( MusicPlayerWantsVolume_t, k_iSteamMusicCallbacks + 11 )
STEAM_CALLBACK_MEMBER(0, float, m_flNewVolume)
STEAM_CALLBACK_END(1)
DEFINE_CALLBACK( MusicPlayerSelectsQueueEntry_t, k_iSteamMusicCallbacks + 12 )
CALLBACK_MEMBER(0, int, nID )
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( MusicPlayerSelectsQueueEntry_t, k_iSteamMusicCallbacks + 12 )
STEAM_CALLBACK_MEMBER(0, int, nID )
STEAM_CALLBACK_END(1)
DEFINE_CALLBACK( MusicPlayerSelectsPlaylistEntry_t, k_iSteamMusicCallbacks + 13 )
CALLBACK_MEMBER(0, int, nID )
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( MusicPlayerSelectsPlaylistEntry_t, k_iSteamMusicCallbacks + 13 )
STEAM_CALLBACK_MEMBER(0, int, nID )
STEAM_CALLBACK_END(1)
DEFINE_CALLBACK( MusicPlayerWantsPlayingRepeatStatus_t, k_iSteamMusicRemoteCallbacks + 14 )
CALLBACK_MEMBER(0, int, m_nPlayingRepeatStatus )
END_DEFINE_CALLBACK_1()
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayingRepeatStatus_t, k_iSteamMusicRemoteCallbacks + 14 )
STEAM_CALLBACK_MEMBER(0, int, m_nPlayingRepeatStatus )
STEAM_CALLBACK_END(1)
#pragma pack( pop )

View file

@ -10,9 +10,7 @@
#pragma once
#endif
#include "steamtypes.h"
#include "steamclientpublic.h"
#include "steam_api_common.h"
// list of possible errors returned by SendP2PPacket() API
// these will be posted in the P2PSessionConnectFail_t callback
@ -63,7 +61,7 @@ enum EP2PSend
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct P2PSessionState_t
{
@ -127,8 +125,14 @@ class ISteamNetworking
{
public:
////////////////////////////////////////////////////////////////////////////////////////////
// Session-less connection functions
// automatically establishes NAT-traversing or Relay server connections
//
// UDP-style (connectionless) networking interface. These functions send messages using
// an API organized around the destination. Reliable and unreliable messages are supported.
//
// For a more TCP-style interface (meaning you have a connection handle), see the functions below.
// Both interface styles can send both reliable and unreliable messages.
//
// 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
@ -181,11 +185,18 @@ public:
////////////////////////////////////////////////////////////////////////////////////////////
// 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
// LISTEN / CONNECT connection-oriented interface functions
//
// These functions are more like a client-server TCP API. One side is the "server"
// and "listens" for incoming connections, which then must be "accepted." The "client"
// initiates a connection by "connecting." Sending and receiving is done through a
// connection handle.
//
// For a more UDP-style interface, where you do not track connection handles but
// simply send messages to a SteamID, use the UDP-style functions above.
//
// Both methods can send both reliable and unreliable methods.
//
////////////////////////////////////////////////////////////////////////////////////////////
@ -261,13 +272,21 @@ public:
};
#define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking005"
// Global interface accessor
inline ISteamNetworking *SteamNetworking();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamNetworking, STEAMNETWORKING_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamNetworking *SteamGameServerNetworking();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamGameServerNetworking, STEAMNETWORKING_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
// callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API

View file

@ -10,8 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steamtypes.h"
#include "steam_api_common.h"
// Feature types for parental settings
enum EParentalFeature
@ -47,6 +46,9 @@ public:
#define STEAMPARENTALSETTINGS_INTERFACE_VERSION "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"
// Global interface accessor
inline ISteamParentalSettings *SteamParentalSettings();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamParentalSettings *, SteamParentalSettings, STEAMPARENTALSETTINGS_INTERFACE_VERSION );
//-----------------------------------------------------------------------------
// Purpose: Callback for querying UGC

View file

@ -10,7 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
//-----------------------------------------------------------------------------
@ -28,7 +28,7 @@ const uint32 k_unMaxCloudFileChunkSize = 100 * 1024 * 1024;
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
struct SteamParamStringArray_t
{
@ -66,6 +66,7 @@ enum ERemoteStoragePlatform
k_ERemoteStoragePlatformPS3 = (1 << 2),
k_ERemoteStoragePlatformLinux = (1 << 3),
k_ERemoteStoragePlatformReserved2 = (1 << 4),
k_ERemoteStoragePlatformAndroid = (1 << 5),
k_ERemoteStoragePlatformAll = 0xffffffff
};
@ -171,16 +172,16 @@ class ISteamRemoteStorage
virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0;
virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0;
CALL_RESULT( RemoteStorageFileWriteAsyncComplete_t )
STEAM_CALL_RESULT( RemoteStorageFileWriteAsyncComplete_t )
virtual SteamAPICall_t FileWriteAsync( const char *pchFile, const void *pvData, uint32 cubData ) = 0;
CALL_RESULT( RemoteStorageFileReadAsyncComplete_t )
STEAM_CALL_RESULT( RemoteStorageFileReadAsyncComplete_t )
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;
CALL_RESULT( RemoteStorageFileShareResult_t )
STEAM_CALL_RESULT( RemoteStorageFileShareResult_t )
virtual SteamAPICall_t FileShare( const char *pchFile ) = 0;
virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0;
@ -212,7 +213,7 @@ class ISteamRemoteStorage
// 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.
CALL_RESULT( RemoteStorageDownloadUGCResult_t )
STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t )
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
@ -220,7 +221,7 @@ class ISteamRemoteStorage
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, OUT_STRING() char **ppchName, int32 *pnFileSizeInBytes, OUT_STRUCT() CSteamID *pSteamIDOwner ) = 0;
virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, STEAM_OUT_STRING() char **ppchName, int32 *pnFileSizeInBytes, STEAM_OUT_STRUCT() 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.
@ -253,7 +254,7 @@ class ISteamRemoteStorage
#endif
// publishing UGC
CALL_RESULT( RemoteStoragePublishFileProgress_t )
STEAM_CALL_RESULT( RemoteStoragePublishFileProgress_t )
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;
@ -262,49 +263,52 @@ class ISteamRemoteStorage
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;
CALL_RESULT( RemoteStorageUpdatePublishedFileResult_t )
STEAM_CALL_RESULT( RemoteStorageUpdatePublishedFileResult_t )
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.
CALL_RESULT( RemoteStorageGetPublishedFileDetailsResult_t )
STEAM_CALL_RESULT( RemoteStorageGetPublishedFileDetailsResult_t )
virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld ) = 0;
CALL_RESULT( RemoteStorageDeletePublishedFileResult_t )
STEAM_CALL_RESULT( RemoteStorageDeletePublishedFileResult_t )
virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
// enumerate the files that the current user published with this app
CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t )
STEAM_CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t )
virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0;
CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
STEAM_CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
CALL_RESULT( RemoteStorageEnumerateUserSubscribedFilesResult_t )
STEAM_CALL_RESULT( RemoteStorageEnumerateUserSubscribedFilesResult_t )
virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0;
CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
STEAM_CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0;
virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0;
CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t )
STEAM_CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t )
virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0;
CALL_RESULT( RemoteStorageUpdateUserPublishedItemVoteResult_t )
STEAM_CALL_RESULT( RemoteStorageUpdateUserPublishedItemVoteResult_t )
virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0;
CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t )
STEAM_CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t )
virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0;
CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t )
STEAM_CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t )
virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0;
CALL_RESULT( RemoteStoragePublishFileProgress_t )
STEAM_CALL_RESULT( RemoteStoragePublishFileProgress_t )
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;
CALL_RESULT( RemoteStorageSetUserPublishedFileActionResult_t )
STEAM_CALL_RESULT( RemoteStorageSetUserPublishedFileActionResult_t )
virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0;
CALL_RESULT( RemoteStorageEnumeratePublishedFilesByUserActionResult_t )
STEAM_CALL_RESULT( RemoteStorageEnumeratePublishedFilesByUserActionResult_t )
virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0;
// this method enumerates the public view of workshop files
CALL_RESULT( RemoteStorageEnumerateWorkshopFilesResult_t )
STEAM_CALL_RESULT( RemoteStorageEnumerateWorkshopFilesResult_t )
virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0;
CALL_RESULT( RemoteStorageDownloadUGCResult_t )
STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t )
virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0;
};
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION014"
// Global interface accessor
inline ISteamRemoteStorage *SteamRemoteStorage();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemoteStorage *, SteamRemoteStorage, STEAMREMOTESTORAGE_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@ -312,7 +316,7 @@ class ISteamRemoteStorage
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
@ -450,7 +454,7 @@ struct RemoteStorageEnumerateUserSubscribedFilesResult_t
#elif defined(VALVE_CALLBACK_PACK_LARGE)
VALVE_COMPILE_TIME_ASSERT( sizeof( RemoteStorageEnumerateUserSubscribedFilesResult_t ) == (1 + 1 + 1 + 50 + 100) * 4 + 4 );
#else
#warning You must first include isteamclient.h
#warning You must first include steam_api_common.h
#endif
//-----------------------------------------------------------------------------

View file

@ -10,7 +10,7 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
const uint32 k_nScreenshotMaxTaggedUsers = 32;
const uint32 k_nScreenshotMaxTaggedPublishedFiles = 32;
@ -81,13 +81,17 @@ public:
#define STEAMSCREENSHOTS_INTERFACE_VERSION "STEAMSCREENSHOTS_INTERFACE_VERSION003"
// Global interface accessor
inline ISteamScreenshots *SteamScreenshots();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamScreenshots *, SteamScreenshots, STEAMSCREENSHOTS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: Screenshot successfully written or otherwise added to the library

View file

@ -10,7 +10,8 @@
#pragma once
#endif
#include "isteamclient.h"
#include "steam_api_common.h"
#include "isteamremotestorage.h"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@ -18,7 +19,7 @@
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error isteamclient.h must be included
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
@ -205,23 +206,26 @@ public:
// 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
CALL_RESULT( SteamUGCQueryCompleted_t )
STEAM_CALL_RESULT( SteamUGCQueryCompleted_t )
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 GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0;
virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, STEAM_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, EItemPreviewType *pPreviewType ) = 0;
virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *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;
virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, STEAM_OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, STEAM_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;
@ -253,7 +257,7 @@ public:
virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0;
// Steam Workshop Creator API
CALL_RESULT( CreateItemResult_t )
STEAM_CALL_RESULT( CreateItemResult_t )
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()
@ -266,6 +270,7 @@ public:
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, EItemPreviewType type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
@ -274,22 +279,22 @@ public:
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)
CALL_RESULT( SubmitItemUpdateResult_t )
STEAM_CALL_RESULT( SubmitItemUpdateResult_t )
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
CALL_RESULT( SetUserItemVoteResult_t )
STEAM_CALL_RESULT( SetUserItemVoteResult_t )
virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0;
CALL_RESULT( GetUserItemVoteResult_t )
STEAM_CALL_RESULT( GetUserItemVoteResult_t )
virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0;
CALL_RESULT( UserFavoriteItemsListChanged_t )
STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t )
virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
CALL_RESULT( UserFavoriteItemsListChanged_t )
STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t )
virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0;
CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
STEAM_CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t )
virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP
CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
STEAM_CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t )
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
@ -299,7 +304,7 @@ public:
// 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;
virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, STEAM_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;
@ -317,35 +322,43 @@ public:
virtual void SuspendDownloads( bool bSuspend ) = 0;
// usage tracking
CALL_RESULT( StartPlaytimeTrackingResult_t )
STEAM_CALL_RESULT( StartPlaytimeTrackingResult_t )
virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
CALL_RESULT( StopPlaytimeTrackingResult_t )
STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t )
virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0;
CALL_RESULT( StopPlaytimeTrackingResult_t )
STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t )
virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0;
// parent-child relationship or dependency management
CALL_RESULT( AddUGCDependencyResult_t )
STEAM_CALL_RESULT( AddUGCDependencyResult_t )
virtual SteamAPICall_t AddDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
CALL_RESULT( RemoveUGCDependencyResult_t )
STEAM_CALL_RESULT( RemoveUGCDependencyResult_t )
virtual SteamAPICall_t RemoveDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0;
// add/remove app dependence/requirements (usually DLC)
CALL_RESULT( AddAppDependencyResult_t )
STEAM_CALL_RESULT( AddAppDependencyResult_t )
virtual SteamAPICall_t AddAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0;
CALL_RESULT( RemoveAppDependencyResult_t )
STEAM_CALL_RESULT( RemoveAppDependencyResult_t )
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
CALL_RESULT( GetAppDependenciesResult_t )
STEAM_CALL_RESULT( GetAppDependenciesResult_t )
virtual SteamAPICall_t GetAppDependencies( PublishedFileId_t nPublishedFileID ) = 0;
// delete the item without prompting the user
CALL_RESULT( DeleteItemResult_t )
STEAM_CALL_RESULT( DeleteItemResult_t )
virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0;
};
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION010"
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION012"
// Global interface accessor
inline ISteamUGC *SteamUGC();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUGC *, SteamUGC, STEAMUGC_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamUGC *SteamGameServerUGC();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamUGC *, SteamGameServerUGC, STEAMUGC_INTERFACE_VERSION );
//-----------------------------------------------------------------------------
// Purpose: Callback for querying UGC
@ -358,6 +371,7 @@ struct SteamUGCQueryCompleted_t
uint32 m_unNumResultsReturned;
uint32 m_unTotalMatchingResults;
bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache
char m_rgchNextCursor[k_cchPublishedFileURLMax]; // If a paging cursor was used, then this will be the next cursor to get the next result set.
};

Some files were not shown because too many files have changed in this diff Show more