Transaction2QueryFSInformationResponse.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Text;
  10. using Utilities;
  11. namespace SMBLibrary.SMB1
  12. {
  13. /// <summary>
  14. /// TRANS2_QUERY_FS_INFORMATION Response
  15. /// </summary>
  16. public class Transaction2QueryFSInformationResponse : Transaction2Subcommand
  17. {
  18. // Data:
  19. private byte[] QueryFSInformationBytes;
  20. public Transaction2QueryFSInformationResponse() : base()
  21. {
  22. }
  23. public Transaction2QueryFSInformationResponse(byte[] parameters, byte[] data, bool isUnicode) : base()
  24. {
  25. QueryFSInformationBytes = data;
  26. }
  27. public override byte[] GetData(bool isUnicode)
  28. {
  29. return QueryFSInformationBytes;
  30. }
  31. public QueryFSInformation GetQueryFSInformation(QueryFSInformationLevel informationLevel, bool isUnicode)
  32. {
  33. return QueryFSInformation.GetQueryFSInformation(QueryFSInformationBytes, informationLevel, isUnicode);
  34. }
  35. public void SetQueryFSInformation(QueryFSInformation queryFSInformation, bool isUnicode)
  36. {
  37. QueryFSInformationBytes = queryFSInformation.GetBytes(isUnicode);
  38. }
  39. public override Transaction2SubcommandName SubcommandName
  40. {
  41. get
  42. {
  43. return Transaction2SubcommandName.TRANS2_QUERY_FS_INFORMATION;
  44. }
  45. }
  46. }
  47. }