ISvdStorage.cs 744 B

12345678910111213141516171819202122232425262728293031
  1. namespace SvdCli.Storage
  2. {
  3. public interface ISvdStorage
  4. {
  5. string ProductId { get; }
  6. string ProductVersion { get; }
  7. uint BlockSize { get; }
  8. ulong BlockCount { get; }
  9. uint MaxTransferLength { get; }
  10. bool SupportTrim { get; }
  11. bool WriteProtect { get; }
  12. void Init();
  13. void Exit();
  14. void ReadBlocks(byte[] buffer, ulong blockIndex, uint blockCount);
  15. void WriteBlocks(byte[] buffer, ulong blockIndex, uint blockCount);
  16. int Read(byte[] buffer, long offset, int index, int count);
  17. void Write(byte[] buffer, long offset, int index, int count);
  18. void Flush();
  19. void Trim(params TrimDescriptor[] descriptors);
  20. }
  21. }