diff --git a/src/client/steam/interfaces/client.cpp b/src/client/steam/interfaces/client.cpp index 1a76338e..9ea1419a 100644 --- a/src/client/steam/interfaces/client.cpp +++ b/src/client/steam/interfaces/client.cpp @@ -225,7 +225,8 @@ namespace steam void* client::GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) { - return get_dummy(); + static ugc u; + return &u; } void* client::GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion) @@ -267,7 +268,7 @@ namespace steam void* client::GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) { - return get_dummy(); // + return get_dummy(); } void* client::GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char* pchVersion) diff --git a/src/client/steam/interfaces/ugc.cpp b/src/client/steam/interfaces/ugc.cpp new file mode 100644 index 00000000..bc72abbd --- /dev/null +++ b/src/client/steam/interfaces/ugc.cpp @@ -0,0 +1,349 @@ +#include +#include "../steam.hpp" + + +namespace steam +{ + uint64_t ugc::CreateQueryUserUGCRequest(uint_least32_t unAccountID, uint32_t eListType, + uint32_t eMatchingUGCType, + uint32_t eSortOrder, uint32_t nCreatorAppID, + uint32_t nConsumerAppID, uint32_t unPage) + { + return 0; + } + + uint64_t ugc::CreateQueryAllUGCRequest(uint32_t eQueryType, + uint32_t eMatchingeMatchingUGCTypeFileType, + uint32_t nCreatorAppID, uint32_t nConsumerAppID, + uint32_t unPage) + { + return 0; + } + + uint64_t ugc::CreateQueryUGCDetailsRequest(uint64_t* pvecPublishedFileID, + uint32_t unNumPublishedFileIDs) + { + return 0; + } + + uint64_t ugc::SendQueryUGCRequest(uint64_t handle) + { + return 0; + } + + bool ugc::GetQueryUGCResult(uint64_t handle, uint32_t index, void* pDetails) + { + return false; + } + + bool ugc::GetQueryUGCPreviewURL(uint64_t handle, uint32_t index, char* pchURL, uint32_t cchURLSize) + { + return false; + } + + bool ugc::GetQueryUGCMetadata(uint64_t handle, uint32_t index, char* pchMetadata, + uint32_t cchMetadatasize) + { + return false; + } + + bool ugc::GetQueryUGCChildren(uint64_t handle, uint32_t index, uint64_t* pvecPublishedFileID, + uint32_t cMaxEntries) + { + return false; + } + + bool ugc::GetQueryUGCStatistic(uint64_t handle, uint32_t index, uint32_t eStatType, + uint32_t* pStatValue) + { + return false; + } + + uint32_t ugc::GetQueryUGCNumAdditionalPreviews(uint64_t handle, uint32_t index) + { + return 0; + } + + bool ugc::GetQueryUGCAdditionalPreview(uint64_t handle, uint32_t index, uint32_t previewIndex, + char* pchURLOrVideoID, uint32_t cchURLSize, char* pchOriginalFileName, + uint32_t cchOriginalFileNameSize, void* pPreviewType) + { + return false; + } + + uint32_t ugc::GetQueryUGCNumKeyValueTags(uint64_t handle, uint32_t index) + { + return 0; + } + + bool ugc::GetQueryUGCKeyValueTag(uint64_t handle, uint32_t index, uint32_t keyValueTagIndex, + char* pchKey, uint32_t cchKeySize, char* pchValue, uint32_t cchValueSize) + { + return false; + } + + bool ugc::ReleaseQueryUGCRequest(uint64_t handle) + { + return false; + } + + bool ugc::AddRequiredTag(uint64_t handle, const char* pTagName) + { + return false; + } + + bool ugc::AddExcludedTag(uint64_t handle, const char* pTagName) + { + return false; + } + + bool ugc::SetReturnKeyValueTags(uint64_t handle, bool bReturnKeyValueTags) + { + return false; + } + + bool ugc::SetReturnLongDescription(uint64_t handle, bool bReturnLongDescription) + { + return false; + } + + bool ugc::SetReturnMetadata(uint64_t handle, bool bReturnMetadata) + { + return false; + } + + bool ugc::SetReturnChildren(uint64_t handle, bool bReturnChildren) + { + return false; + } + + bool ugc::SetReturnAdditionalPreviews(uint64_t handle, bool bReturnAdditionalPreviews) + { + return false; + } + + bool ugc::SetReturnTotalOnly(uint64_t handle, bool bReturnTotalOnly) + { + return false; + } + + bool ugc::SetLanguage(uint64_t handle, const char* pchLanguage) + { + return false; + } + + bool ugc::SetAllowCachedResponse(uint64_t handle, uint32_t unMaxAgeSeconds) + { + return false; + } + + bool ugc::SetCloudFileNameFilter(uint64_t handle, const char* pMatchCloudFileName) + { + return false; + } + + bool ugc::SetMatchAnyTag(uint64_t handle, bool bMatchAnyTag) + { + return false; + } + + bool ugc::SetSearchText(uint64_t handle, const char* pSearchText) + { + return false; + } + + bool ugc::SetRankedByTrendDays(uint64_t handle, uint32_t unDays) + { + return false; + } + + bool ugc::AddRequiredKeyValueTag(uint64_t handle, const char* pKey, const char* pValue) + { + return false; + } + + uint64_t ugc::RequestUGCDetails(uint64_t nPublishedFileID, uint32_t unMaxAgeSeconds) + { + return 0; + } + + uint64_t ugc::CreateItem(uint32_t nConsumerAppId, uint32_t eFileType) + { + return 0; + } + + uint64_t ugc::StartItemUpdate(uint32_t nConsumerAppId, uint64_t nPublishedFileID) + { + return 0; + } + + bool ugc::SetItemTitle(uint64_t handle, const char* pchTitle) + { + return false; + } + + bool ugc::SetItemDescription(uint64_t handle, const char* pchDescription) + { + return false; + } + + bool ugc::SetItemUpdateLanguage(uint64_t handle, const char* pchUpdateLanguage) + { + return false; + } + + bool ugc::SetItemMetadata(uint64_t handle, const char* pchMetadata) + { + return false; + } + + bool ugc::SetItemVisibility(uint64_t handle, uint32_t eVisibility) + { + return false; + } + + bool ugc::SetItemTags(uint64_t updateHandle, const void* pTags) + { + return false; + } + + bool ugc::SetItemContent(uint64_t handle, const char* pszContentFolder) + { + return false; + } + + bool ugc::SetItemPreview(uint64_t handle, const char* pszPreviewFile) + { + return false; + } + + bool ugc::RemoveItemKeyValueTags(uint64_t handle, const char* pchKey) + { + return false; + } + + bool ugc::AddItemKeyValueTag(uint64_t handle, const char* pchKey, const char* pchValue) + { + return false; + } + + bool ugc::AddItemPreviewFile(uint64_t handle, const char* pszPreviewFile, uint32_t type) + { + return false; + } + + bool ugc::AddItemPreviewVideo(uint64_t handle, const char* pszVideoID) + { + return false; + } + + bool ugc::UpdateItemPreviewFile(uint64_t handle, uint32_t index, const char* pszPreviewFile) + { + return false; + } + + bool ugc::UpdateItemPreviewVideo(uint64_t handle, uint32_t index, const char* pszVideoID) + { + return false; + } + + bool ugc::RemoveItemPreview(uint64_t handle, uint32_t index) + { + return false; + } + + + uint64_t ugc::SubmitItemUpdate(uint64_t handle, const char* pchChangeNote) + { + return 0; + } + + uint32_t ugc::GetItemUpdateProgress(uint64_t handle, uint64_t* punBytesProcessed, + uint64_t* punBytesTotal) + { + return 0; + } + + uint64_t ugc::SetUserItemVote(uint64_t nPublishedFileID, bool bVoteUp) + { + return 0; + } + + uint64_t ugc::GetUserItemVote(uint64_t nPublishedFileID) + { + return 0; + } + + uint64_t ugc::AddItemToFavorites(uint32_t nAppId, uint64_t nPublishedFileID) + { + return 0; + } + + uint64_t ugc::RemoveItemFromFavorites(uint32_t nAppId, uint64_t nPublishedFileID) + { + return 0; + } + + uint64_t ugc::SubscribeItem(uint64_t nPublishedFileID) + { + return 0; + } + + uint64_t ugc::UnsubscribeItem(uint64_t nPublishedFileID) + { + return 0; + } + + uint32_t ugc::GetSubscribedItems(uint64_t* pvecPublishedFileID, uint32_t cMaxEntries) + { + return 0; + } + + uint32_t ugc::GetItemState(uint64_t nPublishedFileID) + { + return 0; + } + + bool ugc::GetItemInstallInfo(uint64_t nPublishedFileID, uint64_t* punSizeOnDisk, char* pchFolder, + uint32_t cchFolderSize, uint32_t* punTimeStamp) + { + return false; + } + + bool ugc::GetItemDownloadInfo(uint64_t nPublishedFileID, uint64_t* punBytesDownloaded, + uint64_t* punBytesTotal) + { + return false; + } + + bool ugc::DownloadItem(uint64_t nPublishedFileID, bool bHighPriority) + { + return false; + } + + bool ugc::BInitWorkshopForGameServer(uint64_t unWorkshopDepotID, const char* pszFolder) + { + return false; + } + + void ugc::SuspendDownloads(bool bSuspend) + { + } + + uint64_t ugc::StartPlaytimeTracking(uint64_t* pvecPublishedFileID, + uint32_t unNumPublishedFileIDs) + { + return 0; + } + + uint64_t ugc::StopPlaytimeTracking(uint64_t* pvecPublishedFileID, + uint32_t unNumPublishedFileIDs) + { + return 0; + } + + uint64_t ugc::StopPlaytimeTrackingForAllItems() + { + return 0; + } +} diff --git a/src/client/steam/interfaces/ugc.hpp b/src/client/steam/interfaces/ugc.hpp new file mode 100644 index 00000000..478c5714 --- /dev/null +++ b/src/client/steam/interfaces/ugc.hpp @@ -0,0 +1,115 @@ +#pragma once + +namespace steam +{ + class ugc + { + public: + ~ugc() = default; + + virtual uint64_t CreateQueryUserUGCRequest(uint_least32_t unAccountID, uint32_t eListType, + uint32_t eMatchingUGCType, + uint32_t eSortOrder, uint32_t nCreatorAppID, + uint32_t nConsumerAppID, uint32_t unPage); + virtual uint64_t CreateQueryAllUGCRequest(uint32_t eQueryType, + uint32_t eMatchingeMatchingUGCTypeFileType, + uint32_t nCreatorAppID, uint32_t nConsumerAppID, + uint32_t unPage); + + virtual uint64_t CreateQueryUGCDetailsRequest(uint64_t* pvecPublishedFileID, + uint32_t unNumPublishedFileIDs); + virtual uint64_t SendQueryUGCRequest(uint64_t handle); + + virtual bool GetQueryUGCResult(uint64_t handle, uint32_t index, void* pDetails); + + virtual bool GetQueryUGCPreviewURL(uint64_t handle, uint32_t index, char* pchURL, uint32_t cchURLSize); + virtual bool GetQueryUGCMetadata(uint64_t handle, uint32_t index, char* pchMetadata, + uint32_t cchMetadatasize); + virtual bool GetQueryUGCChildren(uint64_t handle, uint32_t index, uint64_t* pvecPublishedFileID, + uint32_t cMaxEntries); + virtual bool GetQueryUGCStatistic(uint64_t handle, uint32_t index, uint32_t eStatType, + uint32_t* pStatValue); + + virtual uint32_t GetQueryUGCNumAdditionalPreviews(uint64_t handle, uint32_t index); + virtual bool GetQueryUGCAdditionalPreview(uint64_t handle, uint32_t index, uint32_t previewIndex, + char* pchURLOrVideoID, uint32_t cchURLSize, char* pchOriginalFileName, + uint32_t cchOriginalFileNameSize, void* pPreviewType); + virtual uint32_t GetQueryUGCNumKeyValueTags(uint64_t handle, uint32_t index); + virtual bool GetQueryUGCKeyValueTag(uint64_t handle, uint32_t index, uint32_t keyValueTagIndex, + char* pchKey, uint32_t cchKeySize, char* pchValue, uint32_t cchValueSize); + + virtual bool ReleaseQueryUGCRequest(uint64_t handle); + + virtual bool AddRequiredTag(uint64_t handle, const char* pTagName); + virtual bool AddExcludedTag(uint64_t handle, const char* pTagName); + virtual bool SetReturnKeyValueTags(uint64_t handle, bool bReturnKeyValueTags); + virtual bool SetReturnLongDescription(uint64_t handle, bool bReturnLongDescription); + virtual bool SetReturnMetadata(uint64_t handle, bool bReturnMetadata); + virtual bool SetReturnChildren(uint64_t handle, bool bReturnChildren); + virtual bool SetReturnAdditionalPreviews(uint64_t handle, bool bReturnAdditionalPreviews); + virtual bool SetReturnTotalOnly(uint64_t handle, bool bReturnTotalOnly); + virtual bool SetLanguage(uint64_t handle, const char* pchLanguage); + virtual bool SetAllowCachedResponse(uint64_t handle, uint32_t unMaxAgeSeconds); + + virtual bool SetCloudFileNameFilter(uint64_t handle, const char* pMatchCloudFileName); + + virtual bool SetMatchAnyTag(uint64_t handle, bool bMatchAnyTag); + virtual bool SetSearchText(uint64_t handle, const char* pSearchText); + virtual bool SetRankedByTrendDays(uint64_t handle, uint32_t unDays); + + virtual bool AddRequiredKeyValueTag(uint64_t handle, const char* pKey, const char* pValue); + + virtual uint64_t RequestUGCDetails(uint64_t nPublishedFileID, uint32_t unMaxAgeSeconds); + + virtual uint64_t CreateItem(uint32_t nConsumerAppId, uint32_t eFileType); + + virtual uint64_t StartItemUpdate(uint32_t nConsumerAppId, uint64_t nPublishedFileID); + + virtual bool SetItemTitle(uint64_t handle, const char* pchTitle); + virtual bool SetItemDescription(uint64_t handle, const char* pchDescription); + virtual bool SetItemUpdateLanguage(uint64_t handle, const char* pchUpdateLanguage); + virtual bool SetItemMetadata(uint64_t handle, const char* pchMetadata); + virtual bool SetItemVisibility(uint64_t handle, uint32_t eVisibility); + virtual bool SetItemTags(uint64_t updateHandle, const void* pTags); + virtual bool SetItemContent(uint64_t handle, const char* pszContentFolder); + virtual bool SetItemPreview(uint64_t handle, const char* pszPreviewFile); + virtual bool RemoveItemKeyValueTags(uint64_t handle, const char* pchKey); + virtual bool AddItemKeyValueTag(uint64_t handle, const char* pchKey, const char* pchValue); + + virtual bool AddItemPreviewFile(uint64_t handle, const char* pszPreviewFile, uint32_t type); + virtual bool AddItemPreviewVideo(uint64_t handle, const char* pszVideoID); + virtual bool UpdateItemPreviewFile(uint64_t handle, uint32_t index, const char* pszPreviewFile); + virtual bool UpdateItemPreviewVideo(uint64_t handle, uint32_t index, const char* pszVideoID); + virtual bool RemoveItemPreview(uint64_t handle, uint32_t index); + + + virtual uint64_t SubmitItemUpdate(uint64_t handle, const char* pchChangeNote); + virtual uint32_t GetItemUpdateProgress(uint64_t handle, uint64_t* punBytesProcessed, + uint64_t* punBytesTotal); + + virtual uint64_t SetUserItemVote(uint64_t nPublishedFileID, bool bVoteUp); + virtual uint64_t GetUserItemVote(uint64_t nPublishedFileID); + + virtual uint64_t AddItemToFavorites(uint32_t nAppId, uint64_t nPublishedFileID); + virtual uint64_t RemoveItemFromFavorites(uint32_t nAppId, uint64_t nPublishedFileID); + + virtual uint64_t SubscribeItem(uint64_t nPublishedFileID); + virtual uint64_t UnsubscribeItem(uint64_t nPublishedFileID); + virtual uint32_t GetSubscribedItems(uint64_t* pvecPublishedFileID, uint32_t cMaxEntries); + + virtual uint32_t GetItemState(uint64_t nPublishedFileID); + virtual bool GetItemInstallInfo(uint64_t nPublishedFileID, uint64_t* punSizeOnDisk, char* pchFolder, + uint32_t cchFolderSize, uint32_t* punTimeStamp); + virtual bool GetItemDownloadInfo(uint64_t nPublishedFileID, uint64_t* punBytesDownloaded, + uint64_t* punBytesTotal); + virtual bool DownloadItem(uint64_t nPublishedFileID, bool bHighPriority); + virtual bool BInitWorkshopForGameServer(uint64_t unWorkshopDepotID, const char* pszFolder); + virtual void SuspendDownloads(bool bSuspend); + + virtual uint64_t StartPlaytimeTracking(uint64_t* pvecPublishedFileID, + uint32_t unNumPublishedFileIDs); + virtual uint64_t StopPlaytimeTracking(uint64_t* pvecPublishedFileID, + uint32_t unNumPublishedFileIDs); + virtual uint64_t StopPlaytimeTrackingForAllItems(); + }; +} diff --git a/src/client/steam/steam.hpp b/src/client/steam/steam.hpp index 5999b2d1..8b873820 100644 --- a/src/client/steam/steam.hpp +++ b/src/client/steam/steam.hpp @@ -48,6 +48,7 @@ typedef union #include "interfaces/unified_messages.hpp" #include "interfaces/controller.hpp" #include "interfaces/client.hpp" +#include "interfaces/ugc.hpp" namespace steam {