public static SteamAPICall UGCDownloadToLocation(UGCHandle hContent, string Location, uint unPriority) { InteropHelp.TestIfAvailableClient(); using (var Location2 = new InteropHelp.UTF8StringHandle(Location)) { return((SteamAPICall)NativeMethods.ISteamRemoteStorage_UGCDownloadToLocation(hContent, Location2, unPriority)); } }
/// <summary> /// <para> Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult call result</para> /// </summary> public static bool GetUGCDetails(UGCHandle hContent, out AppId pappId, out string pname, out int pnFileSizeInBytes, out SteamId pSteamIDOwner) { InteropHelp.TestIfAvailableClient(); IntPtr pname2; var ret = NativeMethods.ISteamRemoteStorage_GetUGCDetails(hContent, out pappId, out pname2, out pnFileSizeInBytes, out pSteamIDOwner); pname = ret ? InteropHelp.PtrToStringUTF8(pname2) : null; return(ret); }
/// <summary> /// <para> Attaches a piece of user generated content the user's entry on a leaderboard.</para> /// <para> hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare().</para> /// <para> This call is asynchronous, with the result returned in LeaderboardUGCSet.</para> /// </summary> public static SteamAPICall AttachLeaderboardUGC(SteamLeaderboard hSteamLeaderboard, UGCHandle hUGC) { InteropHelp.TestIfAvailableClient(); return((SteamAPICall)NativeMethods.ISteamUserStats_AttachLeaderboardUGC(hSteamLeaderboard, hUGC)); }
/// <summary> /// <para> After download, gets the content of the file.</para> /// <para> Small files can be read all at once by calling this function with an offset of 0 and DataToRead equal to the size of the file.</para> /// <para> Larger files can be read in chunks to reduce memory usage (since both sides of the IPC client and the game itself must allocate</para> /// <para> enough memory for each chunk). Once the last byte is read, the file is implicitly closed and further calls to UGCRead will fail</para> /// <para> unless UGCDownload is called again.</para> /// <para> For especially large files (anything over 100MB) it is a requirement that the file is read in chunks.</para> /// </summary> public static int UGCRead(UGCHandle hContent, byte[] pvData, int DataToRead, uint cOffset, EugcReadAction eAction) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamRemoteStorage_UGCRead(hContent, pvData, DataToRead, cOffset, eAction)); }
/// <summary> /// <para> Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false</para> /// <para> or if the transfer hasn't started yet, so be careful to check for that before dividing to get a percentage</para> /// </summary> public static bool GetUGCDownloadProgress(UGCHandle hContent, out int pnBytesDownloaded, out int pnBytesExpected) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamRemoteStorage_GetUGCDownloadProgress(hContent, out pnBytesDownloaded, out pnBytesExpected)); }
/// <summary> /// <para> user generated content</para> /// <para> Downloads a UGC file. A priority value of 0 will download the file immediately,</para> /// <para> otherwise it will wait to download the file until all downloads with a lower priority</para> /// <para> value are completed. Downloads with equal priority will occur simultaneously.</para> /// </summary> public static SteamAPICall UGCDownload(UGCHandle hContent, uint unPriority) { InteropHelp.TestIfAvailableClient(); return((SteamAPICall)NativeMethods.ISteamRemoteStorage_UGCDownload(hContent, unPriority)); }