summaryrefslogtreecommitdiff
path: root/Assembly_Firstpass/Steamworks/SteamUGC.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assembly_Firstpass/Steamworks/SteamUGC.cs')
-rw-r--r--Assembly_Firstpass/Steamworks/SteamUGC.cs562
1 files changed, 562 insertions, 0 deletions
diff --git a/Assembly_Firstpass/Steamworks/SteamUGC.cs b/Assembly_Firstpass/Steamworks/SteamUGC.cs
new file mode 100644
index 0000000..ad858a6
--- /dev/null
+++ b/Assembly_Firstpass/Steamworks/SteamUGC.cs
@@ -0,0 +1,562 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace Steamworks;
+
+public static class SteamUGC
+{
+ public static UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryUserUGCRequest(CSteamAPIContext.GetSteamUGC(), unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage);
+ }
+
+ public static UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryAllUGCRequestPage(CSteamAPIContext.GetSteamUGC(), eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage);
+ }
+
+ public static UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, string pchCursor = null)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchCursor2 = new InteropHelp.UTF8StringHandle(pchCursor);
+ return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryAllUGCRequestCursor(CSteamAPIContext.GetSteamUGC(), eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor2);
+ }
+
+ public static UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryUGCDetailsRequest(CSteamAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs);
+ }
+
+ public static SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_SendQueryUGCRequest(CSteamAPIContext.GetSteamUGC(), handle);
+ }
+
+ public static bool GetQueryUGCResult(UGCQueryHandle_t handle, uint index, out SteamUGCDetails_t pDetails)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetQueryUGCResult(CSteamAPIContext.GetSteamUGC(), handle, index, out pDetails);
+ }
+
+ public static uint GetQueryUGCNumTags(UGCQueryHandle_t handle, uint index)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetQueryUGCNumTags(CSteamAPIContext.GetSteamUGC(), handle, index);
+ }
+
+ public static bool GetQueryUGCTag(UGCQueryHandle_t handle, uint index, uint indexTag, out string pchValue, uint cchValueSize)
+ {
+ InteropHelp.TestIfAvailableClient();
+ IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize);
+ bool flag = NativeMethods.ISteamUGC_GetQueryUGCTag(CSteamAPIContext.GetSteamUGC(), handle, index, indexTag, intPtr, cchValueSize);
+ pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
+ Marshal.FreeHGlobal(intPtr);
+ return flag;
+ }
+
+ public static bool GetQueryUGCTagDisplayName(UGCQueryHandle_t handle, uint index, uint indexTag, out string pchValue, uint cchValueSize)
+ {
+ InteropHelp.TestIfAvailableClient();
+ IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize);
+ bool flag = NativeMethods.ISteamUGC_GetQueryUGCTagDisplayName(CSteamAPIContext.GetSteamUGC(), handle, index, indexTag, intPtr, cchValueSize);
+ pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
+ Marshal.FreeHGlobal(intPtr);
+ return flag;
+ }
+
+ public static bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint index, out string pchURL, uint cchURLSize)
+ {
+ InteropHelp.TestIfAvailableClient();
+ IntPtr intPtr = Marshal.AllocHGlobal((int)cchURLSize);
+ bool flag = NativeMethods.ISteamUGC_GetQueryUGCPreviewURL(CSteamAPIContext.GetSteamUGC(), handle, index, intPtr, cchURLSize);
+ pchURL = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
+ Marshal.FreeHGlobal(intPtr);
+ return flag;
+ }
+
+ public static bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint index, out string pchMetadata, uint cchMetadatasize)
+ {
+ InteropHelp.TestIfAvailableClient();
+ IntPtr intPtr = Marshal.AllocHGlobal((int)cchMetadatasize);
+ bool flag = NativeMethods.ISteamUGC_GetQueryUGCMetadata(CSteamAPIContext.GetSteamUGC(), handle, index, intPtr, cchMetadatasize);
+ pchMetadata = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
+ Marshal.FreeHGlobal(intPtr);
+ return flag;
+ }
+
+ public static bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint index, PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetQueryUGCChildren(CSteamAPIContext.GetSteamUGC(), handle, index, pvecPublishedFileID, cMaxEntries);
+ }
+
+ public static bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint index, EItemStatistic eStatType, out ulong pStatValue)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetQueryUGCStatistic(CSteamAPIContext.GetSteamUGC(), handle, index, eStatType, out pStatValue);
+ }
+
+ public static uint GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint index)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetQueryUGCNumAdditionalPreviews(CSteamAPIContext.GetSteamUGC(), handle, index);
+ }
+
+ public static bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint index, uint previewIndex, out string pchURLOrVideoID, uint cchURLSize, out string pchOriginalFileName, uint cchOriginalFileNameSize, out EItemPreviewType pPreviewType)
+ {
+ InteropHelp.TestIfAvailableClient();
+ IntPtr intPtr = Marshal.AllocHGlobal((int)cchURLSize);
+ IntPtr intPtr2 = Marshal.AllocHGlobal((int)cchOriginalFileNameSize);
+ bool flag = NativeMethods.ISteamUGC_GetQueryUGCAdditionalPreview(CSteamAPIContext.GetSteamUGC(), handle, index, previewIndex, intPtr, cchURLSize, intPtr2, cchOriginalFileNameSize, out pPreviewType);
+ pchURLOrVideoID = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
+ Marshal.FreeHGlobal(intPtr);
+ pchOriginalFileName = (flag ? InteropHelp.PtrToStringUTF8(intPtr2) : null);
+ Marshal.FreeHGlobal(intPtr2);
+ return flag;
+ }
+
+ public static uint GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint index)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetQueryUGCNumKeyValueTags(CSteamAPIContext.GetSteamUGC(), handle, index);
+ }
+
+ public static bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, out string pchKey, uint cchKeySize, out string pchValue, uint cchValueSize)
+ {
+ InteropHelp.TestIfAvailableClient();
+ IntPtr intPtr = Marshal.AllocHGlobal((int)cchKeySize);
+ IntPtr intPtr2 = Marshal.AllocHGlobal((int)cchValueSize);
+ bool flag = NativeMethods.ISteamUGC_GetQueryUGCKeyValueTag(CSteamAPIContext.GetSteamUGC(), handle, index, keyValueTagIndex, intPtr, cchKeySize, intPtr2, cchValueSize);
+ pchKey = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
+ Marshal.FreeHGlobal(intPtr);
+ pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr2) : null);
+ Marshal.FreeHGlobal(intPtr2);
+ return flag;
+ }
+
+ public static bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint index, string pchKey, out string pchValue, uint cchValueSize)
+ {
+ InteropHelp.TestIfAvailableClient();
+ IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize);
+ using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey);
+ bool flag = NativeMethods.ISteamUGC_GetQueryFirstUGCKeyValueTag(CSteamAPIContext.GetSteamUGC(), handle, index, pchKey2, intPtr, cchValueSize);
+ pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
+ Marshal.FreeHGlobal(intPtr);
+ return flag;
+ }
+
+ public static bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_ReleaseQueryUGCRequest(CSteamAPIContext.GetSteamUGC(), handle);
+ }
+
+ public static bool AddRequiredTag(UGCQueryHandle_t handle, string pTagName)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pTagName2 = new InteropHelp.UTF8StringHandle(pTagName);
+ return NativeMethods.ISteamUGC_AddRequiredTag(CSteamAPIContext.GetSteamUGC(), handle, pTagName2);
+ }
+
+ public static bool AddRequiredTagGroup(UGCQueryHandle_t handle, IList<string> pTagGroups)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_AddRequiredTagGroup(CSteamAPIContext.GetSteamUGC(), handle, new InteropHelp.SteamParamStringArray(pTagGroups));
+ }
+
+ public static bool AddExcludedTag(UGCQueryHandle_t handle, string pTagName)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pTagName2 = new InteropHelp.UTF8StringHandle(pTagName);
+ return NativeMethods.ISteamUGC_AddExcludedTag(CSteamAPIContext.GetSteamUGC(), handle, pTagName2);
+ }
+
+ public static bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetReturnOnlyIDs(CSteamAPIContext.GetSteamUGC(), handle, bReturnOnlyIDs);
+ }
+
+ public static bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetReturnKeyValueTags(CSteamAPIContext.GetSteamUGC(), handle, bReturnKeyValueTags);
+ }
+
+ public static bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetReturnLongDescription(CSteamAPIContext.GetSteamUGC(), handle, bReturnLongDescription);
+ }
+
+ public static bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetReturnMetadata(CSteamAPIContext.GetSteamUGC(), handle, bReturnMetadata);
+ }
+
+ public static bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetReturnChildren(CSteamAPIContext.GetSteamUGC(), handle, bReturnChildren);
+ }
+
+ public static bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetReturnAdditionalPreviews(CSteamAPIContext.GetSteamUGC(), handle, bReturnAdditionalPreviews);
+ }
+
+ public static bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetReturnTotalOnly(CSteamAPIContext.GetSteamUGC(), handle, bReturnTotalOnly);
+ }
+
+ public static bool SetReturnPlaytimeStats(UGCQueryHandle_t handle, uint unDays)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetReturnPlaytimeStats(CSteamAPIContext.GetSteamUGC(), handle, unDays);
+ }
+
+ public static bool SetLanguage(UGCQueryHandle_t handle, string pchLanguage)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchLanguage2 = new InteropHelp.UTF8StringHandle(pchLanguage);
+ return NativeMethods.ISteamUGC_SetLanguage(CSteamAPIContext.GetSteamUGC(), handle, pchLanguage2);
+ }
+
+ public static bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint unMaxAgeSeconds)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetAllowCachedResponse(CSteamAPIContext.GetSteamUGC(), handle, unMaxAgeSeconds);
+ }
+
+ public static bool SetCloudFileNameFilter(UGCQueryHandle_t handle, string pMatchCloudFileName)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pMatchCloudFileName2 = new InteropHelp.UTF8StringHandle(pMatchCloudFileName);
+ return NativeMethods.ISteamUGC_SetCloudFileNameFilter(CSteamAPIContext.GetSteamUGC(), handle, pMatchCloudFileName2);
+ }
+
+ public static bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetMatchAnyTag(CSteamAPIContext.GetSteamUGC(), handle, bMatchAnyTag);
+ }
+
+ public static bool SetSearchText(UGCQueryHandle_t handle, string pSearchText)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pSearchText2 = new InteropHelp.UTF8StringHandle(pSearchText);
+ return NativeMethods.ISteamUGC_SetSearchText(CSteamAPIContext.GetSteamUGC(), handle, pSearchText2);
+ }
+
+ public static bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint unDays)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetRankedByTrendDays(CSteamAPIContext.GetSteamUGC(), handle, unDays);
+ }
+
+ public static bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, string pKey, string pValue)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pKey2 = new InteropHelp.UTF8StringHandle(pKey);
+ using InteropHelp.UTF8StringHandle pValue2 = new InteropHelp.UTF8StringHandle(pValue);
+ return NativeMethods.ISteamUGC_AddRequiredKeyValueTag(CSteamAPIContext.GetSteamUGC(), handle, pKey2, pValue2);
+ }
+
+ public static SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint unMaxAgeSeconds)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_RequestUGCDetails(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, unMaxAgeSeconds);
+ }
+
+ public static SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_CreateItem(CSteamAPIContext.GetSteamUGC(), nConsumerAppId, eFileType);
+ }
+
+ public static UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (UGCUpdateHandle_t)NativeMethods.ISteamUGC_StartItemUpdate(CSteamAPIContext.GetSteamUGC(), nConsumerAppId, nPublishedFileID);
+ }
+
+ public static bool SetItemTitle(UGCUpdateHandle_t handle, string pchTitle)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchTitle2 = new InteropHelp.UTF8StringHandle(pchTitle);
+ return NativeMethods.ISteamUGC_SetItemTitle(CSteamAPIContext.GetSteamUGC(), handle, pchTitle2);
+ }
+
+ public static bool SetItemDescription(UGCUpdateHandle_t handle, string pchDescription)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription);
+ return NativeMethods.ISteamUGC_SetItemDescription(CSteamAPIContext.GetSteamUGC(), handle, pchDescription2);
+ }
+
+ public static bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, string pchLanguage)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchLanguage2 = new InteropHelp.UTF8StringHandle(pchLanguage);
+ return NativeMethods.ISteamUGC_SetItemUpdateLanguage(CSteamAPIContext.GetSteamUGC(), handle, pchLanguage2);
+ }
+
+ public static bool SetItemMetadata(UGCUpdateHandle_t handle, string pchMetaData)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchMetaData2 = new InteropHelp.UTF8StringHandle(pchMetaData);
+ return NativeMethods.ISteamUGC_SetItemMetadata(CSteamAPIContext.GetSteamUGC(), handle, pchMetaData2);
+ }
+
+ public static bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetItemVisibility(CSteamAPIContext.GetSteamUGC(), handle, eVisibility);
+ }
+
+ public static bool SetItemTags(UGCUpdateHandle_t updateHandle, IList<string> pTags)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetItemTags(CSteamAPIContext.GetSteamUGC(), updateHandle, new InteropHelp.SteamParamStringArray(pTags));
+ }
+
+ public static bool SetItemContent(UGCUpdateHandle_t handle, string pszContentFolder)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pszContentFolder2 = new InteropHelp.UTF8StringHandle(pszContentFolder);
+ return NativeMethods.ISteamUGC_SetItemContent(CSteamAPIContext.GetSteamUGC(), handle, pszContentFolder2);
+ }
+
+ public static bool SetItemPreview(UGCUpdateHandle_t handle, string pszPreviewFile)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile);
+ return NativeMethods.ISteamUGC_SetItemPreview(CSteamAPIContext.GetSteamUGC(), handle, pszPreviewFile2);
+ }
+
+ public static bool SetAllowLegacyUpload(UGCUpdateHandle_t handle, bool bAllowLegacyUpload)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_SetAllowLegacyUpload(CSteamAPIContext.GetSteamUGC(), handle, bAllowLegacyUpload);
+ }
+
+ public static bool RemoveAllItemKeyValueTags(UGCUpdateHandle_t handle)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_RemoveAllItemKeyValueTags(CSteamAPIContext.GetSteamUGC(), handle);
+ }
+
+ public static bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, string pchKey)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey);
+ return NativeMethods.ISteamUGC_RemoveItemKeyValueTags(CSteamAPIContext.GetSteamUGC(), handle, pchKey2);
+ }
+
+ public static bool AddItemKeyValueTag(UGCUpdateHandle_t handle, string pchKey, string pchValue)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey);
+ using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue);
+ return NativeMethods.ISteamUGC_AddItemKeyValueTag(CSteamAPIContext.GetSteamUGC(), handle, pchKey2, pchValue2);
+ }
+
+ public static bool AddItemPreviewFile(UGCUpdateHandle_t handle, string pszPreviewFile, EItemPreviewType type)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile);
+ return NativeMethods.ISteamUGC_AddItemPreviewFile(CSteamAPIContext.GetSteamUGC(), handle, pszPreviewFile2, type);
+ }
+
+ public static bool AddItemPreviewVideo(UGCUpdateHandle_t handle, string pszVideoID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pszVideoID2 = new InteropHelp.UTF8StringHandle(pszVideoID);
+ return NativeMethods.ISteamUGC_AddItemPreviewVideo(CSteamAPIContext.GetSteamUGC(), handle, pszVideoID2);
+ }
+
+ public static bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint index, string pszPreviewFile)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile);
+ return NativeMethods.ISteamUGC_UpdateItemPreviewFile(CSteamAPIContext.GetSteamUGC(), handle, index, pszPreviewFile2);
+ }
+
+ public static bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint index, string pszVideoID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pszVideoID2 = new InteropHelp.UTF8StringHandle(pszVideoID);
+ return NativeMethods.ISteamUGC_UpdateItemPreviewVideo(CSteamAPIContext.GetSteamUGC(), handle, index, pszVideoID2);
+ }
+
+ public static bool RemoveItemPreview(UGCUpdateHandle_t handle, uint index)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_RemoveItemPreview(CSteamAPIContext.GetSteamUGC(), handle, index);
+ }
+
+ public static SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, string pchChangeNote)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pchChangeNote2 = new InteropHelp.UTF8StringHandle(pchChangeNote);
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_SubmitItemUpdate(CSteamAPIContext.GetSteamUGC(), handle, pchChangeNote2);
+ }
+
+ public static EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, out ulong punBytesProcessed, out ulong punBytesTotal)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetItemUpdateProgress(CSteamAPIContext.GetSteamUGC(), handle, out punBytesProcessed, out punBytesTotal);
+ }
+
+ public static SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_SetUserItemVote(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, bVoteUp);
+ }
+
+ public static SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_GetUserItemVote(CSteamAPIContext.GetSteamUGC(), nPublishedFileID);
+ }
+
+ public static SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_AddItemToFavorites(CSteamAPIContext.GetSteamUGC(), nAppId, nPublishedFileID);
+ }
+
+ public static SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveItemFromFavorites(CSteamAPIContext.GetSteamUGC(), nAppId, nPublishedFileID);
+ }
+
+ public static SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_SubscribeItem(CSteamAPIContext.GetSteamUGC(), nPublishedFileID);
+ }
+
+ public static SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_UnsubscribeItem(CSteamAPIContext.GetSteamUGC(), nPublishedFileID);
+ }
+
+ public static uint GetNumSubscribedItems()
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetNumSubscribedItems(CSteamAPIContext.GetSteamUGC());
+ }
+
+ public static uint GetSubscribedItems(PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetSubscribedItems(CSteamAPIContext.GetSteamUGC(), pvecPublishedFileID, cMaxEntries);
+ }
+
+ public static uint GetItemState(PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetItemState(CSteamAPIContext.GetSteamUGC(), nPublishedFileID);
+ }
+
+ public static bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, out ulong punSizeOnDisk, out string pchFolder, uint cchFolderSize, out uint punTimeStamp)
+ {
+ InteropHelp.TestIfAvailableClient();
+ IntPtr intPtr = Marshal.AllocHGlobal((int)cchFolderSize);
+ bool flag = NativeMethods.ISteamUGC_GetItemInstallInfo(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, out punSizeOnDisk, intPtr, cchFolderSize, out punTimeStamp);
+ pchFolder = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
+ Marshal.FreeHGlobal(intPtr);
+ return flag;
+ }
+
+ public static bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, out ulong punBytesDownloaded, out ulong punBytesTotal)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_GetItemDownloadInfo(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, out punBytesDownloaded, out punBytesTotal);
+ }
+
+ public static bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return NativeMethods.ISteamUGC_DownloadItem(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, bHighPriority);
+ }
+
+ public static bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, string pszFolder)
+ {
+ InteropHelp.TestIfAvailableClient();
+ using InteropHelp.UTF8StringHandle pszFolder2 = new InteropHelp.UTF8StringHandle(pszFolder);
+ return NativeMethods.ISteamUGC_BInitWorkshopForGameServer(CSteamAPIContext.GetSteamUGC(), unWorkshopDepotID, pszFolder2);
+ }
+
+ public static void SuspendDownloads(bool bSuspend)
+ {
+ InteropHelp.TestIfAvailableClient();
+ NativeMethods.ISteamUGC_SuspendDownloads(CSteamAPIContext.GetSteamUGC(), bSuspend);
+ }
+
+ public static SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_StartPlaytimeTracking(CSteamAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs);
+ }
+
+ public static SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_StopPlaytimeTracking(CSteamAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs);
+ }
+
+ public static SteamAPICall_t StopPlaytimeTrackingForAllItems()
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_StopPlaytimeTrackingForAllItems(CSteamAPIContext.GetSteamUGC());
+ }
+
+ public static SteamAPICall_t AddDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_AddDependency(CSteamAPIContext.GetSteamUGC(), nParentPublishedFileID, nChildPublishedFileID);
+ }
+
+ public static SteamAPICall_t RemoveDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveDependency(CSteamAPIContext.GetSteamUGC(), nParentPublishedFileID, nChildPublishedFileID);
+ }
+
+ public static SteamAPICall_t AddAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_AddAppDependency(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, nAppID);
+ }
+
+ public static SteamAPICall_t RemoveAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveAppDependency(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, nAppID);
+ }
+
+ public static SteamAPICall_t GetAppDependencies(PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_GetAppDependencies(CSteamAPIContext.GetSteamUGC(), nPublishedFileID);
+ }
+
+ public static SteamAPICall_t DeleteItem(PublishedFileId_t nPublishedFileID)
+ {
+ InteropHelp.TestIfAvailableClient();
+ return (SteamAPICall_t)NativeMethods.ISteamUGC_DeleteItem(CSteamAPIContext.GetSteamUGC(), nPublishedFileID);
+ }
+}