diff --git a/Readme.txt b/Readme.txt index db16bb4..ef2f961 100644 --- a/Readme.txt +++ b/Readme.txt @@ -1,6 +1,6 @@ ================================================================ -Copyright © 1996-2017, Valve Corporation, All rights reserved. +Copyright © 1996-2018, Valve Corporation, All rights reserved. ================================================================ @@ -8,6 +8,35 @@ Copyright Welcome to the Steamworks SDK. For documentation please see our partner website at: http://partner.steamgames.com +---------------------------------------------------------------- +v1.42 3rd January 2018 +---------------------------------------------------------------- + +ISteamInventory +* Added ability to start a purchase process through the Steam Client via the StartPurchase call and a given set of item definition ids and quantities. Users will be prompted in the Steam Client overlay to complete the purchase, including funding their Steam Wallet if necessary. Returns a SteamInventoryStartPurchaseResult_t call result if the user authorizes the purchase. +* Added ability to retrieve item definition prices via the RequestPrices call. Once the call result SteamInventoryRequestPricesResult_t is returned, GetNumItemsWithPrices, GetItemsWithPrices, and GetItemPrice can be called to retrieve the item definition prices in the user's local currency. +* Added ability to modify whitelisted per item dynamic properties. The usage pattern is to call StartUpdateProperties, SetProperty or RemoveProperty, and finally SubmitUpdateProperties. The SteamInventoryCallback_t will be fired with the appropriate result handle on success or failure. +* Deprecated TradeItems + +ISteamController +* Added Action Set Layers – Action Set Layers are optional sets of action bindings which can be overlaid upon an existing set of controls. In contrast to Action Sets, layers draw their actions from the Action Set they exist within and do not wholesale replace what is already active when applied, but apply small modifications. These can consist of setting changes as well as adding or removing bindings from the base action set. More than one layer can be applied at a time and will be applied consecutively, so an example might be the Sniper Class layer which includes tweaks or bindings specific to snipers in addition to the Scoped-In layer which alters look sensitivity. +* Added ActivateActionSetLayer – Activates the specified Layer. +* Added DeactivateActionSetLayer – Deactivates the specified Layer. +* Added DeactivateAllActionSetLayers – Deactivates all layers, resetting the mapping to the action base Action Set. +* Added GetActiveActionSetLayers – Returns all currently active Action Set Layers. +* Added GetInputTypeForHandle - Returns the input type for a particular handle, such as Steam Controller, PS4 Controller, Xbox One or 360. + +ISteamHTMLSurface +* Added HTML_BrowserRestarted_t callback which is fired when the browser has restarted due to an internal failure + +ISteamFriends +* Added IsClanPublic +* Added IsClanOfficialGameGroup + +Steam API +* Removed the ISteamUnifiedMessages interface. It is no longer intended for public usage. + + ---------------------------------------------------------------- v1.41 13th July 2017 ---------------------------------------------------------------- diff --git a/SteamworksExample/MainMenu.cpp b/SteamworksExample/MainMenu.cpp index 406b7ea..dfc18fd 100644 --- a/SteamworksExample/MainMenu.cpp +++ b/SteamworksExample/MainMenu.cpp @@ -62,6 +62,8 @@ void CMainMenu::SetupMenu() AddMenuItem( MenuItem_t( "HTML Page", k_EClientHTMLSurface ) ); } AddMenuItem( MenuItem_t( "Exit Game", k_EClientGameExiting ) ); + + AddMenuItem( MenuItem_t( "In-game Store", k_EClientInGameStore ) ); } diff --git a/SteamworksExample/SpaceWar.h b/SteamworksExample/SpaceWar.h index 015023c..807db66 100644 --- a/SteamworksExample/SpaceWar.h +++ b/SteamworksExample/SpaceWar.h @@ -189,6 +189,7 @@ enum EClientGameState k_EClientMusic, k_EClientWorkshop, k_EClientHTMLSurface, + k_EClientInGameStore, }; diff --git a/SteamworksExample/SpaceWarClient.cpp b/SteamworksExample/SpaceWarClient.cpp index a6bf934..6e1e28b 100644 --- a/SteamworksExample/SpaceWarClient.cpp +++ b/SteamworksExample/SpaceWarClient.cpp @@ -102,8 +102,12 @@ void CSpaceWarClient::Init( IGameEngine *pGameEngine ) OutputDebugString( "HUD font was not created properly, text won't draw\n" ); m_hInstructionsFont = pGameEngine->HCreateFont( INSTRUCTIONS_FONT_HEIGHT, FW_BOLD, false, "Arial" ); - if ( !m_hHUDFont ) - OutputDebugString( "HUD font was not created properly, text won't draw\n" ); + if ( !m_hInstructionsFont ) + OutputDebugString( "instruction font was not created properly, text won't draw\n" ); + + m_hInGameStoreFont = pGameEngine->HCreateFont( INSTRUCTIONS_FONT_HEIGHT, FW_BOLD, false, "Courier New" ); + if ( !m_hInGameStoreFont ) + OutputDebugString( "in-game store font was not created properly, text won't draw\n" ); // Initialize starfield m_pStarField = new CStarField( pGameEngine ); @@ -152,6 +156,8 @@ void CSpaceWarClient::Init( IGameEngine *pGameEngine ) m_pHTMLSurface = new CHTMLSurface(pGameEngine); LoadWorkshopItems(); + + LoadItemsWithPrices(); } @@ -1499,6 +1505,15 @@ void CSpaceWarClient::RunFrame() SetGameState( k_EClientGameMenu ); } break; + + case k_EClientInGameStore: + m_pStarField->Render(); + DrawInGameStore(); + + if (bEscapePressed) + SetGameState(k_EClientGameMenu); + break; + default: OutputDebugString( "Unhandled game state in CSpaceWar::RunFrame\n" ); } @@ -2259,6 +2274,17 @@ void CSpaceWarClient::LoadWorkshopItems() } +//----------------------------------------------------------------------------- +// Purpose: load all all purchaseable items +//----------------------------------------------------------------------------- +void CSpaceWarClient::LoadItemsWithPrices() +{ + m_vecPurchaseableItems.clear(); + + SteamAPICall_t hSteamAPICall = SteamInventory()->RequestPrices(); + m_SteamCallResultRequestPrices.Set( hSteamAPICall, this, &CSpaceWarClient::OnRequestPricesResult ); +} + //----------------------------------------------------------------------------- // Purpose: new Workshop was installed, load it instantly //----------------------------------------------------------------------------- @@ -2268,6 +2294,35 @@ void CSpaceWarClient::OnWorkshopItemInstalled( ItemInstalled_t *pParam ) LoadWorkshopItem( pParam->m_nPublishedFileId ); } +//----------------------------------------------------------------------------- +// Purpose: Request prices from the Steam Inventory Service +//----------------------------------------------------------------------------- +void CSpaceWarClient::OnRequestPricesResult( SteamInventoryRequestPricesResult_t *pParam, bool bIOFailure ) +{ + if ( pParam->m_result == k_EResultOK ) + { + strncpy( m_rgchCurrency, pParam->m_rgchCurrency, sizeof( m_rgchCurrency ) ); + + uint32 unItems = SteamInventory()->GetNumItemsWithPrices(); + std::vector vecItemDefs; + vecItemDefs.resize( unItems ); + std::vector vecPrices; + vecPrices.resize( unItems ); + + if ( SteamInventory()->GetItemsWithPrices( vecItemDefs.data(), vecPrices.data(), unItems ) ) + { + m_vecPurchaseableItems.reserve( unItems ); + for ( uint32 i = 0; i < unItems; ++i ) + { + PurchaseableItem_t t; + t.m_nItemDefID = vecItemDefs[i]; + t.m_ulPrice = vecPrices[i]; + m_vecPurchaseableItems.push_back( t ); + } + } + } +} + //----------------------------------------------------------------------------- // Purpose: Draws PublishFileID, title & description for each subscribed Workshop item @@ -2314,3 +2369,59 @@ void CSpaceWarClient::DrawWorkshopItems() sprintf_safe(rgchBuffer, "Press ESC to return to the Main Menu"); m_pGameEngine->BDrawString(m_hInstructionsFont, rect, D3DCOLOR_ARGB(255, 25, 200, 25), TEXTPOS_CENTER | TEXTPOS_TOP, rgchBuffer); } + + +void CSpaceWarClient::DrawInGameStore() +{ + const int32 width = m_pGameEngine->GetViewportWidth(); + + RECT rect; + rect.top = 0; + rect.bottom = 64; + rect.left = 0; + rect.right = width; + + char rgchBuffer[1024]; + sprintf_safe(rgchBuffer, "In-Game Store"); + m_pGameEngine->BDrawString( m_hInstructionsFont, rect, D3DCOLOR_ARGB(255, 25, 200, 25), TEXTPOS_CENTER |TEXTPOS_VCENTER, rgchBuffer); + + rect.left = 32; + rect.top = 64; + rect.bottom = 96; + + for ( uint32 i = 0; i < m_vecPurchaseableItems.size(); ++i ) + { + const auto &t = m_vecPurchaseableItems[i]; + + char buf[512]; + uint32 bufSize = sizeof(buf); + if ( !SteamInventory()->GetItemDefinitionProperty( t.m_nItemDefID, "name", buf, &bufSize ) && bufSize <= sizeof(buf) ) + { + continue; + } + uint32 unQuantity = SpaceWarLocalInventory()->GetNumOf( t.m_nItemDefID ); + + rect.top += 32; + rect.bottom += 32; + + sprintf_safe( rgchBuffer, "%u. Purchase %-25s %s %0.2f (own %u)", i+1, buf, m_rgchCurrency, float(t.m_ulPrice)/100, unQuantity ); + + m_pGameEngine->BDrawString( m_hInGameStoreFont, rect, D3DCOLOR_ARGB(255, 25, 200, 25), TEXTPOS_LEFT |TEXTPOS_VCENTER, rgchBuffer); + + // if the user presses a key, let them purchase the item + uint32 key = 0x30 + i + 1; + if ( m_pGameEngine->BIsKeyDown( key ) ) + { + uint32 rgQuantity[1] = {1}; + SteamInventory()->StartPurchase( &t.m_nItemDefID, rgQuantity, 1 ); + } + } + + rect.left = 0; + rect.right = width; + rect.top = LONG(m_pGameEngine->GetViewportHeight() * 0.8); + rect.bottom = m_pGameEngine->GetViewportHeight(); + + sprintf_safe(rgchBuffer, "Press ESC to return to the Main Menu"); + m_pGameEngine->BDrawString(m_hInstructionsFont, rect, D3DCOLOR_ARGB(255, 25, 200, 25), TEXTPOS_CENTER | TEXTPOS_TOP, rgchBuffer); +} diff --git a/SteamworksExample/SpaceWarClient.h b/SteamworksExample/SpaceWarClient.h index cfe9c44..0c3e8f6 100644 --- a/SteamworksExample/SpaceWarClient.h +++ b/SteamworksExample/SpaceWarClient.h @@ -114,7 +114,11 @@ public: CCallResult m_SteamCallResultUGCDetails; }; - +struct PurchaseableItem_t +{ + SteamItemDef_t m_nItemDefID; + uint64 m_ulPrice; +}; class CSpaceWarClient @@ -258,6 +262,12 @@ private: bool LoadWorkshopItem( PublishedFileId_t workshopItemID ); CWorkshopItem *LoadWorkshopItemFromFile( const char *pszFileName ); + // ask the inventory service for things to purchase + void LoadItemsWithPrices(); + + // draw the in-game store + void DrawInGameStore(); + // Server we are connected to CSpaceWarServer *m_pServer; @@ -291,6 +301,9 @@ private: // Font handle for drawing the instructions text HGAMEFONT m_hInstructionsFont; + // Font handle for drawing the in-game store + HGAMEFONT m_hInGameStoreFont; + // Time the last state transition occurred (so we can count-down round restarts) uint64 m_ulStateTransitionTime; @@ -426,6 +439,12 @@ private: // callback when new Workshop item was installed STEAM_CALLBACK(CSpaceWarClient, OnWorkshopItemInstalled, ItemInstalled_t); + // callback when we ask the Inventory Service for prices + void OnRequestPricesResult( SteamInventoryRequestPricesResult_t *pParam, bool bIOFailure ); + CCallResult m_SteamCallResultRequestPrices; + char m_rgchCurrency[4]; + std::vector m_vecPurchaseableItems; + // lobby browser menu CLobbyBrowser *m_pLobbyBrowser; diff --git a/public/steam/isteamclient.h b/public/steam/isteamclient.h index 0ac7a67..af8828d 100644 --- a/public/steam/isteamclient.h +++ b/public/steam/isteamclient.h @@ -100,7 +100,6 @@ class ISteamMusicRemote; class ISteamGameServerStats; class ISteamPS3OverlayRender; class ISteamHTTP; -class ISteamUnifiedMessages; class ISteamController; class ISteamUGC; class ISteamAppList; @@ -207,8 +206,8 @@ public: // Expose HTTP interface virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; - // Exposes the ISteamUnifiedMessages interface - virtual ISteamUnifiedMessages *GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + // 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 virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; @@ -300,6 +299,7 @@ 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 diff --git a/public/steam/isteamcontroller.h b/public/steam/isteamcontroller.h index c39a48b..6f31b75 100644 --- a/public/steam/isteamcontroller.h +++ b/public/steam/isteamcontroller.h @@ -46,6 +46,8 @@ enum EControllerSource 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_Count }; @@ -287,6 +289,16 @@ enum ESteamControllerLEDFlag k_ESteamControllerLEDFlag_RestoreUserDefault }; +enum ESteamInputType +{ + k_ESteamInputType_Unknown, + k_ESteamInputType_SteamController, + k_ESteamInputType_XBox360Controller, + k_ESteamInputType_XBoxOneController, + k_ESteamInputType_GenericXInput, + k_ESteamInputType_PS4Controller, +}; + // 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; @@ -377,6 +389,12 @@ public: // your state loops, instead of trying to place it in all of your state transitions. virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0; virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0; + + virtual void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle ) = 0; + virtual int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t *handlesOut ) = 0; + // ACTIONS // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. @@ -433,8 +451,11 @@ public: // Get a local path to art for on-screen glyph for a particular origin virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + + // Returns the input type for a particular handle + virtual ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) = 0; }; -#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController005" +#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController006" #endif // ISTEAMCONTROLLER_H diff --git a/public/steam/isteamfriends.h b/public/steam/isteamfriends.h index 29827b6..c1754c2 100644 --- a/public/steam/isteamfriends.h +++ b/public/steam/isteamfriends.h @@ -388,6 +388,9 @@ public: virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; CALL_RESULT( FriendsEnumerateFollowingList_t ) virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; + + virtual bool IsClanPublic( CSteamID steamIDClan ) = 0; + virtual bool IsClanOfficialGameGroup( CSteamID steamIDClan ) = 0; }; #define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends015" diff --git a/public/steam/isteamhtmlsurface.h b/public/steam/isteamhtmlsurface.h index 50450e1..117599c 100644 --- a/public/steam/isteamhtmlsurface.h +++ b/public/steam/isteamhtmlsurface.h @@ -451,6 +451,15 @@ CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface END_DEFINE_CALLBACK_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() + + #pragma pack( pop ) diff --git a/public/steam/isteaminventory.h b/public/steam/isteaminventory.h index 692c62d..85090a2 100644 --- a/public/steam/isteaminventory.h +++ b/public/steam/isteaminventory.h @@ -61,6 +61,8 @@ 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 @@ -259,17 +261,7 @@ public: virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0; - // IN-GAME TRADING - // - // TradeItems() implements limited in-game trading of items, if you prefer not to use - // the overlay or an in-game web browser to perform Steam Trading through the website. - // You should implement a UI where both players can see and agree to a trade, and then - // each client should call TradeItems simultaneously (+/- 5 seconds) with matching - // (but reversed) parameters. The result is the same as if both players performed a - // Steam Trading transaction through the web. Each player will get an inventory result - // confirming the removal or quantity changes of the items given away, and the new - // item instance id numbers and quantities of the received items. - // (Note: new item instance IDs are generated whenever an item changes ownership.) + // 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; @@ -326,6 +318,44 @@ public: CSteamID steamID, OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; + + // Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t + // will be posted if Steam was able to initialize the transaction. + // + // Once the purchase has been authorized and completed by the user, the callback SteamInventoryResultReady_t + // will be posted. + CALL_RESULT( SteamInventoryStartPurchaseResult_t ) + virtual SteamAPICall_t StartPurchase( ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; + + // Request current prices for all applicable item definitions + 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( ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs, + ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pPrices, + uint32 unArrayLength ) = 0; + + // Retrieves the price for the item definition id + // Returns false if there is no price stored for the item definition. + virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pPrice ) = 0; + + // Create a request to update properties on items + virtual SteamInventoryUpdateHandle_t StartUpdateProperties() = 0; + // Remove the property on the item + virtual bool RemoveProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName ) = 0; + // Accessor methods to set properties on items + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, const char *pchPropertyValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, bool bValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, int64 nValue ) = 0; + virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, float flValue ) = 0; + // Submit the update request by handle + virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0; + }; #define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V002" @@ -375,6 +405,23 @@ struct SteamInventoryEligiblePromoItemDefIDs_t 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 ) diff --git a/public/steam/isteamunifiedmessages.h b/public/steam/isteamunifiedmessages.h deleted file mode 100644 index 684f4e8..0000000 --- a/public/steam/isteamunifiedmessages.h +++ /dev/null @@ -1,63 +0,0 @@ -//====== Copyright � 1996-2007, Valve Corporation, All rights reserved. ======= -// -// Purpose: Interface to unified messages client -// -// You should not need to use this interface except if your product is using a language other than C++. -// Contact your Steam Tech contact for more details. -// -//============================================================================= - -#ifndef ISTEAMUNIFIEDMESSAGES_H -#define ISTEAMUNIFIEDMESSAGES_H -#ifdef _WIN32 -#pragma once -#endif - -typedef uint64 ClientUnifiedMessageHandle; - -class ISteamUnifiedMessages -{ -public: - static const ClientUnifiedMessageHandle k_InvalidUnifiedMessageHandle = 0; - - // Sends a service method (in binary serialized form) using the Steam Client. - // Returns a unified message handle (k_InvalidUnifiedMessageHandle if could not send the message). - virtual ClientUnifiedMessageHandle SendMethod( const char *pchServiceMethod, const void *pRequestBuffer, uint32 unRequestBufferSize, uint64 unContext ) = 0; - - // Gets the size of the response and the EResult. Returns false if the response is not ready yet. - virtual bool GetMethodResponseInfo( ClientUnifiedMessageHandle hHandle, uint32 *punResponseSize, EResult *peResult ) = 0; - - // Gets a response in binary serialized form (and optionally release the corresponding allocated memory). - virtual bool GetMethodResponseData( ClientUnifiedMessageHandle hHandle, void *pResponseBuffer, uint32 unResponseBufferSize, bool bAutoRelease ) = 0; - - // Releases the message and its corresponding allocated memory. - virtual bool ReleaseMethod( ClientUnifiedMessageHandle hHandle ) = 0; - - // Sends a service notification (in binary serialized form) using the Steam Client. - // Returns true if the notification was sent successfully. - virtual bool SendNotification( const char *pchServiceNotification, const void *pNotificationBuffer, uint32 unNotificationBufferSize ) = 0; -}; - -#define STEAMUNIFIEDMESSAGES_INTERFACE_VERSION "STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001" - -// 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 -#endif - -struct SteamUnifiedMessagesSendMethodResult_t -{ - enum { k_iCallback = k_iClientUnifiedMessagesCallbacks + 1 }; - ClientUnifiedMessageHandle m_hHandle; // The handle returned by SendMethod(). - uint64 m_unContext; // Context provided when calling SendMethod(). - EResult m_eResult; // The result of the method call. - uint32 m_unResponseSize; // The size of the response. -}; - -#pragma pack( pop ) - -#endif // ISTEAMUNIFIEDMESSAGES_H diff --git a/public/steam/lib/linux32/libsdkencryptedappticket.so b/public/steam/lib/linux32/libsdkencryptedappticket.so index ae859d3..774fcfc 100644 Binary files a/public/steam/lib/linux32/libsdkencryptedappticket.so and b/public/steam/lib/linux32/libsdkencryptedappticket.so differ diff --git a/public/steam/lib/linux64/libsdkencryptedappticket.so b/public/steam/lib/linux64/libsdkencryptedappticket.so index 97377d8..a21eeed 100644 Binary files a/public/steam/lib/linux64/libsdkencryptedappticket.so and b/public/steam/lib/linux64/libsdkencryptedappticket.so differ diff --git a/public/steam/lib/win32/sdkencryptedappticket.dll b/public/steam/lib/win32/sdkencryptedappticket.dll index acae96d..f52b28c 100644 Binary files a/public/steam/lib/win32/sdkencryptedappticket.dll and b/public/steam/lib/win32/sdkencryptedappticket.dll differ diff --git a/public/steam/lib/win32/sdkencryptedappticket.lib b/public/steam/lib/win32/sdkencryptedappticket.lib index 576f884..4021b7f 100644 Binary files a/public/steam/lib/win32/sdkencryptedappticket.lib and b/public/steam/lib/win32/sdkencryptedappticket.lib differ diff --git a/public/steam/lib/win64/sdkencryptedappticket64.dll b/public/steam/lib/win64/sdkencryptedappticket64.dll index 2b75b3c..404b56b 100644 Binary files a/public/steam/lib/win64/sdkencryptedappticket64.dll and b/public/steam/lib/win64/sdkencryptedappticket64.dll differ diff --git a/public/steam/lib/win64/sdkencryptedappticket64.lib b/public/steam/lib/win64/sdkencryptedappticket64.lib index 1ba743c..b593f03 100644 Binary files a/public/steam/lib/win64/sdkencryptedappticket64.lib and b/public/steam/lib/win64/sdkencryptedappticket64.lib differ diff --git a/public/steam/steam_api.h b/public/steam/steam_api.h index b2b4799..010a548 100644 --- a/public/steam/steam_api.h +++ b/public/steam/steam_api.h @@ -23,7 +23,6 @@ #include "isteammusic.h" #include "isteammusicremote.h" #include "isteamhttp.h" -#include "isteamunifiedmessages.h" #include "isteamcontroller.h" #include "isteamugc.h" #include "isteamapplist.h" @@ -115,7 +114,6 @@ inline ISteamMatchmakingServers *SteamMatchmakingServers(); inline ISteamRemoteStorage *SteamRemoteStorage(); inline ISteamScreenshots *SteamScreenshots(); inline ISteamHTTP *SteamHTTP(); -inline ISteamUnifiedMessages *SteamUnifiedMessages(); inline ISteamController *SteamController(); inline ISteamUGC *SteamUGC(); inline ISteamAppList *SteamAppList(); @@ -149,7 +147,6 @@ public: ISteamRemoteStorage* SteamRemoteStorage() const { return m_pSteamRemoteStorage; } ISteamScreenshots* SteamScreenshots() const { return m_pSteamScreenshots; } ISteamHTTP* SteamHTTP() const { return m_pSteamHTTP; } - ISteamUnifiedMessages* SteamUnifiedMessages() const { return m_pSteamUnifiedMessages; } ISteamController* SteamController() const { return m_pController; } ISteamUGC* SteamUGC() const { return m_pSteamUGC; } ISteamAppList* SteamAppList() const { return m_pSteamAppList; } @@ -173,7 +170,6 @@ private: ISteamRemoteStorage *m_pSteamRemoteStorage; ISteamScreenshots *m_pSteamScreenshots; ISteamHTTP *m_pSteamHTTP; - ISteamUnifiedMessages *m_pSteamUnifiedMessages; ISteamController *m_pController; ISteamUGC *m_pSteamUGC; ISteamAppList *m_pSteamAppList; diff --git a/public/steam/steam_api.json b/public/steam/steam_api.json index 1e1dcbc..02bc811 100644 --- a/public/steam/steam_api.json +++ b/public/steam/steam_api.json @@ -27,6 +27,7 @@ ,{"typedef": "AccountID_t","type": "uint32"} ,{"typedef": "PartnerId_t","type": "uint32"} ,{"typedef": "ManifestId_t","type": "uint64"} +,{"typedef": "SiteId_t","type": "uint64"} ,{"typedef": "HAuthTicket","type": "uint32"} ,{"typedef": "PFNLegacyKeyRegistration","type": "void (*)(const char *, const char *)"} ,{"typedef": "PFNLegacyKeyInstalled","type": "_Bool (*)(void)"} @@ -70,7 +71,6 @@ ,{"typedef": "MusicPlayerWantsPlayingRepeatStatus_t::SteamCallback_t","type": "struct MusicPlayerWantsPlayingRepeatStatus_t"} ,{"typedef": "HTTPRequestHandle","type": "uint32"} ,{"typedef": "HTTPCookieContainerHandle","type": "uint32"} -,{"typedef": "ClientUnifiedMessageHandle","type": "uint64"} ,{"typedef": "ControllerHandle_t","type": "uint64"} ,{"typedef": "ControllerActionSetHandle_t","type": "uint64"} ,{"typedef": "ControllerDigitalActionHandle_t","type": "uint64"} @@ -102,9 +102,11 @@ ,{"typedef": "HTML_ShowToolTip_t::SteamCallback_t","type": "struct HTML_ShowToolTip_t"} ,{"typedef": "HTML_UpdateToolTip_t::SteamCallback_t","type": "struct HTML_UpdateToolTip_t"} ,{"typedef": "HTML_HideToolTip_t::SteamCallback_t","type": "struct HTML_HideToolTip_t"} +,{"typedef": "HTML_BrowserRestarted_t::SteamCallback_t","type": "struct HTML_BrowserRestarted_t"} ,{"typedef": "SteamItemInstanceID_t","type": "uint64"} ,{"typedef": "SteamItemDef_t","type": "int32"} ,{"typedef": "SteamInventoryResult_t","type": "int32"} +,{"typedef": "SteamInventoryUpdateHandle_t","type": "uint64"} ,{"typedef": "BroadcastUploadStart_t::SteamCallback_t","type": "struct BroadcastUploadStart_t"} ,{"typedef": "BroadcastUploadStop_t::SteamCallback_t","type": "struct BroadcastUploadStop_t"} ,{"typedef": "GetVideoURLResult_t::SteamCallback_t","type": "struct GetVideoURLResult_t"} @@ -231,6 +233,8 @@ ,{"name": "k_EResultTooManyPending","value": "108"} ,{"name": "k_EResultNoSiteLicensesFound","value": "109"} ,{"name": "k_EResultWGNetworkSendExceeded","value": "110"} + ,{"name": "k_EResultAccountNotFriends","value": "111"} + ,{"name": "k_EResultLimitedUserAccount","value": "112"} ]} , {"enumname": "EVoiceResult","values": [ {"name": "k_EVoiceResultOK","value": "0"} @@ -454,6 +458,18 @@ ,{"name": "k_eEVRHMDType_Oculus_DK2","value": "22"} ,{"name": "k_eEVRHMDType_Oculus_Rift","value": "23"} ,{"name": "k_eEVRHMDType_Oculus_Unknown","value": "40"} + ,{"name": "k_eEVRHMDType_Acer_Unknown","value": "50"} + ,{"name": "k_eEVRHMDType_Acer_WindowsMR","value": "51"} + ,{"name": "k_eEVRHMDType_Dell_Unknown","value": "60"} + ,{"name": "k_eEVRHMDType_Dell_Visor","value": "61"} + ,{"name": "k_eEVRHMDType_Lenovo_Unknown","value": "70"} + ,{"name": "k_eEVRHMDType_Lenovo_Explorer","value": "71"} + ,{"name": "k_eEVRHMDType_HP_Unknown","value": "80"} + ,{"name": "k_eEVRHMDType_HP_WindowsMR","value": "81"} + ,{"name": "k_eEVRHMDType_Samsung_Unknown","value": "90"} + ,{"name": "k_eEVRHMDType_Samsung_Odyssey","value": "91"} + ,{"name": "k_eEVRHMDType_Unannounced_Unknown","value": "100"} + ,{"name": "k_eEVRHMDType_Unannounced_WindowsMR","value": "101"} ]} , {"enumname": "CGameID::EGameIDType","values": [ {"name": "k_EGameIDTypeApp","value": "0"} @@ -795,7 +811,9 @@ ,{"name": "k_EControllerSource_CenterTrackpad","value": "9"} ,{"name": "k_EControllerSource_RightJoystick","value": "10"} ,{"name": "k_EControllerSource_DPad","value": "11"} - ,{"name": "k_EControllerSource_Count","value": "12"} + ,{"name": "k_EControllerSource_Key","value": "12"} + ,{"name": "k_EControllerSource_Mouse","value": "13"} + ,{"name": "k_EControllerSource_Count","value": "14"} ]} , {"enumname": "EControllerSourceMode","values": [ {"name": "k_EControllerSourceMode_None","value": "0"} @@ -1019,6 +1037,14 @@ {"name": "k_ESteamControllerLEDFlag_SetColor","value": "0"} ,{"name": "k_ESteamControllerLEDFlag_RestoreUserDefault","value": "1"} ]} +, {"enumname": "ESteamInputType","values": [ + {"name": "k_ESteamInputType_Unknown","value": "0"} + ,{"name": "k_ESteamInputType_SteamController","value": "1"} + ,{"name": "k_ESteamInputType_XBox360Controller","value": "2"} + ,{"name": "k_ESteamInputType_XBoxOneController","value": "3"} + ,{"name": "k_ESteamInputType_GenericXInput","value": "4"} + ,{"name": "k_ESteamInputType_PS4Controller","value": "5"} +]} , {"enumname": "EUGCMatchingUGCType","values": [ {"name": "k_EUGCMatchingUGCType_Items","value": "0"} ,{"name": "k_EUGCMatchingUGCType_Items_Mtx","value": "1"} @@ -1293,6 +1319,8 @@ "constname": "k_iClientSharedConnectionCallbacks","consttype": "int", "constval": "4900"} ,{ "constname": "k_ISteamParentalSettingsCallbacks","consttype": "int", "constval": "5000"} +,{ + "constname": "k_iClientShaderCallbacks","consttype": "int", "constval": "5100"} ,{ "constname": "k_cchPersonaNameMax","consttype": "int", "constval": "128"} ,{ @@ -1309,8 +1337,6 @@ "constname": "k_cchLeaderboardNameMax","consttype": "int", "constval": "128"} ,{ "constname": "k_cLeaderboardDetailsMax","consttype": "int", "constval": "64"} -,{ - "constname": "k_InvalidUnifiedMessageHandle","consttype": "const ClientUnifiedMessageHandle", "constval": "0"} ,{ "constname": "k_SteamItemInstanceIDInvalid","consttype": "const SteamItemInstanceID_t", "constval": "18446744073709551615"} ,{ @@ -1793,11 +1819,6 @@ { "fieldname": "m_ulContextValue", "fieldtype": "uint64"}, { "fieldname": "m_cOffset", "fieldtype": "uint32"}, { "fieldname": "m_cBytesReceived", "fieldtype": "uint32"}]} -,{"struct": "SteamUnifiedMessagesSendMethodResult_t","fields": [ -{ "fieldname": "m_hHandle", "fieldtype": "ClientUnifiedMessageHandle"}, -{ "fieldname": "m_unContext", "fieldtype": "uint64"}, -{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, -{ "fieldname": "m_unResponseSize", "fieldtype": "uint32"}]} ,{"struct": "ControllerAnalogActionData_t","fields": [ { "fieldname": "eMode", "fieldtype": "enum EControllerSourceMode"}, { "fieldname": "x", "fieldtype": "float"}, @@ -2013,6 +2034,9 @@ { "fieldname": "pchMsg", "fieldtype": "const char *"}]} ,{"struct": "HTML_HideToolTip_t","fields": [ { "fieldname": "unBrowserHandle", "fieldtype": "HHTMLBrowser"}]} +,{"struct": "HTML_BrowserRestarted_t","fields": [ +{ "fieldname": "unBrowserHandle", "fieldtype": "HHTMLBrowser"}, +{ "fieldname": "unOldBrowserHandle", "fieldtype": "HHTMLBrowser"}]} ,{"struct": "SteamItemDetails_t","fields": [ { "fieldname": "m_itemId", "fieldtype": "SteamItemInstanceID_t"}, { "fieldname": "m_iDefinition", "fieldtype": "SteamItemDef_t"}, @@ -2028,6 +2052,13 @@ { "fieldname": "m_steamID", "fieldtype": "class CSteamID"}, { "fieldname": "m_numEligiblePromoItemDefs", "fieldtype": "int"}, { "fieldname": "m_bCachedData", "fieldtype": "_Bool"}]} +,{"struct": "SteamInventoryStartPurchaseResult_t","fields": [ +{ "fieldname": "m_result", "fieldtype": "enum EResult"}, +{ "fieldname": "m_ulOrderID", "fieldtype": "uint64"}, +{ "fieldname": "m_ulTransID", "fieldtype": "uint64"}]} +,{"struct": "SteamInventoryRequestPricesResult_t","fields": [ +{ "fieldname": "m_result", "fieldtype": "enum EResult"}, +{ "fieldname": "m_rgchCurrency", "fieldtype": "char [4]"}]} ,{"struct": "BroadcastUploadStop_t","fields": [ { "fieldname": "m_eResult", "fieldtype": "enum EBroadcastUploadResult"}]} ,{"struct": "GetVideoURLResult_t","fields": [ @@ -2050,7 +2081,6 @@ { "fieldname": "m_pSteamRemoteStorage", "fieldtype": "class ISteamRemoteStorage *"}, { "fieldname": "m_pSteamScreenshots", "fieldtype": "class ISteamScreenshots *"}, { "fieldname": "m_pSteamHTTP", "fieldtype": "class ISteamHTTP *"}, -{ "fieldname": "m_pSteamUnifiedMessages", "fieldtype": "class ISteamUnifiedMessages *"}, { "fieldname": "m_pController", "fieldtype": "class ISteamController *"}, { "fieldname": "m_pSteamUGC", "fieldtype": "class ISteamUGC *"}, { "fieldname": "m_pSteamAppList", "fieldtype": "class ISteamAppList *"}, @@ -2326,16 +2356,6 @@ { "paramname": "pchVersion" ,"paramtype": "const char *"} ] } -,{ - "classname": "ISteamClient", - "methodname": "GetISteamUnifiedMessages", - "returntype": "class ISteamUnifiedMessages *", - "params": [ -{ "paramname": "hSteamuser" ,"paramtype": "HSteamUser"}, -{ "paramname": "hSteamPipe" ,"paramtype": "HSteamPipe"}, -{ "paramname": "pchVersion" ,"paramtype": "const char *"} - ] -} ,{ "classname": "ISteamClient", "methodname": "GetISteamController", @@ -3230,6 +3250,22 @@ { "paramname": "unStartIndex" ,"paramtype": "uint32"} ] } +,{ + "classname": "ISteamFriends", + "methodname": "IsClanPublic", + "returntype": "bool", + "params": [ +{ "paramname": "steamIDClan" ,"paramtype": "class CSteamID"} + ] +} +,{ + "classname": "ISteamFriends", + "methodname": "IsClanOfficialGameGroup", + "returntype": "bool", + "params": [ +{ "paramname": "steamIDClan" ,"paramtype": "class CSteamID"} + ] +} ,{ "classname": "ISteamUtils", "methodname": "GetSecondsSinceAppActive", @@ -5882,56 +5918,6 @@ { "paramname": "pbWasTimedOut" ,"paramtype": "bool *"} ] } -,{ - "classname": "ISteamUnifiedMessages", - "methodname": "SendMethod", - "returntype": "ClientUnifiedMessageHandle", - "params": [ -{ "paramname": "pchServiceMethod" ,"paramtype": "const char *"}, -{ "paramname": "pRequestBuffer" ,"paramtype": "const void *"}, -{ "paramname": "unRequestBufferSize" ,"paramtype": "uint32"}, -{ "paramname": "unContext" ,"paramtype": "uint64"} - ] -} -,{ - "classname": "ISteamUnifiedMessages", - "methodname": "GetMethodResponseInfo", - "returntype": "bool", - "params": [ -{ "paramname": "hHandle" ,"paramtype": "ClientUnifiedMessageHandle"}, -{ "paramname": "punResponseSize" ,"paramtype": "uint32 *"}, -{ "paramname": "peResult" ,"paramtype": "EResult *"} - ] -} -,{ - "classname": "ISteamUnifiedMessages", - "methodname": "GetMethodResponseData", - "returntype": "bool", - "params": [ -{ "paramname": "hHandle" ,"paramtype": "ClientUnifiedMessageHandle"}, -{ "paramname": "pResponseBuffer" ,"paramtype": "void *"}, -{ "paramname": "unResponseBufferSize" ,"paramtype": "uint32"}, -{ "paramname": "bAutoRelease" ,"paramtype": "bool"} - ] -} -,{ - "classname": "ISteamUnifiedMessages", - "methodname": "ReleaseMethod", - "returntype": "bool", - "params": [ -{ "paramname": "hHandle" ,"paramtype": "ClientUnifiedMessageHandle"} - ] -} -,{ - "classname": "ISteamUnifiedMessages", - "methodname": "SendNotification", - "returntype": "bool", - "params": [ -{ "paramname": "pchServiceNotification" ,"paramtype": "const char *"}, -{ "paramname": "pNotificationBuffer" ,"paramtype": "const void *"}, -{ "paramname": "unNotificationBufferSize" ,"paramtype": "uint32"} - ] -} ,{ "classname": "ISteamController", "methodname": "Init", @@ -5988,6 +5974,41 @@ { "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} ] } +,{ + "classname": "ISteamController", + "methodname": "ActivateActionSetLayer", + "returntype": "void", + "params": [ +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"}, +{ "paramname": "actionSetLayerHandle" ,"paramtype": "ControllerActionSetHandle_t"} + ] +} +,{ + "classname": "ISteamController", + "methodname": "DeactivateActionSetLayer", + "returntype": "void", + "params": [ +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"}, +{ "paramname": "actionSetLayerHandle" ,"paramtype": "ControllerActionSetHandle_t"} + ] +} +,{ + "classname": "ISteamController", + "methodname": "DeactivateAllActionSetLayers", + "returntype": "void", + "params": [ +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} + ] +} +,{ + "classname": "ISteamController", + "methodname": "GetActiveActionSetLayers", + "returntype": "int", + "params": [ +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"}, +{ "paramname": "handlesOut" ,"paramtype": "ControllerActionSetHandle_t *"} + ] +} ,{ "classname": "ISteamController", "methodname": "GetDigitalActionHandle", @@ -6162,6 +6183,14 @@ { "paramname": "eOrigin" ,"paramtype": "EControllerActionOrigin"} ] } +,{ + "classname": "ISteamController", + "methodname": "GetInputTypeForHandle", + "returntype": "ESteamInputType", + "params": [ +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} + ] +} ,{ "classname": "ISteamUGC", "methodname": "CreateQueryUserUGCRequest", @@ -7450,6 +7479,113 @@ { "paramname": "punItemDefIDsArraySize" ,"desc": "Size of array is passed in and actual size used is returned in this param" ,"paramtype": "uint32 *"} ] } +,{ + "classname": "ISteamInventory", + "methodname": "StartPurchase", "callresult": "SteamInventoryStartPurchaseResult_t", + "returntype": "SteamAPICall_t", + "params": [ +{ "paramname": "pArrayItemDefs" ,"array_count": "unArrayLength" ,"paramtype": "const SteamItemDef_t *"}, +{ "paramname": "punArrayQuantity" ,"array_count": "unArrayLength" ,"paramtype": "const uint32 *"}, +{ "paramname": "unArrayLength" ,"paramtype": "uint32"} + ] +} +,{ + "classname": "ISteamInventory", + "methodname": "RequestPrices", "callresult": "SteamInventoryRequestPricesResult_t", + "returntype": "SteamAPICall_t" +} +,{ + "classname": "ISteamInventory", + "methodname": "GetNumItemsWithPrices", + "returntype": "uint32" +} +,{ + "classname": "ISteamInventory", + "methodname": "GetItemsWithPrices", + "returntype": "bool", + "params": [ +{ "paramname": "pArrayItemDefs" ,"out_array_count": "pArrayItemDefs" ,"desc": "Items with prices" ,"paramtype": "SteamItemDef_t *"}, +{ "paramname": "pPrices" ,"out_array_count": "pPrices" ,"desc": "List of prices for the given item defs" ,"paramtype": "uint64 *"}, +{ "paramname": "unArrayLength" ,"paramtype": "uint32"} + ] +} +,{ + "classname": "ISteamInventory", + "methodname": "GetItemPrice", + "returntype": "bool", + "params": [ +{ "paramname": "iDefinition" ,"paramtype": "SteamItemDef_t"}, +{ "paramname": "pPrice" ,"paramtype": "uint64 *"} + ] +} +,{ + "classname": "ISteamInventory", + "methodname": "StartUpdateProperties", + "returntype": "SteamInventoryUpdateHandle_t" +} +,{ + "classname": "ISteamInventory", + "methodname": "RemoveProperty", + "returntype": "bool", + "params": [ +{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, +{ "paramname": "nItemID" ,"paramtype": "SteamItemInstanceID_t"}, +{ "paramname": "pchPropertyName" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamInventory", + "methodname": "SetProperty", + "returntype": "bool", + "params": [ +{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, +{ "paramname": "nItemID" ,"paramtype": "SteamItemInstanceID_t"}, +{ "paramname": "pchPropertyName" ,"paramtype": "const char *"}, +{ "paramname": "pchPropertyValue" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamInventory", + "methodname": "SetProperty", + "returntype": "bool", + "params": [ +{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, +{ "paramname": "nItemID" ,"paramtype": "SteamItemInstanceID_t"}, +{ "paramname": "pchPropertyName" ,"paramtype": "const char *"}, +{ "paramname": "bValue" ,"paramtype": "bool"} + ] +} +,{ + "classname": "ISteamInventory", + "methodname": "SetProperty", + "returntype": "bool", + "params": [ +{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, +{ "paramname": "nItemID" ,"paramtype": "SteamItemInstanceID_t"}, +{ "paramname": "pchPropertyName" ,"paramtype": "const char *"}, +{ "paramname": "nValue" ,"paramtype": "int64"} + ] +} +,{ + "classname": "ISteamInventory", + "methodname": "SetProperty", + "returntype": "bool", + "params": [ +{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, +{ "paramname": "nItemID" ,"paramtype": "SteamItemInstanceID_t"}, +{ "paramname": "pchPropertyName" ,"paramtype": "const char *"}, +{ "paramname": "flValue" ,"paramtype": "float"} + ] +} +,{ + "classname": "ISteamInventory", + "methodname": "SubmitUpdateProperties", + "returntype": "bool", + "params": [ +{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, +{ "paramname": "pResultHandle" ,"paramtype": "SteamInventoryResult_t *"} + ] +} ,{ "classname": "ISteamVideo", "methodname": "GetVideoURL", diff --git a/public/steam/steam_api_flat.h b/public/steam/steam_api_flat.h index 3d81577..45ba7c3 100644 --- a/public/steam/steam_api_flat.h +++ b/public/steam/steam_api_flat.h @@ -41,6 +41,7 @@ typedef uint64 SteamAPICall_t; typedef uint32 AccountID_t; typedef uint32 PartnerId_t; typedef uint64 ManifestId_t; +typedef uint64 SiteId_t; typedef uint32 HAuthTicket; typedef void * BREAKPAD_HANDLE; typedef char compile_time_assert_type[1]; @@ -61,7 +62,6 @@ typedef uint32 SNetListenSocket_t; typedef uint32 ScreenshotHandle; typedef uint32 HTTPRequestHandle; typedef uint32 HTTPCookieContainerHandle; -typedef uint64 ClientUnifiedMessageHandle; typedef uint64 ControllerHandle_t; typedef uint64 ControllerActionSetHandle_t; typedef uint64 ControllerDigitalActionHandle_t; @@ -72,6 +72,7 @@ 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; @@ -123,6 +124,7 @@ 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_cchPersonaNameMax = 128; int const_k_cwchPersonaNameMax = 32; int const_k_cchMaxRichPresenceKeys = 20; @@ -131,7 +133,6 @@ int const_k_cchMaxRichPresenceValueLength = 256; int const_k_cchStatNameMax = 128; int const_k_cchLeaderboardNameMax = 128; int const_k_cLeaderboardDetailsMax = 64; -unsigned long const_k_InvalidUnifiedMessageHandle = 0; unsigned long const_k_SteamItemInstanceIDInvalid = 0xffffffff; int const_k_SteamInventoryResultInvalid = -1; @@ -165,7 +166,6 @@ 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 ISteamUnifiedMessages * SteamAPI_ISteamClient_GetISteamUnifiedMessages(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); @@ -274,6 +274,8 @@ S_API int SteamAPI_ISteamFriends_GetFriendMessage(intptr_t instancePtr, class CS 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 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); @@ -590,11 +592,6 @@ S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo(intptr_t instancePtr, 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 ClientUnifiedMessageHandle SteamAPI_ISteamUnifiedMessages_SendMethod(intptr_t instancePtr, const char * pchServiceMethod, const void * pRequestBuffer, uint32 unRequestBufferSize, uint64 unContext); -S_API bool SteamAPI_ISteamUnifiedMessages_GetMethodResponseInfo(intptr_t instancePtr, ClientUnifiedMessageHandle hHandle, uint32 * punResponseSize, EResult * peResult); -S_API bool SteamAPI_ISteamUnifiedMessages_GetMethodResponseData(intptr_t instancePtr, ClientUnifiedMessageHandle hHandle, void * pResponseBuffer, uint32 unResponseBufferSize, bool bAutoRelease); -S_API bool SteamAPI_ISteamUnifiedMessages_ReleaseMethod(intptr_t instancePtr, ClientUnifiedMessageHandle hHandle); -S_API bool SteamAPI_ISteamUnifiedMessages_SendNotification(intptr_t instancePtr, const char * pchServiceNotification, const void * pNotificationBuffer, uint32 unNotificationBufferSize); 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); @@ -603,6 +600,10 @@ S_API bool SteamAPI_ISteamController_ShowBindingPanel(intptr_t instancePtr, Cont 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 ControllerDigitalActionData_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); @@ -621,6 +622,7 @@ S_API bool SteamAPI_ISteamController_ShowDigitalActionOrigins(intptr_t instanceP S_API bool SteamAPI_ISteamController_ShowAnalogActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition); S_API const char * SteamAPI_ISteamController_GetStringForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin); S_API const char * SteamAPI_ISteamController_GetGlyphForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin); +S_API ESteamInputType SteamAPI_ISteamController_GetInputTypeForHandle(intptr_t instancePtr, ControllerHandle_t controllerHandle); 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_CreateQueryUGCDetailsRequest(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs); @@ -761,6 +763,18 @@ S_API bool SteamAPI_ISteamInventory_GetItemDefinitionIDs(intptr_t instancePtr, S 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 * pPrices, uint32 unArrayLength); +S_API bool SteamAPI_ISteamInventory_GetItemPrice(intptr_t instancePtr, SteamItemDef_t iDefinition, uint64 * pPrice); +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); diff --git a/public/steam/steam_api_internal.h b/public/steam/steam_api_internal.h index b824282..f5e5721 100644 --- a/public/steam/steam_api_internal.h +++ b/public/steam/steam_api_internal.h @@ -44,7 +44,6 @@ inline ISteamNetworking *SteamNetworking() { return SteamInternal_ModuleCont inline ISteamRemoteStorage *SteamRemoteStorage() { return SteamInternal_ModuleContext().SteamRemoteStorage(); } inline ISteamScreenshots *SteamScreenshots() { return SteamInternal_ModuleContext().SteamScreenshots(); } inline ISteamHTTP *SteamHTTP() { return SteamInternal_ModuleContext().SteamHTTP(); } -inline ISteamUnifiedMessages *SteamUnifiedMessages() { return SteamInternal_ModuleContext().SteamUnifiedMessages(); } inline ISteamController *SteamController() { return SteamInternal_ModuleContext().SteamController(); } inline ISteamUGC *SteamUGC() { return SteamInternal_ModuleContext().SteamUGC(); } inline ISteamAppList *SteamAppList() { return SteamInternal_ModuleContext().SteamAppList(); } @@ -73,7 +72,6 @@ inline void CSteamAPIContext::Clear() m_pSteamHTTP = NULL; m_pSteamScreenshots = NULL; m_pSteamMusic = NULL; - m_pSteamUnifiedMessages = NULL; m_pController = NULL; m_pSteamUGC = NULL; m_pSteamAppList = NULL; @@ -142,10 +140,6 @@ inline bool CSteamAPIContext::Init() if ( !m_pSteamHTTP ) return false; - m_pSteamUnifiedMessages = m_pSteamClient->GetISteamUnifiedMessages( hSteamUser, hSteamPipe, STEAMUNIFIEDMESSAGES_INTERFACE_VERSION ); - if ( !m_pSteamUnifiedMessages ) - return false; - m_pController = m_pSteamClient->GetISteamController( hSteamUser, hSteamPipe, STEAMCONTROLLER_INTERFACE_VERSION ); if ( !m_pController ) return false; diff --git a/public/steam/steam_api_interop.cs b/public/steam/steam_api_interop.cs index 1c433cc..eb8721c 100644 --- a/public/steam/steam_api_interop.cs +++ b/public/steam/steam_api_interop.cs @@ -63,8 +63,6 @@ internal static extern void SteamAPI_ISteamClient_SetWarningMessageHook(IntPtr i internal static extern bool SteamAPI_ISteamClient_BShutdownIfAllPipesClosed(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamHTTP")] internal static extern IntPtr SteamAPI_ISteamClient_GetISteamHTTP(IntPtr instancePtr, uint hSteamuser, uint hSteamPipe, string pchVersion); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamUnifiedMessages")] -internal static extern IntPtr SteamAPI_ISteamClient_GetISteamUnifiedMessages(IntPtr instancePtr, uint hSteamuser, uint hSteamPipe, string pchVersion); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamController")] internal static extern IntPtr SteamAPI_ISteamClient_GetISteamController(IntPtr instancePtr, uint hSteamUser, uint hSteamPipe, string pchVersion); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamUGC")] @@ -281,6 +279,10 @@ internal static extern ulong SteamAPI_ISteamFriends_GetFollowerCount(IntPtr inst internal static extern ulong SteamAPI_ISteamFriends_IsFollowing(IntPtr instancePtr, ulong steamID); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_EnumerateFollowingList")] internal static extern ulong SteamAPI_ISteamFriends_EnumerateFollowingList(IntPtr instancePtr, uint unStartIndex); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_IsClanPublic")] +internal static extern bool SteamAPI_ISteamFriends_IsClanPublic(IntPtr instancePtr, ulong steamIDClan); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_IsClanOfficialGameGroup")] +internal static extern bool SteamAPI_ISteamFriends_IsClanOfficialGameGroup(IntPtr instancePtr, ulong steamIDClan); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceAppActive")] internal static extern uint SteamAPI_ISteamUtils_GetSecondsSinceAppActive(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceComputerActive")] @@ -913,16 +915,6 @@ internal static extern bool SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCe internal static extern bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(IntPtr instancePtr, uint hRequest, uint unMilliseconds); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut")] internal static extern bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut(IntPtr instancePtr, uint hRequest, ref bool pbWasTimedOut); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUnifiedMessages_SendMethod")] -internal static extern ulong SteamAPI_ISteamUnifiedMessages_SendMethod(IntPtr instancePtr, string pchServiceMethod, IntPtr pRequestBuffer, uint unRequestBufferSize, ulong unContext); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUnifiedMessages_GetMethodResponseInfo")] -internal static extern bool SteamAPI_ISteamUnifiedMessages_GetMethodResponseInfo(IntPtr instancePtr, ulong hHandle, ref uint punResponseSize, ref uint peResult); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUnifiedMessages_GetMethodResponseData")] -internal static extern bool SteamAPI_ISteamUnifiedMessages_GetMethodResponseData(IntPtr instancePtr, ulong hHandle, IntPtr pResponseBuffer, uint unResponseBufferSize, bool bAutoRelease); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUnifiedMessages_ReleaseMethod")] -internal static extern bool SteamAPI_ISteamUnifiedMessages_ReleaseMethod(IntPtr instancePtr, ulong hHandle); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUnifiedMessages_SendNotification")] -internal static extern bool SteamAPI_ISteamUnifiedMessages_SendNotification(IntPtr instancePtr, string pchServiceNotification, IntPtr pNotificationBuffer, uint unNotificationBufferSize); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_Init")] internal static extern bool SteamAPI_ISteamController_Init(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_Shutdown")] @@ -939,6 +931,14 @@ internal static extern ulong SteamAPI_ISteamController_GetActionSetHandle(IntPtr internal static extern void SteamAPI_ISteamController_ActivateActionSet(IntPtr instancePtr, ulong controllerHandle, ulong actionSetHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetCurrentActionSet")] internal static extern ulong SteamAPI_ISteamController_GetCurrentActionSet(IntPtr instancePtr, ulong controllerHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_ActivateActionSetLayer")] +internal static extern void SteamAPI_ISteamController_ActivateActionSetLayer(IntPtr instancePtr, ulong controllerHandle, ulong actionSetLayerHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_DeactivateActionSetLayer")] +internal static extern void SteamAPI_ISteamController_DeactivateActionSetLayer(IntPtr instancePtr, ulong controllerHandle, ulong actionSetLayerHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_DeactivateAllActionSetLayers")] +internal static extern void SteamAPI_ISteamController_DeactivateAllActionSetLayers(IntPtr instancePtr, ulong controllerHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetActiveActionSetLayers")] +internal static extern int SteamAPI_ISteamController_GetActiveActionSetLayers(IntPtr instancePtr, ulong controllerHandle, ref ulong handlesOut); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetDigitalActionHandle")] internal static extern ulong SteamAPI_ISteamController_GetDigitalActionHandle(IntPtr instancePtr, string pszActionName); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetDigitalActionData")] @@ -975,6 +975,8 @@ internal static extern bool SteamAPI_ISteamController_ShowAnalogActionOrigins(In internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin(IntPtr instancePtr, uint eOrigin); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetGlyphForActionOrigin")] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetInputTypeForHandle")] +internal static extern uint SteamAPI_ISteamController_GetInputTypeForHandle(IntPtr instancePtr, ulong controllerHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUserUGCRequest")] internal static extern ulong SteamAPI_ISteamUGC_CreateQueryUserUGCRequest(IntPtr instancePtr, uint unAccountID, uint eListType, uint eMatchingUGCType, uint eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint unPage); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequest")] @@ -1255,6 +1257,30 @@ internal static extern bool SteamAPI_ISteamInventory_GetItemDefinitionProperty(I internal static extern ulong SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs(IntPtr instancePtr, ulong steamID); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs")] internal static extern bool SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs(IntPtr instancePtr, ulong steamID, [In, Out] int[] pItemDefIDs, ref uint punItemDefIDsArraySize); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_StartPurchase")] +internal static extern ulong SteamAPI_ISteamInventory_StartPurchase(IntPtr instancePtr, [In, Out] int[] pArrayItemDefs, [In, Out] uint[] punArrayQuantity, uint unArrayLength); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_RequestPrices")] +internal static extern ulong SteamAPI_ISteamInventory_RequestPrices(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_GetNumItemsWithPrices")] +internal static extern uint SteamAPI_ISteamInventory_GetNumItemsWithPrices(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_GetItemsWithPrices")] +internal static extern bool SteamAPI_ISteamInventory_GetItemsWithPrices(IntPtr instancePtr, [In, Out] int[] pArrayItemDefs, [In, Out] ulong[] pPrices, uint unArrayLength); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_GetItemPrice")] +internal static extern bool SteamAPI_ISteamInventory_GetItemPrice(IntPtr instancePtr, int iDefinition, ref ulong pPrice); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_StartUpdateProperties")] +internal static extern ulong SteamAPI_ISteamInventory_StartUpdateProperties(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_RemoveProperty")] +internal static extern bool SteamAPI_ISteamInventory_RemoveProperty(IntPtr instancePtr, ulong handle, ulong nItemID, string pchPropertyName); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_SetProperty")] +internal static extern bool SteamAPI_ISteamInventory_SetProperty(IntPtr instancePtr, ulong handle, ulong nItemID, string pchPropertyName, string pchPropertyValue); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_SetProperty0")] +internal static extern bool SteamAPI_ISteamInventory_SetProperty0(IntPtr instancePtr, ulong handle, ulong nItemID, string pchPropertyName, bool bValue); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_SetProperty1")] +internal static extern bool SteamAPI_ISteamInventory_SetProperty1(IntPtr instancePtr, ulong handle, ulong nItemID, string pchPropertyName, long nValue); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_SetProperty2")] +internal static extern bool SteamAPI_ISteamInventory_SetProperty2(IntPtr instancePtr, ulong handle, ulong nItemID, string pchPropertyName, float flValue); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_SubmitUpdateProperties")] +internal static extern bool SteamAPI_ISteamInventory_SubmitUpdateProperties(IntPtr instancePtr, ulong handle, ref int pResultHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamVideo_GetVideoURL")] internal static extern void SteamAPI_ISteamVideo_GetVideoURL(IntPtr instancePtr, uint unVideoAppID); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamVideo_IsBroadcasting")] @@ -1393,6 +1419,11 @@ public delegate void SteamAPI_GetOPFSettingsResult_t_Callback(GetOPFSettingsResu public static extern ulong CGetOPFSettingsResult_t_SetCallback(SteamAPI_GetOPFSettingsResult_t_Callback func); [DllImportAttribute("Steam_api", EntryPoint = "CGetOPFSettingsResult_t_RemoveCallback")] public static extern ulong CGetOPFSettingsResult_t_RemoveCallback(ulong handle); +public delegate void SteamAPI_SteamInventoryStartPurchaseResult_t_CallResult(SteamInventoryStartPurchaseResult_t pSteamInventoryStartPurchaseResult_t, bool bIOFailure); +[DllImportAttribute("Steam_api", EntryPoint = "CSteamInventoryStartPurchaseResult_t_SetCallResult")] +public static extern ulong CSteamInventoryStartPurchaseResult_t_SetCallResult(ulong hAPICall, SteamAPI_SteamInventoryStartPurchaseResult_t_CallResult func); +[DllImportAttribute("Steam_api", EntryPoint = "CSteamInventoryStartPurchaseResult_t_RemoveCallResult")] +public static extern ulong CSteamInventoryStartPurchaseResult_t_RemoveCallResult(ulong handle); public delegate void SteamAPI_RemoteStorageFileReadAsyncComplete_t_CallResult(RemoteStorageFileReadAsyncComplete_t pRemoteStorageFileReadAsyncComplete_t, bool bIOFailure); [DllImportAttribute("Steam_api", EntryPoint = "CRemoteStorageFileReadAsyncComplete_t_SetCallResult")] public static extern ulong CRemoteStorageFileReadAsyncComplete_t_SetCallResult(ulong hAPICall, SteamAPI_RemoteStorageFileReadAsyncComplete_t_CallResult func); @@ -1538,6 +1569,11 @@ public delegate void SteamAPI_SetUserItemVoteResult_t_CallResult(SetUserItemVote public static extern ulong CSetUserItemVoteResult_t_SetCallResult(ulong hAPICall, SteamAPI_SetUserItemVoteResult_t_CallResult func); [DllImportAttribute("Steam_api", EntryPoint = "CSetUserItemVoteResult_t_RemoveCallResult")] public static extern ulong CSetUserItemVoteResult_t_RemoveCallResult(ulong handle); +public delegate void SteamAPI_SteamInventoryRequestPricesResult_t_CallResult(SteamInventoryRequestPricesResult_t pSteamInventoryRequestPricesResult_t, bool bIOFailure); +[DllImportAttribute("Steam_api", EntryPoint = "CSteamInventoryRequestPricesResult_t_SetCallResult")] +public static extern ulong CSteamInventoryRequestPricesResult_t_SetCallResult(ulong hAPICall, SteamAPI_SteamInventoryRequestPricesResult_t_CallResult func); +[DllImportAttribute("Steam_api", EntryPoint = "CSteamInventoryRequestPricesResult_t_RemoveCallResult")] +public static extern ulong CSteamInventoryRequestPricesResult_t_RemoveCallResult(ulong handle); public delegate void SteamAPI_ComputeNewPlayerCompatibilityResult_t_CallResult(ComputeNewPlayerCompatibilityResult_t pComputeNewPlayerCompatibilityResult_t, bool bIOFailure); [DllImportAttribute("Steam_api", EntryPoint = "CComputeNewPlayerCompatibilityResult_t_SetCallResult")] public static extern ulong CComputeNewPlayerCompatibilityResult_t_SetCallResult(ulong hAPICall, SteamAPI_ComputeNewPlayerCompatibilityResult_t_CallResult func); @@ -1722,7 +1758,6 @@ namespace Valve.Steamworks public abstract void SetWarningMessageHook(IntPtr pFunction); public abstract bool BShutdownIfAllPipesClosed(); public abstract ISteamHTTP GetISteamHTTP(uint hSteamuser,uint hSteamPipe,string pchVersion); - public abstract ISteamUnifiedMessages GetISteamUnifiedMessages(uint hSteamuser,uint hSteamPipe,string pchVersion); public abstract ISteamController GetISteamController(uint hSteamUser,uint hSteamPipe,string pchVersion); public abstract ISteamUGC GetISteamUGC(uint hSteamUser,uint hSteamPipe,string pchVersion); public abstract ISteamAppList GetISteamAppList(uint hSteamUser,uint hSteamPipe,string pchVersion); @@ -1843,6 +1878,8 @@ namespace Valve.Steamworks public abstract ulong GetFollowerCount(ulong steamID); public abstract ulong IsFollowing(ulong steamID); public abstract ulong EnumerateFollowingList(uint unStartIndex); + public abstract bool IsClanPublic(ulong steamIDClan); + public abstract bool IsClanOfficialGameGroup(ulong steamIDClan); } @@ -2252,17 +2289,6 @@ namespace Valve.Steamworks } - public abstract class ISteamUnifiedMessages - { - public abstract IntPtr GetIntPtr(); - public abstract ulong SendMethod(string pchServiceMethod,IntPtr pRequestBuffer,uint unRequestBufferSize,ulong unContext); - public abstract bool GetMethodResponseInfo(ulong hHandle,ref uint punResponseSize,ref uint peResult); - public abstract bool GetMethodResponseData(ulong hHandle,IntPtr pResponseBuffer,uint unResponseBufferSize,bool bAutoRelease); - public abstract bool ReleaseMethod(ulong hHandle); - public abstract bool SendNotification(string pchServiceNotification,IntPtr pNotificationBuffer,uint unNotificationBufferSize); - } - - public abstract class ISteamController { public abstract IntPtr GetIntPtr(); @@ -2274,6 +2300,10 @@ namespace Valve.Steamworks public abstract ulong GetActionSetHandle(string pszActionSetName); public abstract void ActivateActionSet(ulong controllerHandle,ulong actionSetHandle); public abstract ulong GetCurrentActionSet(ulong controllerHandle); + public abstract void ActivateActionSetLayer(ulong controllerHandle,ulong actionSetLayerHandle); + public abstract void DeactivateActionSetLayer(ulong controllerHandle,ulong actionSetLayerHandle); + public abstract void DeactivateAllActionSetLayers(ulong controllerHandle); + public abstract int GetActiveActionSetLayers(ulong controllerHandle,ref ulong handlesOut); public abstract ulong GetDigitalActionHandle(string pszActionName); public abstract ControllerDigitalActionData_t GetDigitalActionData(ulong controllerHandle,ulong digitalActionHandle); public abstract int GetDigitalActionOrigins(ulong controllerHandle,ulong actionSetHandle,ulong digitalActionHandle,ref uint originsOut); @@ -2292,6 +2322,7 @@ namespace Valve.Steamworks public abstract bool ShowAnalogActionOrigins(ulong controllerHandle,ulong analogActionHandle,float flScale,float flXPosition,float flYPosition); public abstract string GetStringForActionOrigin(uint eOrigin); public abstract string GetGlyphForActionOrigin(uint eOrigin); + public abstract uint GetInputTypeForHandle(ulong controllerHandle); } @@ -2456,6 +2487,18 @@ namespace Valve.Steamworks public abstract bool GetItemDefinitionProperty(int iDefinition,string pchPropertyName,out string pchValueBuffer); public abstract ulong RequestEligiblePromoItemDefinitionsIDs(ulong steamID); public abstract bool GetEligiblePromoItemDefinitionIDs(ulong steamID,out int [] pItemDefIDs); + public abstract ulong StartPurchase(int [] pArrayItemDefs,uint [] punArrayQuantity); + public abstract ulong RequestPrices(); + public abstract uint GetNumItemsWithPrices(); + public abstract bool GetItemsWithPrices(out int [] pArrayItemDefs,out ulong [] pPrices,uint unArrayLength); + public abstract bool GetItemPrice(int iDefinition,ref ulong pPrice); + public abstract ulong StartUpdateProperties(); + public abstract bool RemoveProperty(ulong handle,ulong nItemID,string pchPropertyName); + public abstract bool SetProperty(ulong handle,ulong nItemID,string pchPropertyName,string pchPropertyValue); + public abstract bool SetProperty0(ulong handle,ulong nItemID,string pchPropertyName,bool bValue); + public abstract bool SetProperty1(ulong handle,ulong nItemID,string pchPropertyName,long nValue); + public abstract bool SetProperty2(ulong handle,ulong nItemID,string pchPropertyName,float flValue); + public abstract bool SubmitUpdateProperties(ulong handle,ref int pResultHandle); } @@ -2700,12 +2743,6 @@ public override ISteamHTTP GetISteamHTTP(uint hSteamuser,uint hSteamPipe,string IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamHTTP(m_pSteamClient,hSteamuser,hSteamPipe,pchVersion); return (ISteamHTTP) Marshal.PtrToStructure(result, typeof(ISteamHTTP)); } -public override ISteamUnifiedMessages GetISteamUnifiedMessages(uint hSteamuser,uint hSteamPipe,string pchVersion) -{ - CheckIfUsable(); - IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamUnifiedMessages(m_pSteamClient,hSteamuser,hSteamPipe,pchVersion); - return (ISteamUnifiedMessages) Marshal.PtrToStructure(result, typeof(ISteamUnifiedMessages)); -} public override ISteamController GetISteamController(uint hSteamUser,uint hSteamPipe,string pchVersion) { CheckIfUsable(); @@ -3393,6 +3430,18 @@ public override ulong EnumerateFollowingList(uint unStartIndex) ulong result = NativeEntrypoints.SteamAPI_ISteamFriends_EnumerateFollowingList(m_pSteamFriends,unStartIndex); return result; } +public override bool IsClanPublic(ulong steamIDClan) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamFriends_IsClanPublic(m_pSteamFriends,steamIDClan); + return result; +} +public override bool IsClanOfficialGameGroup(ulong steamIDClan) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamFriends_IsClanOfficialGameGroup(m_pSteamFriends,steamIDClan); + return result; +} } @@ -5617,58 +5666,6 @@ public override bool GetHTTPRequestWasTimedOut(uint hRequest,ref bool pbWasTimed } -public class CSteamUnifiedMessages : ISteamUnifiedMessages -{ -public CSteamUnifiedMessages(IntPtr SteamUnifiedMessages) -{ - m_pSteamUnifiedMessages = SteamUnifiedMessages; -} -IntPtr m_pSteamUnifiedMessages; - -public override IntPtr GetIntPtr() { return m_pSteamUnifiedMessages; } - -private void CheckIfUsable() -{ - if (m_pSteamUnifiedMessages == IntPtr.Zero) - { - throw new Exception("Steam Pointer not configured"); - } -} -public override ulong SendMethod(string pchServiceMethod,IntPtr pRequestBuffer,uint unRequestBufferSize,ulong unContext) -{ - CheckIfUsable(); - ulong result = NativeEntrypoints.SteamAPI_ISteamUnifiedMessages_SendMethod(m_pSteamUnifiedMessages,pchServiceMethod,pRequestBuffer,unRequestBufferSize,unContext); - return result; -} -public override bool GetMethodResponseInfo(ulong hHandle,ref uint punResponseSize,ref uint peResult) -{ - CheckIfUsable(); - punResponseSize = 0; - peResult = 0; - bool result = NativeEntrypoints.SteamAPI_ISteamUnifiedMessages_GetMethodResponseInfo(m_pSteamUnifiedMessages,hHandle,ref punResponseSize,ref peResult); - return result; -} -public override bool GetMethodResponseData(ulong hHandle,IntPtr pResponseBuffer,uint unResponseBufferSize,bool bAutoRelease) -{ - CheckIfUsable(); - bool result = NativeEntrypoints.SteamAPI_ISteamUnifiedMessages_GetMethodResponseData(m_pSteamUnifiedMessages,hHandle,pResponseBuffer,unResponseBufferSize,bAutoRelease); - return result; -} -public override bool ReleaseMethod(ulong hHandle) -{ - CheckIfUsable(); - bool result = NativeEntrypoints.SteamAPI_ISteamUnifiedMessages_ReleaseMethod(m_pSteamUnifiedMessages,hHandle); - return result; -} -public override bool SendNotification(string pchServiceNotification,IntPtr pNotificationBuffer,uint unNotificationBufferSize) -{ - CheckIfUsable(); - bool result = NativeEntrypoints.SteamAPI_ISteamUnifiedMessages_SendNotification(m_pSteamUnifiedMessages,pchServiceNotification,pNotificationBuffer,unNotificationBufferSize); - return result; -} -} - - public class CSteamController : ISteamController { public CSteamController(IntPtr SteamController) @@ -5733,6 +5730,28 @@ public override ulong GetCurrentActionSet(ulong controllerHandle) ulong result = NativeEntrypoints.SteamAPI_ISteamController_GetCurrentActionSet(m_pSteamController,controllerHandle); return result; } +public override void ActivateActionSetLayer(ulong controllerHandle,ulong actionSetLayerHandle) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamController_ActivateActionSetLayer(m_pSteamController,controllerHandle,actionSetLayerHandle); +} +public override void DeactivateActionSetLayer(ulong controllerHandle,ulong actionSetLayerHandle) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamController_DeactivateActionSetLayer(m_pSteamController,controllerHandle,actionSetLayerHandle); +} +public override void DeactivateAllActionSetLayers(ulong controllerHandle) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamController_DeactivateAllActionSetLayers(m_pSteamController,controllerHandle); +} +public override int GetActiveActionSetLayers(ulong controllerHandle,ref ulong handlesOut) +{ + CheckIfUsable(); + handlesOut = 0; + int result = NativeEntrypoints.SteamAPI_ISteamController_GetActiveActionSetLayers(m_pSteamController,controllerHandle,ref handlesOut); + return result; +} public override ulong GetDigitalActionHandle(string pszActionName) { CheckIfUsable(); @@ -5838,6 +5857,12 @@ public override string GetGlyphForActionOrigin(uint eOrigin) IntPtr result = NativeEntrypoints.SteamAPI_ISteamController_GetGlyphForActionOrigin(m_pSteamController,eOrigin); return Marshal.PtrToStringAnsi(result); } +public override uint GetInputTypeForHandle(ulong controllerHandle) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamController_GetInputTypeForHandle(m_pSteamController,controllerHandle); + return result; +} } @@ -6780,6 +6805,85 @@ public override bool GetEligiblePromoItemDefinitionIDs(ulong steamID,out int [] result = NativeEntrypoints.SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs(m_pSteamInventory,steamID,pItemDefIDs,ref punItemDefIDsArraySize); return result; } +public override ulong StartPurchase(int [] pArrayItemDefs,uint [] punArrayQuantity) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamInventory_StartPurchase(m_pSteamInventory,pArrayItemDefs,punArrayQuantity,(uint) punArrayQuantity.Length); + return result; +} +public override ulong RequestPrices() +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamInventory_RequestPrices(m_pSteamInventory); + return result; +} +public override uint GetNumItemsWithPrices() +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamInventory_GetNumItemsWithPrices(m_pSteamInventory); + return result; +} +public override bool GetItemsWithPrices(out int [] pArrayItemDefs,out ulong [] pPrices,uint unArrayLength) +{ + CheckIfUsable(); + pArrayItemDefs = 0; + pPrices = 0; + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemsWithPrices(m_pSteamInventory,pArrayItemDefs,null,unArrayLength); + pArrayItemDefs= new int[pArrayItemDefs]; + pPrices= new ulong[pPrices]; + result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemsWithPrices(m_pSteamInventory,pArrayItemDefs,pPrices,unArrayLength); + return result; +} +public override bool GetItemPrice(int iDefinition,ref ulong pPrice) +{ + CheckIfUsable(); + pPrice = 0; + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemPrice(m_pSteamInventory,iDefinition,ref pPrice); + return result; +} +public override ulong StartUpdateProperties() +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamInventory_StartUpdateProperties(m_pSteamInventory); + return result; +} +public override bool RemoveProperty(ulong handle,ulong nItemID,string pchPropertyName) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_RemoveProperty(m_pSteamInventory,handle,nItemID,pchPropertyName); + return result; +} +public override bool SetProperty(ulong handle,ulong nItemID,string pchPropertyName,string pchPropertyValue) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_SetProperty(m_pSteamInventory,handle,nItemID,pchPropertyName,pchPropertyValue); + return result; +} +public override bool SetProperty0(ulong handle,ulong nItemID,string pchPropertyName,bool bValue) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_SetProperty0(m_pSteamInventory,handle,nItemID,pchPropertyName,bValue); + return result; +} +public override bool SetProperty1(ulong handle,ulong nItemID,string pchPropertyName,long nValue) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_SetProperty1(m_pSteamInventory,handle,nItemID,pchPropertyName,nValue); + return result; +} +public override bool SetProperty2(ulong handle,ulong nItemID,string pchPropertyName,float flValue) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_SetProperty2(m_pSteamInventory,handle,nItemID,pchPropertyName,flValue); + return result; +} +public override bool SubmitUpdateProperties(ulong handle,ref int pResultHandle) +{ + CheckIfUsable(); + pResultHandle = 0; + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_SubmitUpdateProperties(m_pSteamInventory,handle,ref pResultHandle); + return result; +} } @@ -7267,6 +7371,26 @@ public class CGetOPFSettingsResult_t_Callback m_Handle = Valve.Interop.NativeEntrypoints.CGetOPFSettingsResult_t_SetCallback(func); } } +public class CSteamInventoryStartPurchaseResult_t_CallResult +{ + public CSteamInventoryStartPurchaseResult_t_CallResult() { } + ~CSteamInventoryStartPurchaseResult_t_CallResult() + { + if(m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CSteamInventoryStartPurchaseResult_t_RemoveCallResult(m_Handle); + } + } + ulong m_Handle = 0; + public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_SteamInventoryStartPurchaseResult_t_CallResult func) + { + if (m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CSteamInventoryStartPurchaseResult_t_RemoveCallResult(m_Handle); + } + m_Handle = Valve.Interop.NativeEntrypoints.CSteamInventoryStartPurchaseResult_t_SetCallResult(hAPICall, func); + } +} public class CRemoteStorageFileReadAsyncComplete_t_CallResult { public CRemoteStorageFileReadAsyncComplete_t_CallResult() { } @@ -7847,6 +7971,26 @@ public class CSetUserItemVoteResult_t_CallResult m_Handle = Valve.Interop.NativeEntrypoints.CSetUserItemVoteResult_t_SetCallResult(hAPICall, func); } } +public class CSteamInventoryRequestPricesResult_t_CallResult +{ + public CSteamInventoryRequestPricesResult_t_CallResult() { } + ~CSteamInventoryRequestPricesResult_t_CallResult() + { + if(m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CSteamInventoryRequestPricesResult_t_RemoveCallResult(m_Handle); + } + } + ulong m_Handle = 0; + public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_SteamInventoryRequestPricesResult_t_CallResult func) + { + if (m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CSteamInventoryRequestPricesResult_t_RemoveCallResult(m_Handle); + } + m_Handle = Valve.Interop.NativeEntrypoints.CSteamInventoryRequestPricesResult_t_SetCallResult(hAPICall, func); + } +} public class CComputeNewPlayerCompatibilityResult_t_CallResult { public CComputeNewPlayerCompatibilityResult_t_CallResult() { } @@ -8495,8 +8639,6 @@ internal static extern IntPtr SteamMusic(); internal static extern IntPtr SteamMusicRemote(); [DllImportAttribute("Steam_api", EntryPoint = "SteamHTTP")] internal static extern IntPtr SteamHTTP(); -[DllImportAttribute("Steam_api", EntryPoint = "SteamUnifiedMessages")] -internal static extern IntPtr SteamUnifiedMessages(); [DllImportAttribute("Steam_api", EntryPoint = "SteamController")] internal static extern IntPtr SteamController(); [DllImportAttribute("Steam_api", EntryPoint = "SteamUGC")] @@ -8638,6 +8780,8 @@ public enum EResult k_EResultTooManyPending = 108, k_EResultNoSiteLicensesFound = 109, k_EResultWGNetworkSendExceeded = 110, + k_EResultAccountNotFriends = 111, + k_EResultLimitedUserAccount = 112, } public enum EVoiceResult { @@ -8879,6 +9023,18 @@ public enum EVRHMDType k_eEVRHMDType_Oculus_DK2 = 22, k_eEVRHMDType_Oculus_Rift = 23, k_eEVRHMDType_Oculus_Unknown = 40, + k_eEVRHMDType_Acer_Unknown = 50, + k_eEVRHMDType_Acer_WindowsMR = 51, + k_eEVRHMDType_Dell_Unknown = 60, + k_eEVRHMDType_Dell_Visor = 61, + k_eEVRHMDType_Lenovo_Unknown = 70, + k_eEVRHMDType_Lenovo_Explorer = 71, + k_eEVRHMDType_HP_Unknown = 80, + k_eEVRHMDType_HP_WindowsMR = 81, + k_eEVRHMDType_Samsung_Unknown = 90, + k_eEVRHMDType_Samsung_Odyssey = 91, + k_eEVRHMDType_Unannounced_Unknown = 100, + k_eEVRHMDType_Unannounced_WindowsMR = 101, } public enum EFailureType { @@ -9253,7 +9409,9 @@ public enum EControllerSource k_EControllerSource_CenterTrackpad = 9, k_EControllerSource_RightJoystick = 10, k_EControllerSource_DPad = 11, - k_EControllerSource_Count = 12, + k_EControllerSource_Key = 12, + k_EControllerSource_Mouse = 13, + k_EControllerSource_Count = 14, } public enum EControllerSourceMode { @@ -9480,6 +9638,15 @@ public enum ESteamControllerLEDFlag k_ESteamControllerLEDFlag_SetColor = 0, k_ESteamControllerLEDFlag_RestoreUserDefault = 1, } +public enum ESteamInputType +{ + k_ESteamInputType_Unknown = 0, + k_ESteamInputType_SteamController = 1, + k_ESteamInputType_XBox360Controller = 2, + k_ESteamInputType_XBoxOneController = 3, + k_ESteamInputType_GenericXInput = 4, + k_ESteamInputType_PS4Controller = 5, +} public enum EUGCMatchingUGCType { k_EUGCMatchingUGCType_Items = 0, @@ -10432,13 +10599,6 @@ public enum EParentalFeature public uint m_cOffset; public uint m_cBytesReceived; } -[StructLayout(LayoutKind.Sequential)] public struct SteamUnifiedMessagesSendMethodResult_t -{ - public ulong m_hHandle; - public ulong m_unContext; - public EResult m_eResult; - public uint m_unResponseSize; -} [StructLayout(LayoutKind.Sequential)] public struct ControllerAnalogActionData_t { public EControllerSourceMode eMode; @@ -10772,6 +10932,11 @@ public enum EParentalFeature { public uint unBrowserHandle; } +[StructLayout(LayoutKind.Sequential)] public struct HTML_BrowserRestarted_t +{ + public uint unBrowserHandle; + public uint unOldBrowserHandle; +} [StructLayout(LayoutKind.Sequential)] public struct SteamItemDetails_t { public ulong m_itemId; @@ -10796,6 +10961,18 @@ public enum EParentalFeature [MarshalAs(UnmanagedType.I1)] public bool m_bCachedData; } +[StructLayout(LayoutKind.Sequential)] public struct SteamInventoryStartPurchaseResult_t +{ + public EResult m_result; + public ulong m_ulOrderID; + public ulong m_ulTransID; +} +[StructLayout(LayoutKind.Sequential)] public struct SteamInventoryRequestPricesResult_t +{ + public EResult m_result; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] + public string m_rgchCurrency; //char[4] +} [StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t { public EBroadcastUploadResult m_eResult; @@ -10826,7 +11003,6 @@ public enum EParentalFeature public IntPtr m_pSteamRemoteStorage; // class ISteamRemoteStorage * public IntPtr m_pSteamScreenshots; // class ISteamScreenshots * public IntPtr m_pSteamHTTP; // class ISteamHTTP * - public IntPtr m_pSteamUnifiedMessages; // class ISteamUnifiedMessages * public IntPtr m_pController; // class ISteamController * public IntPtr m_pSteamUGC; // class ISteamUGC * public IntPtr m_pSteamAppList; // class ISteamAppList * @@ -11009,6 +11185,7 @@ public const int k_iClientInventoryCallbacks = 4700; public const int k_iClientBluetoothManagerCallbacks = 4800; public const int k_iClientSharedConnectionCallbacks = 4900; public const int k_ISteamParentalSettingsCallbacks = 5000; +public const int k_iClientShaderCallbacks = 5100; public const int k_cchPersonaNameMax = 128; public const int k_cwchPersonaNameMax = 32; public const int k_cchMaxRichPresenceKeys = 20; @@ -11017,7 +11194,6 @@ public const int k_cchMaxRichPresenceValueLength = 256; public const int k_cchStatNameMax = 128; public const int k_cchLeaderboardNameMax = 128; public const int k_cLeaderboardDetailsMax = 64; -public const ulong k_InvalidUnifiedMessageHandle = 0; public const ulong k_SteamItemInstanceIDInvalid = 0xffffffffffffffff; public const int k_SteamInventoryResultInvalid = -1; public static ISteamClient SteamClient() @@ -11110,11 +11286,6 @@ public static ISteamHTTP SteamHTTP() return new CSteamHTTP(SteamAPIInterop.SteamHTTP()); } -public static ISteamUnifiedMessages SteamUnifiedMessages() -{ -return new CSteamUnifiedMessages(SteamAPIInterop.SteamUnifiedMessages()); -} - public static ISteamController SteamController() { return new CSteamController(SteamAPIInterop.SteamController()); diff --git a/public/steam/steamclientpublic.h b/public/steam/steamclientpublic.h index 8852e46..7b89ba2 100644 --- a/public/steam/steamclientpublic.h +++ b/public/steam/steamclientpublic.h @@ -135,6 +135,8 @@ enum EResult k_EResultTooManyPending = 108, // There are too many of this thing pending already k_EResultNoSiteLicensesFound = 109, // No site licenses found k_EResultWGNetworkSendExceeded = 110, // the WG couldn't send a response because we exceeded max network send size + k_EResultAccountNotFriends = 111, // the user is not mutually friends + k_EResultLimitedUserAccount = 112, // the user is limited }; // Error codes for use with the voice functions @@ -277,6 +279,7 @@ enum EAppOwnershipFlags //----------------------------------------------------------------------------- // Purpose: designed as flags to allow filters masks +// NOTE: If you add to this, please update PackageAppType (SteamConfig) as well as populatePackageAppType //----------------------------------------------------------------------------- enum EAppType { @@ -508,6 +511,25 @@ enum EVRHMDType k_eEVRHMDType_Oculus_Rift = 23, // Oculus rift k_eEVRHMDType_Oculus_Unknown = 40, // // Oculus unknown HMD + + k_eEVRHMDType_Acer_Unknown = 50, // Acer unknown HMD + k_eEVRHMDType_Acer_WindowsMR = 51, // Acer QHMD Windows MR headset + + k_eEVRHMDType_Dell_Unknown = 60, // Dell unknown HMD + k_eEVRHMDType_Dell_Visor = 61, // Dell Visor Windows MR headset + + k_eEVRHMDType_Lenovo_Unknown = 70, // Lenovo unknown HMD + k_eEVRHMDType_Lenovo_Explorer = 71, // Lenovo Explorer Windows MR headset + + k_eEVRHMDType_HP_Unknown = 80, // HP unknown HMD + k_eEVRHMDType_HP_WindowsMR = 81, // HP Windows MR headset + + k_eEVRHMDType_Samsung_Unknown = 90, // Samsung unknown HMD + k_eEVRHMDType_Samsung_Odyssey = 91, // Samsung Odyssey Windows MR headset + + k_eEVRHMDType_Unannounced_Unknown = 100, // Unannounced unknown HMD + k_eEVRHMDType_Unannounced_WindowsMR = 101, // Unannounced Windows MR headset + }; @@ -520,6 +542,15 @@ static inline bool BIsOculusHMD( EVRHMDType eType ) } +//----------------------------------------------------------------------------- +// Purpose: true if this is from a Windows MR HMD +//----------------------------------------------------------------------------- +static inline bool BIsWindowsMRHeadset( EVRHMDType eType ) +{ + return eType >= k_eEVRHMDType_Acer_WindowsMR && eType <= k_eEVRHMDType_Unannounced_WindowsMR; +} + + //----------------------------------------------------------------------------- // Purpose: true if this is from an Vive HMD //----------------------------------------------------------------------------- diff --git a/public/steam/steamtypes.h b/public/steam/steamtypes.h index 5ead9be..45c195e 100644 --- a/public/steam/steamtypes.h +++ b/public/steam/steamtypes.h @@ -176,6 +176,9 @@ const PartnerId_t k_uPartnerIdInvalid = 0; typedef uint64 ManifestId_t; const ManifestId_t k_uManifestIdInvalid = 0; +// ID for cafe sites +typedef uint64 SiteId_t; +const SiteId_t k_ulSiteIdInvalid = 0; #endif // STEAMTYPES_H diff --git a/redistributable_bin/linux32/libsteam_api.so b/redistributable_bin/linux32/libsteam_api.so index c37f597..4ee02fe 100644 Binary files a/redistributable_bin/linux32/libsteam_api.so and b/redistributable_bin/linux32/libsteam_api.so differ diff --git a/redistributable_bin/linux64/libsteam_api.so b/redistributable_bin/linux64/libsteam_api.so index 10b6385..edcda83 100644 Binary files a/redistributable_bin/linux64/libsteam_api.so and b/redistributable_bin/linux64/libsteam_api.so differ diff --git a/redistributable_bin/osx32/libsteam_api.dylib b/redistributable_bin/osx32/libsteam_api.dylib index 8c40f23..6e2309a 100644 Binary files a/redistributable_bin/osx32/libsteam_api.dylib and b/redistributable_bin/osx32/libsteam_api.dylib differ diff --git a/redistributable_bin/steam_api.dll b/redistributable_bin/steam_api.dll index 407934b..97158ab 100644 Binary files a/redistributable_bin/steam_api.dll and b/redistributable_bin/steam_api.dll differ diff --git a/redistributable_bin/steam_api.lib b/redistributable_bin/steam_api.lib index f568c52..e4ee851 100644 Binary files a/redistributable_bin/steam_api.lib and b/redistributable_bin/steam_api.lib differ diff --git a/redistributable_bin/win64/steam_api64.dll b/redistributable_bin/win64/steam_api64.dll index 4839b84..0013288 100644 Binary files a/redistributable_bin/win64/steam_api64.dll and b/redistributable_bin/win64/steam_api64.dll differ diff --git a/redistributable_bin/win64/steam_api64.lib b/redistributable_bin/win64/steam_api64.lib index 11ebe0d..f4e8baf 100644 Binary files a/redistributable_bin/win64/steam_api64.lib and b/redistributable_bin/win64/steam_api64.lib differ diff --git a/steamworksexample/Friends.cpp b/steamworksexample/Friends.cpp index 210233a..b79940a 100644 --- a/steamworksexample/Friends.cpp +++ b/steamworksexample/Friends.cpp @@ -56,6 +56,8 @@ public: continue; const char *pszFriendsGroupName = SteamFriends()->GetFriendsGroupName( friendsGroupID ); + if ( pszFriendsGroupName == NULL ) + pszFriendsGroupName = ""; AddMenuItem( CFriendsListMenu::MenuItem_t( "", k_menuItemEmpty ) ); AddMenuItem( CFriendsListMenu::MenuItem_t( pszFriendsGroupName, k_menuItemEmpty ) ); diff --git a/steamworksexample/Inventory.cpp b/steamworksexample/Inventory.cpp index 8b46f60..2556e76 100644 --- a/steamworksexample/Inventory.cpp +++ b/steamworksexample/Inventory.cpp @@ -269,6 +269,20 @@ bool CSpaceWarLocalInventory::HasInstanceOf( SteamItemDef_t nDefinition ) const return false; } +uint32 CSpaceWarLocalInventory::GetNumOf( SteamItemDef_t nDefinition ) const +{ + uint32 unQuantity = 0; + std::list::const_iterator iter; + for ( iter = m_listPlayerItems.begin(); iter != m_listPlayerItems.end(); ++iter ) + { + if ( ( *iter )->GetDefinition() == nDefinition ) + { + unQuantity += (*iter)->GetQuantity(); + } + } + return unQuantity; +} + const CSpaceWarItem * CSpaceWarLocalInventory::GetInstanceOf( SteamItemDef_t nDefinition ) const { std::list::const_iterator iter; diff --git a/steamworksexample/Inventory.h b/steamworksexample/Inventory.h index a417d39..3578a64 100644 --- a/steamworksexample/Inventory.h +++ b/steamworksexample/Inventory.h @@ -41,7 +41,8 @@ public: const std::list& GetItemList() const { return m_listPlayerItems; } const CSpaceWarItem * GetItem( SteamItemInstanceID_t nItemId ) const; const CSpaceWarItem * GetInstanceOf( SteamItemDef_t nDefinition ) const; - bool HasInstanceOf( SteamItemDef_t nItemId ) const; + bool HasInstanceOf( SteamItemDef_t nDefinition ) const; + uint32 GetNumOf( SteamItemDef_t nDefinition ) const; bool IsWaitingForDropResults() const { return m_hPlaytimeRequestResult != k_SteamInventoryResultInvalid; } const CSpaceWarItem * GetLastDroppedItem() const { return GetItem( m_LastDropInstanceID ); } diff --git a/steamworksexample/gameengineosx.mm b/steamworksexample/gameengineosx.mm index 7b1a8b0..a70ef48 100644 --- a/steamworksexample/gameengineosx.mm +++ b/steamworksexample/gameengineosx.mm @@ -333,7 +333,6 @@ bool CGameEngineGL::BInitializeGraphics() [[m_view openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval]; [m_window setContentView:m_view]; - [m_view release]; [m_window makeKeyAndOrderFront:nil]; // [m_view setPostsFrameChangedNotifications:YES]; diff --git a/steamworksexample/htmlsurface.cpp b/steamworksexample/htmlsurface.cpp index a74cafd..459afe6 100644 --- a/steamworksexample/htmlsurface.cpp +++ b/steamworksexample/htmlsurface.cpp @@ -141,6 +141,21 @@ void CHTMLSurface::OnNeedsPaint( HTML_NeedsPaint_t *pParam ) } +//----------------------------------------------------------------------------- +// Purpose: the underlying browser object restarted, update our handle if needed +//----------------------------------------------------------------------------- +void CHTMLSurface::OnBrowserRestarted( HTML_BrowserRestarted_t *pParam ) +{ + if ( pParam->unOldBrowserHandle == m_unBrowserHandle ) + { + HTML_BrowserReady_t ready; + ready.unBrowserHandle = pParam->unBrowserHandle;; + OnBrowserReady( &ready, false ); + } +} + + + //----------------------------------------------------------------------------- // Purpose: the page requested that a URL be loaded, should we allow it? //----------------------------------------------------------------------------- diff --git a/steamworksexample/htmlsurface.h b/steamworksexample/htmlsurface.h index 7984a3d..851efea 100644 --- a/steamworksexample/htmlsurface.h +++ b/steamworksexample/htmlsurface.h @@ -37,6 +37,7 @@ private: STEAM_CALLBACK( CHTMLSurface, OnNeedsPaint, HTML_NeedsPaint_t ); STEAM_CALLBACK( CHTMLSurface, OnCloseBrowser, HTML_CloseBrowser_t ); STEAM_CALLBACK( CHTMLSurface, OnFinishedRequest, HTML_FinishedRequest_t ); + STEAM_CALLBACK( CHTMLSurface, OnBrowserRestarted, HTML_BrowserRestarted_t ); void OnBrowserReady( HTML_BrowserReady_t *pBrowserReady, bool bIOFailure ); diff --git a/tools/drm/drmtool.exe b/tools/drm/drmtool.exe index 2b71f60..d917a2b 100644 Binary files a/tools/drm/drmtool.exe and b/tools/drm/drmtool.exe differ diff --git a/tools/drm/drmtoolp.exe b/tools/drm/drmtoolp.exe index 1842508..0df13c6 100644 Binary files a/tools/drm/drmtoolp.exe and b/tools/drm/drmtoolp.exe differ diff --git a/tools/drm/ubuntu12_32/drmtoolp b/tools/drm/ubuntu12_32/drmtoolp index 36638a0..ba2f97f 100644 Binary files a/tools/drm/ubuntu12_32/drmtoolp and b/tools/drm/ubuntu12_32/drmtoolp differ diff --git a/tools/drm/ubuntu12_32/steamdrmp.so b/tools/drm/ubuntu12_32/steamdrmp.so index 6eea4b0..49ff861 100644 Binary files a/tools/drm/ubuntu12_32/steamdrmp.so and b/tools/drm/ubuntu12_32/steamdrmp.so differ diff --git a/tools/drm/ubuntu12_64/drmtoolp b/tools/drm/ubuntu12_64/drmtoolp index 7cfe3ec..42d3075 100644 Binary files a/tools/drm/ubuntu12_64/drmtoolp and b/tools/drm/ubuntu12_64/drmtoolp differ diff --git a/tools/drm/ubuntu12_64/steamdrmp.so b/tools/drm/ubuntu12_64/steamdrmp.so index f49a931..dcdbcb8 100644 Binary files a/tools/drm/ubuntu12_64/steamdrmp.so and b/tools/drm/ubuntu12_64/steamdrmp.so differ