using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Duplicati.Proprietary.DiskImage.Raw;
namespace Duplicati.Proprietary.DiskImage.Partition;
///
/// Partition table parsing interface.
///
public interface IPartitionTable : IDisposable
{
///
/// Gets the raw disk this table was parsed from.
///
IRawDisk RawDisk { get; }
///
/// Gets the partition table type.
///
PartitionTableType TableType { get; }
///
/// Enumerates all partitions on the disk.
///
/// Cancellation token.
/// Async enumerable of partitions.
IAsyncEnumerable EnumeratePartitions(CancellationToken cancellationToken);
///
/// Gets a specific partition by number.
///
/// The partition number.
/// The partition, or null if not found.
Task GetPartitionAsync(int partitionNumber, CancellationToken cancellationToken);
///
/// Gets the protective MBR (for GPT disks).
///
Task GetProtectiveMbrAsync(CancellationToken cancellationToken);
}