//========================== Open Steamworks ================================//// This file is part of the Open Steamworks project. All individuals associated// with this project do not claim ownership of the contents// // The code, comments, and all related files, projects, resources,// redistributables included with this project are Copyright Valve Corporation.// Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the// Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo,// Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the// Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition// Zero are trademarks and or registered trademarks of Valve Corporation.// All other trademarks are property of their respective owners.////=============================================================================#ifndef USERCOMMON_H#define USERCOMMON_H#ifdef _WIN32#pragma once#endif#define CLIENTUSER_INTERFACE_VERSION "CLIENTUSER_INTERFACE_VERSION001"#define CLIENTGAMESERVER_INTERFACE_VERSION "CLIENTGAMESERVER_INTERFACE_VERSION001"#define STEAMUSER_INTERFACE_VERSION_004 "SteamUser004"#define STEAMUSER_INTERFACE_VERSION_005 "SteamUser005"#define STEAMUSER_INTERFACE_VERSION_006 "SteamUser006"#define STEAMUSER_INTERFACE_VERSION_007 "SteamUser007"#define STEAMUSER_INTERFACE_VERSION_008 "SteamUser008"#define STEAMUSER_INTERFACE_VERSION_009 "SteamUser009"#define STEAMUSER_INTERFACE_VERSION_010 "SteamUser010"#define STEAMUSER_INTERFACE_VERSION_011 "SteamUser011"#define STEAMUSER_INTERFACE_VERSION_012 "SteamUser012"#define STEAMUSER_INTERFACE_VERSION_013 "SteamUser013"#define STEAMUSER_INTERFACE_VERSION_014 "SteamUser014"#define STEAMUSER_INTERFACE_VERSION_015 "SteamUser015"#define STEAMUSER_INTERFACE_VERSION_016 "SteamUser016"// Callback values for callback ValidateAuthTicketResponse_t which is a response to BeginAuthSessiontypedefenumEAuthSessionResponse{k_EAuthSessionResponseOK=0,// Steam has verified the user is online, the ticket is valid and ticket has not been reused.k_EAuthSessionResponseUserNotConnectedToSteam=1,// The user in question is not connected to steamk_EAuthSessionResponseNoLicenseOrExpired=2,// The license has expired.k_EAuthSessionResponseVACBanned=3,// The user is VAC banned for this game.k_EAuthSessionResponseLoggedInElseWhere=4,// The user account has logged in elsewhere and the session containing the game instance has been disconnected.k_EAuthSessionResponseVACCheckTimedOut=5,// VAC has been unable to perform anti-cheat checks on this userk_EAuthSessionResponseAuthTicketCanceled=6,// The ticket has been canceled by the issuerk_EAuthSessionResponseAuthTicketInvalidAlreadyUsed=7,// This ticket has already been used, it is not valid.k_EAuthSessionResponseAuthTicketInvalid=8,// This ticket is not from a user instance currently connected to steam.}EAuthSessionResponse;// results from BeginAuthSessiontypedefenumEBeginAuthSessionResult{k_EBeginAuthSessionResultOK=0,// Ticket is valid for this game and this steamID.k_EBeginAuthSessionResultInvalidTicket=1,// Ticket is not valid.k_EBeginAuthSessionResultDuplicateRequest=2,// A ticket has already been submitted for this steamIDk_EBeginAuthSessionResultInvalidVersion=3,// Ticket is from an incompatible interface versionk_EBeginAuthSessionResultGameMismatch=4,// Ticket is not for this gamek_EBeginAuthSessionResultExpiredTicket=5,// Ticket has expired}EBeginAuthSessionResult;typedefenumEAppUsageEvent{k_EAppUsageEventGameLaunch=1,k_EAppUsageEventGameLaunchTrial=2,k_EAppUsageEventMedia=3,k_EAppUsageEventPreloadStart=4,k_EAppUsageEventPreloadFinish=5,k_EAppUsageEventMarketingMessageView=6,// deprecated, do not usek_EAppUsageEventInGameAdViewed=7,k_EAppUsageEventGameLaunchFreeWeekend=8,}EAppUsageEvent;typedefenumERegistrySubTree{k_ERegistrySubTreeNews=0,k_ERegistrySubTreeApps=1,k_ERegistrySubTreeSubscriptions=2,k_ERegistrySubTreeGameServers=3,k_ERegistrySubTreeFriends=4,k_ERegistrySubTreeSystem=5,k_ERegistrySubTreeAppOwnershipTickets=6,k_ERegistrySubTreeLegacyCDKeys=7,}ERegistrySubTree;typedefenumELogonState{k_ELogonStateNotLoggedOn=0,k_ELogonStateLoggingOn=1,k_ELogonStateLoggingOff=2,k_ELogonStateLoggedOn=3}ELogonState;//-----------------------------------------------------------------------------// Purpose: types of VAC bans//-----------------------------------------------------------------------------typedefenumEVACBan{k_EVACBanGoldsrc,k_EVACBanSource,k_EVACBanDayOfDefeatSource,}EVACBan;typedefenumEUserHasLicenseForAppResult{k_EUserHasLicenseResultHasLicense=0,// User has a license for specified appk_EUserHasLicenseResultDoesNotHaveLicense=1,// User does not have a license for the specified appk_EUserHasLicenseResultNoAuth=2,// User has not been authenticated}EUserHasLicenseForAppResult;// Enum for the types of news push items you can gettypedefenumENewsUpdateType{k_EAppNews=0,// news about a particular appk_ESteamAds=1,// Marketing messagesk_ESteamNews=2,// EJ's corner and the likek_ECDDBUpdate=3,// backend has a new CDDB for you to loadk_EClientUpdate=4,// new version of the steam client is available}ENewsUpdateType;typedefenumESteamUsageEvent{k_ESteamUsageEventMarketingMessageView=1,k_ESteamUsageEventHardwareSurvey=2,k_ESteamUsageEventDownloadStarted=3,k_ESteamUsageEventLocalizedAudioChange=4,k_ESteamUsageEventClientGUIUsage=5,k_ESteamUsageEventCharityChoice=6,}ESteamUsageEvent;typedefenumEClientStat{k_EClientStatP2PConnectionsUDP=0,k_EClientStatP2PConnectionsRelay=1,k_EClientStatP2PGameConnections=2,k_EClientStatP2PVoiceConnections=3,k_EClientStatBytesDownloaded=4,k_EClientStatMax=5,}EClientStat;//-----------------------------------------------------------------------------// Purpose: Marketing message flags that change how a client should handle them//-----------------------------------------------------------------------------typedefenumEMarketingMessageFlags{k_EMarketingMessageFlagsNone=0,k_EMarketingMessageFlagsHighPriority=1<<0,k_EMarketingMessageFlagsPlatformWindows=1<<1,k_EMarketingMessageFlagsPlatformMac=1<<2,//aggregate flagsk_EMarketingMessageFlagsPlatformRestrictions=k_EMarketingMessageFlagsPlatformWindows|k_EMarketingMessageFlagsPlatformMac,}EMarketingMessageFlags;typedefenumENatDiscoveryTypes{eNatTypeUntested=0,eNatTypeTestFailed=1,eNatTypeNoUDP=2,eNatTypeOpenInternet=3,eNatTypeFullCone=4,eNatTypeRestrictedCone=5,eNatTypePortRestrictedCone=6,eNatTypeUnspecified=7,eNatTypeSymmetric=8,eNatTypeSymmetricFirewall=9,eNatTypeCount=10,}ENatType;typedefenumEPhysicalSocketConnectionResult{PhysicalSocket_Unknown=0,PhysicalSocket_IsRemoteSide=1,PhysicalSocket_Connected=2,PhysicalSocket_Failed=3,PhysicalSocket_SignalingFailed=4,PhysicalSocket_ResultCount=5,}EPhysicalSocketConnectionResult;classCNatTraversalStat{public:EPhysicalSocketConnectionResultm_eResult;ENatDiscoveryTypesm_eLocalNatType;ENatDiscoveryTypesm_eRemoteNatType;boolm_bMultiUserChat:1;boolm_bRelay:1;};classCAmount{public:intm_nAmount;ECurrencyCodem_eCurrencyCode;};enumEMicroTxnAuthResponse{k_EMicroTxnAuthResponseInvalid=0,k_EMicroTxnAuthResponseAuthorize=1,k_EMicroTxnAuthResponseDeny=2,k_EMicroTxnAuthResponseAutoDeny=3,};enumEMicroTxnAuthResult{k_EMicroTxnAuthResultInvalid=0,k_EMicroTxnAuthResultOK=1,k_EMicroTxnAuthResultFail=2,k_EMicroTxnAuthResultInsufficientFunds=3,};enumERequestAccountDataAction{k_ERequestAccountDataActionFindAccountsByEmailAddress=1,k_ERequestAccountDataActionFindAccountsByCdKey=2,k_ERequestAccountDataActionGetNumAccountsWithEmailAddress=3,//k_ERequestAccountDataActionIsAccountNameInUse = 4, // Only used internally};enumESteamGuardProvider{// TODO: Reverse this enum};enumEUserConnect{// TODO: Reverse this enum};#pragma pack( push, 8 )//-----------------------------------------------------------------------------// Purpose: called when a connections to the Steam back-end has been established// this means the Steam client now has a working connection to the Steam servers// usually this will have occurred before the game has launched, and should// only be seen if the user has dropped connection due to a networking issue// or a Steam server update//-----------------------------------------------------------------------------structSteamServersConnected_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//-----------------------------------------------------------------------------structSteamServerConnectFailure_t{enum{k_iCallback=k_iSteamUserCallbacks+2};EResultm_eResult;};//-----------------------------------------------------------------------------// 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//-----------------------------------------------------------------------------structSteamServersDisconnected_t{enum{k_iCallback=k_iSteamUserCallbacks+3};EResultm_eResult;};//-----------------------------------------------------------------------------// Purpose: called when the client is trying to retry logon after being unintentionally logged off//-----------------------------------------------------------------------------structOBSOLETE_CALLBACKBeginLogonRetry_t{enum{k_iCallback=k_iSteamUserCallbacks+4};};//-----------------------------------------------------------------------------// Purpose: Sent by the Steam server to the client telling it to disconnect from the specified game server,// which it may be in the process of or already connected to.// The game client should immediately disconnect upon receiving this message.// This can usually occur if the user doesn't have rights to play on the game server.//-----------------------------------------------------------------------------structClientGameServerDeny_t{enum{k_iCallback=k_iSteamUserCallbacks+13};AppId_tm_uAppID;uint32m_unGameServerIP;uint16m_usGameServerPort;uint16m_bSecure;uint32m_uReason;};//-----------------------------------------------------------------------------// Purpose: notifies the user that they are now the primary access point for chat messages//-----------------------------------------------------------------------------structOBSOLETE_CALLBACKPrimaryChatDestinationSetOld_t{enum{k_iCallback=k_iSteamUserCallbacks+14};uint8m_bIsPrimary;};// See GSPolicyResponse_t in GameServerCommon.h for callback 115//-----------------------------------------------------------------------------// Purpose: called when the callback system for this client is in an error state (and has flushed pending callbacks)// When getting this message the client should disconnect from Steam, reset any stored Steam state and reconnect.// This usually occurs in the rare event the Steam client has some kind of fatal error.//-----------------------------------------------------------------------------structIPCFailure_t{enum{k_iCallback=k_iSteamUserCallbacks+17};enumEFailureType{k_EFailureFlushedCallbackQueue,k_EFailurePipeFail,};uint8m_eFailureType;};structLicensesUpdated_t{enum{k_iCallback=k_iSteamUserCallbacks+25};};structAppLifetimeNotice_t{enum{k_iCallback=k_iSteamUserCallbacks+30};AppId_tm_nAppID;int32m_nInstanceID;boolm_bExiting;};structOBSOLETE_CALLBACKDRMSDKFileTransferResult_t{enum{k_iCallback=k_iSteamUserCallbacks+41};EResultm_EResult;};//-----------------------------------------------------------------------------// callback for BeginAuthSession//-----------------------------------------------------------------------------structValidateAuthTicketResponse_t{enum{k_iCallback=k_iSteamUserCallbacks+43};CSteamIDm_SteamID;EAuthSessionResponsem_eAuthSessionResponse;};//-----------------------------------------------------------------------------// Purpose: called when a user has responded to a microtransaction authorization request//-----------------------------------------------------------------------------structMicroTxnAuthorizationResponse_t{enum{k_iCallback=k_iSteamUserCallbacks+52};uint32m_unAppID;// AppID for this microtransactionuint64m_ulOrderID;// OrderID provided for the microtransactionuint8m_bAuthorized;// if user authorized transaction};//-----------------------------------------------------------------------------// Purpose: Result from RequestEncryptedAppTicket//-----------------------------------------------------------------------------structEncryptedAppTicketResponse_t{enum{k_iCallback=k_iSteamUserCallbacks+54};EResultm_eResult;};//-----------------------------------------------------------------------------// callback for GetAuthSessionTicket//-----------------------------------------------------------------------------structGetAuthSessionTicketResponse_t{enum{k_iCallback=k_iSteamUserCallbacks+63};HAuthTicketm_hAuthTicket;EResultm_eResult;};// k_iClientUserCallbacks callbacksstructSystemIM_t{enum{k_iCallback=k_iClientUserCallbacks+1};uint32m_ESystemIMType;charm_rgchMsgBody[4096];};structGuestPassGiftTarget_t{enum{k_iCallback=k_iClientUserCallbacks+2};uint32m_unPackageID;uint64m_ulSteamIDFriend;int32m_iPotentialGiftTarget;int32m_cPotentialGiftTargetsTotal;uint8m_bValidGiftTarget;};structPrimaryChatDestinationSet_t{enum{k_iCallback=k_iClientUserCallbacks+3};uint8m_bIsPrimary;uint8m_bWasPrimary;};// TODO: Add callback 904structLicenseChanged_t{enum{k_iCallback=k_iClientUserCallbacks+5};PackageId_tm_nPackageID;};structRequestClientAppListInfo_t{enum{k_iCallback=k_iClientUserCallbacks+6};boolm_bMedia;boolm_bTools;boolm_bGames;boolm_bInstalled;};structSetClientAppUpdateState_t{enum{k_iCallback=k_iClientUserCallbacks+7};uint64m_ulJobIDToPostResultTo;AppId_tm_nAppID;boolm_bUpdate;};structInstallClientApp_t{enum{k_iCallback=k_iClientUserCallbacks+8};uint64m_ulJobIDToPostResultTo;AppId_tm_nAppID;};structUninstallClientApp_t{enum{k_iCallback=k_iClientUserCallbacks+9};uint64m_ulJobIDToPostResultTo;AppId_tm_nAppID;};//-----------------------------------------------------------------------------// Purpose: called when the steam2 ticket has been set//-----------------------------------------------------------------------------structOBSOLETE_CALLBACKSteam2TicketChanged_t{enum{k_iCallback=k_iClientUserCallbacks+10};};//-----------------------------------------------------------------------------// Purpose: called when app news update is recieved//-----------------------------------------------------------------------------structClientAppNewsItemUpdate_t{enum{k_iCallback=k_iClientUserCallbacks+11};uint8m_eNewsUpdateType;// one of ENewsUpdateTypeuint32m_uNewsID;// unique news post IDuint32m_uAppID;// app ID this update applies to if it is of type k_EAppNews};//-----------------------------------------------------------------------------// Purpose: steam news update//-----------------------------------------------------------------------------structClientSteamNewsItemUpdate_t{enum{k_iCallback=k_iClientUserCallbacks+12};uint8m_eNewsUpdateType;// one of ENewsUpdateTypeuint32m_uNewsID;// unique news post IDuint32m_uHaveSubID;// conditions to control if we display this update for type k_ESteamNewsuint32m_uNotHaveSubID;uint32m_uHaveAppID;uint32m_uNotHaveAppID;uint32m_uHaveAppIDInstalled;uint32m_uHavePlayedAppID;};//-----------------------------------------------------------------------------// Purpose: steam cddb/bootstrapper update//-----------------------------------------------------------------------------structClientSteamNewsClientUpdate_t{enum{k_iCallback=k_iClientUserCallbacks+13};uint8m_eNewsUpdateType;// one of ENewsUpdateTypeuint8m_bReloadCDDB;// if true there is a new CDDB availableuint32m_unCurrentBootstrapperVersion;uint32m_unCurrentClientVersion;};structLegacyCDKeyRegistered_t{enum{k_iCallback=k_iClientUserCallbacks+14};EResultm_eResult;AppId_tm_iAppID;charm_rgchCDKey[64];};structAccountInformationUpdated_t{enum{k_iCallback=k_iClientUserCallbacks+15};boolm_bEmailValidationAction;};structGuestPassSent_t{enum{k_iCallback=k_iClientUserCallbacks+16};EResultm_eResult;};structGuestPassAcked_t{enum{k_iCallback=k_iClientUserCallbacks+17};EResultm_eResult;PackageId_tm_unPackageID;GID_tm_gidGuestPassID;uint64m_ulGuestPassKey;};structGuestPassRedeemed_t{enum{k_iCallback=k_iClientUserCallbacks+18};EResultm_eResult;uint32m_unPackageID;};structUpdateGuestPasses_t{enum{k_iCallback=k_iClientUserCallbacks+19};EResultm_eResult;uint32m_cGuestPassesToGive;uint32m_cGuestPassesToRedeem;};structLogOnCredentialsChanged_t{enum{k_iCallback=k_iClientUserCallbacks+20};};structCheckPasswordResponse_t{enum{k_iCallback=k_iClientUserCallbacks+22};EResultm_EResult;};structResetPasswordResponse_t{enum{k_iCallback=k_iClientUserCallbacks+23};EResultm_EResult;};structDRMDataRequest_t{enum{k_iCallback=k_iClientUserCallbacks+24};uint32m_EResult;uint32m_unAppID;boolm_bRestartApp;};structDRMDataResponse_t{enum{k_iCallback=k_iClientUserCallbacks+25};// TODO : Reverse this callback};structDRMFailureResponse_t{enum{k_iCallback=k_iClientUserCallbacks+26};// TODO : Reverse this callback};structAppOwnershipTicketReceived_t{enum{k_iCallback=k_iClientUserCallbacks+28};AppId_tm_nAppID;};structPasswordChangeResponse_t{enum{k_iCallback=k_iClientUserCallbacks+29};EResultm_EResult;};structEmailChangeResponse_t{enum{k_iCallback=k_iClientUserCallbacks+30};EResultm_EResult;boolm_bFinal;};structSecretQAChangeResponse_t{enum{k_iCallback=k_iClientUserCallbacks+31};EResultm_EResult;};structCreateAccountResponse_t{enum{k_iCallback=k_iClientUserCallbacks+32};EResultm_EResult;};structSendForgottonPasswordEmailResponse_t{enum{k_iCallback=k_iClientUserCallbacks+33};EResultm_EResult;};structResetForgottonPasswordResponse_t{enum{k_iCallback=k_iClientUserCallbacks+34};EResultm_EResult;};structCreateAccountInformSteam3Response_t{enum{k_iCallback=k_iClientUserCallbacks+35};uint32m_EResult;};structDownloadFromDFSResponse_t{enum{k_iCallback=k_iClientUserCallbacks+36};EResultm_EResult;charm_rgchURL[128];};structClientMarketingMessageUpdate_t{enum{k_iCallback=k_iClientUserCallbacks+37};};structValidateEmailResponse_t{enum{k_iCallback=k_iClientUserCallbacks+38};uint32m_EResult;};structRequestChangeEmailResponse_t{enum{k_iCallback=k_iClientUserCallbacks+39};uint32m_EResult;};structVerifyPasswordResponse_t{enum{k_iCallback=k_iClientUserCallbacks+40};uint32m_EResult;};structSteam2LoginResponse_t{enum{k_iCallback=k_iClientUserCallbacks+41};boolm_bSuccessful;uint32m_steam2Error;};structWebAuthRequestCallback_t{enum{k_iCallback=k_iClientUserCallbacks+42};boolm_bSuccessful;charm_rgchToken[512];};structMicroTxnAuthRequestCallback_t{enum{k_iCallback=k_iClientUserCallbacks+44};GID_tm_gidTransID;AppId_tm_unAppID;};structMicroTxnAuthResponse_t{enum{k_iCallback=k_iClientUserCallbacks+45};EMicroTxnAuthResultm_eAuthResult;};structAppMinutesPlayedDataNotice_t{enum{k_iCallback=k_iClientUserCallbacks+46};int32m_nAppID;};structMicroTxnInfoUpdated_t{enum{k_iCallback=k_iClientUserCallbacks+47};EResultm_eResult;GID_tm_gidTransID;};structWalletBalanceUpdated_t{enum{k_iCallback=k_iClientUserCallbacks+48};};structEnableMachineLockingResponse_t{enum{k_iCallback=k_iClientUserCallbacks+49};uint32m_EResult;};structMachineLockProgressResponse_t{enum{k_iCallback=k_iClientUserCallbacks+50};uint32m_EResult;};structSteam3ExtraLoginProgress_t{enum{k_iCallback=k_iClientUserCallbacks+51};// Note sureuint32m_EResult;int32m_eState;};structRequestAccountDataResult_t{enum{k_iCallback=k_iClientUserCallbacks+52};EResultm_EResult;uint32m_cMatches;ERequestAccountDataActionm_eAction;};structIsAccountNameInUseResult_t{enum{k_iCallback=k_iClientUserCallbacks+53};EResultm_EResult;charm_szAccountNameSuggestion1[64];charm_szAccountNameSuggestion2[64];charm_szAccountNameSuggestion3[64];};structLoginInformationChanged_t{enum{k_iCallback=k_iClientUserCallbacks+55};// TODO : Reverse this callback};structRequestSpecialSurveyResult_t{enum{k_iCallback=k_iClientUserCallbacks+56};int32m_iSurveyID;EResultm_eResult;/*ESurveyState*/int32m_eState;// 1 = denied, 4 = already completecharm_szName[256];charm_szCustomURL[512];boolm_bIncludeSoftware;uint8m_ubToken[16];};structSendSpecialSurveyResponseResult_t{enum{k_iCallback=k_iClientUserCallbacks+57};int32m_iSurveyID;EResultm_eResult;uint8m_ubToken[16];};structUpdateItemAnnouncement_t{enum{k_iCallback=k_iClientUserCallbacks+58};uint32m_cNewItems;};structChangeSteamGuardOptionsResponse_t{enum{k_iCallback=k_iClientUserCallbacks+59};EResultm_eResult;};structUpdateCommentNotification_t{enum{k_iCallback=k_iClientUserCallbacks+60};uint32m_cNewComments;uint32m_cNewCommentsOwner;uint32m_cNewCommentsSubscriptions;};structFriendUserStatusPublished_t{enum{k_iCallback=k_iClientUserCallbacks+61};CSteamIDm_steamIDFriend;AppId_tm_unAppID;charm_szStatus;};#pragma pack( pop )#endif // USERCOMMON_H