本文整理汇总了C#中PublishedFileId_t类的典型用法代码示例。如果您正苦于以下问题:C# PublishedFileId_t类的具体用法?C# PublishedFileId_t怎么用?C# PublishedFileId_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PublishedFileId_t类属于命名空间,在下文中一共展示了PublishedFileId_t类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PublishedFile
public PublishedFile(PublishedFileId_t id, AppId_t appId) {
Contract.Requires<ArgumentNullException>(id != null);
Contract.Requires<ArgumentNullException>(appId != null);
Pid = id;
Aid = appId;
}
示例2: GetItemInstallInfo
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(nPublishedFileID, out punSizeOnDisk, intPtr, cchFolderSize, out punTimeStamp);
pchFolder = ((!flag) ? null : InteropHelp.PtrToStringUTF8(intPtr));
Marshal.FreeHGlobal(intPtr);
return flag;
}
示例3: UnsubscribePublishedFile
public static SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId)
{
InteropHelp.TestIfAvailableClient();
return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_UnsubscribePublishedFile(unPublishedFileId);
}
示例4: GetUserPublishedItemVoteDetails
public static SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId)
{
InteropHelp.TestIfAvailableClient();
return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_GetUserPublishedItemVoteDetails(unPublishedFileId);
}
示例5: CreatePublishedFileUpdateRequest
public static PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId)
{
InteropHelp.TestIfAvailableClient();
return (PublishedFileUpdateHandle_t)NativeMethods.ISteamRemoteStorage_CreatePublishedFileUpdateRequest(unPublishedFileId);
}
示例6: DownloadItem
/// <summary>
/// <para> download new or update already installed item. If function returns true, wait for DownloadItemResult_t. If the item is already installed,</para>
/// <para> then files on disk should not be used until callback received. If item is not subscribed to, it will be cached for some time.</para>
/// <para> If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP.</para>
/// </summary>
public static bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) {
InteropHelp.TestIfAvailableGameServer();
return NativeMethods.ISteamGameServerUGC_DownloadItem(nPublishedFileID, bHighPriority);
}
示例7: GetItemInstallInfo
/// <summary>
/// <para> get info about currently installed content on disc for items that have k_EItemStateInstalled set</para>
/// <para> if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder)</para>
/// </summary>
public static bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, out ulong punSizeOnDisk, out string pchFolder, uint cchFolderSize, out uint punTimeStamp) {
InteropHelp.TestIfAvailableGameServer();
IntPtr pchFolder2 = Marshal.AllocHGlobal((int)cchFolderSize);
bool ret = NativeMethods.ISteamGameServerUGC_GetItemInstallInfo(nPublishedFileID, out punSizeOnDisk, pchFolder2, cchFolderSize, out punTimeStamp);
pchFolder = ret ? InteropHelp.PtrToStringUTF8(pchFolder2) : null;
Marshal.FreeHGlobal(pchFolder2);
return ret;
}
示例8: GetSubscribedItems
/// <summary>
/// <para> all subscribed item PublishFileIDs</para>
/// </summary>
public static uint GetSubscribedItems(PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries) {
InteropHelp.TestIfAvailableGameServer();
return NativeMethods.ISteamGameServerUGC_GetSubscribedItems(pvecPublishedFileID, cMaxEntries);
}
示例9: QuerySteamUGC
/// <summary>
/// Queries the steam UGC.
/// </summary>
public void QuerySteamUGC()
{
Debug.Log("Started SteamUGC Query");
//Check how many items are being downloaded right now
if(m_RequestUGGDetailsResult.Count > 0)
{
//debug log the items being downloaded
Debug.Log("Number of Items Downloaded right now: " + m_RequestUGGDetailsResult.Count);
}
//If an item is being downloaded. Clear it so we don't have to deal with it.
m_RequestUGGDetailsResult.Clear();
//get the number of items downloaded already
uint nSubscriptions = SteamUGC.GetNumSubscribedItems();
Debug.Log("Subscribed Items: " + nSubscriptions);
PublishedFileId_t[] fileIds = new PublishedFileId_t[nSubscriptions];
uint ret = SteamUGC.GetSubscribedItems(fileIds, nSubscriptions);
if(ret != nSubscriptions)
{
Debug.LogWarning("Subscriptions Returned: " + ret + "| Expected: " + nSubscriptions);
}
for (int i = 0; i < nSubscriptions; i++)
{
//print("Looping over: " + i + " | " + fileIds[i]);
CreatedLevel _creation = new CreatedLevel();
bool installed = SteamUGC.GetItemInstallInfo(fileIds[i], out _creation.unusedSizeOnDisk, out _creation.path, 300, out _creation.unusedLegacyItem);
//Debug.Log("Creation Path: " + _creation.path + " | Creation Unused Size On Disk: " + _creation.unusedSizeOnDisk + "| Creation Unused Legacy Item: " + _creation.unusedLegacyItem);
if(!installed)
{
//TODO do something if the user is subscribed to an item but does not have it downloaded
Debug.Log("Not Installed");
}
int index = i;
//Debug.Log("Get Subscriptions");
var subscriptionDetails = CallResult<SteamUGCRequestUGCDetailsResult_t>.Create(OnSteamUGCRequestUGCDetailsResult);
subscriptionDetails.Set(SteamUGC.RequestUGCDetails(fileIds[i], 0));
m_RequestUGGDetailsResult.Add(subscriptionDetails);
_creation.publishFileID = fileIds[i];
//m_RequestUGGDetailsResult.Remove(subscriptionDetails);
//add the level we got from WorkShop Servers the the Created Levels List for later use
m_CreatedLevels.Add(_creation);
}
//TODO: Create a list of the levels you are subscribed too!
//TODO: Consume when clicking the levels you are subscribed too!
}
示例10: ISteamGameServerUGC_DownloadItem
public static extern bool ISteamGameServerUGC_DownloadItem(PublishedFileId_t nPublishedFileID, [MarshalAs(UnmanagedType.I1)] bool bHighPriority);
示例11: ISteamGameServerUGC_GetItemDownloadInfo
public static extern bool ISteamGameServerUGC_GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, out ulong punBytesDownloaded, out ulong punBytesTotal);
示例12: ISteamGameServerUGC_GetItemInstallInfo
public static extern bool ISteamGameServerUGC_GetItemInstallInfo(PublishedFileId_t nPublishedFileID, out ulong punSizeOnDisk, IntPtr pchFolder, uint cchFolderSize, out uint punTimeStamp);
示例13: ISteamGameServerUGC_GetItemState
public static extern uint ISteamGameServerUGC_GetItemState(PublishedFileId_t nPublishedFileID);
示例14: RemoveItemFromFavorites
public static SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) {
InteropHelp.TestIfAvailableGameServer();
return (SteamAPICall_t)NativeMethods.ISteamGameServerUGC_RemoveItemFromFavorites(nAppId, nPublishedFileID);
}
示例15: UnsubscribeItem
/// <summary>
/// <para> unsubscribe from this item, will be uninstalled after game quits</para>
/// </summary>
public static SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) {
InteropHelp.TestIfAvailableGameServer();
return (SteamAPICall_t)NativeMethods.ISteamGameServerUGC_UnsubscribeItem(nPublishedFileID);
}