using System; using System.Threading.Tasks; using LANCommander.Steam.Enums; namespace LANCommander.Steam.Models; /// /// Represents an installation job in the queue /// public class SteamCmdInstallJob { /// /// Unique identifier for this install job /// public Guid Id { get; set; } = Guid.NewGuid(); /// /// Steam App ID to install /// public uint AppId { get; set; } /// /// Installation directory /// public string InstallDirectory { get; set; } = string.Empty; /// /// Username for Steam login (null for anonymous) /// public string? Username { get; set; } /// /// Current status of the installation /// public SteamCmdInstallStatus Status { get; set; } = SteamCmdInstallStatus.Queued; /// /// Progress percentage (0-100) /// public double Progress { get; set; } /// /// Current status message /// public string StatusMessage { get; set; } = string.Empty; /// /// Bytes downloaded /// public long BytesDownloaded { get; set; } /// /// Total bytes to download /// public long BytesTotal { get; set; } /// /// Download speed in bytes per second /// public long BytesPerSecond { get; set; } /// /// When the job was created /// public DateTime CreatedAt { get; set; } = DateTime.UtcNow; /// /// When the job started processing /// public DateTime? StartedAt { get; set; } /// /// When the job completed /// public DateTime? CompletedAt { get; set; } /// /// Error message if the job failed /// public string? ErrorMessage { get; set; } /// /// Task completion source for awaiting the job /// internal TaskCompletionSource? CompletionSource { get; set; } }