SmbComClose.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // This code is derived from jcifs smb client library <jcifs at samba dot org>
  2. // Ported by J. Arturo <webmaster at komodosoft dot net>
  3. //
  4. // This library is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU Lesser General Public
  6. // License as published by the Free Software Foundation; either
  7. // version 2.1 of the License, or (at your option) any later version.
  8. //
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. // Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public
  15. // License along with this library; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. namespace SharpCifs.Smb
  18. {
  19. internal class SmbComClose : ServerMessageBlock
  20. {
  21. private int _fid;
  22. private long _lastWriteTime;
  23. internal SmbComClose(int fid, long lastWriteTime)
  24. {
  25. this._fid = fid;
  26. this._lastWriteTime = lastWriteTime;
  27. Command = SmbComClose;
  28. }
  29. internal override int WriteParameterWordsWireFormat(byte[] dst, int dstIndex)
  30. {
  31. WriteInt2(_fid, dst, dstIndex);
  32. dstIndex += 2;
  33. WriteUTime(_lastWriteTime, dst, dstIndex);
  34. return 6;
  35. }
  36. internal override int WriteBytesWireFormat(byte[] dst, int dstIndex)
  37. {
  38. return 0;
  39. }
  40. internal override int ReadParameterWordsWireFormat(byte[] buffer, int bufferIndex
  41. )
  42. {
  43. return 0;
  44. }
  45. internal override int ReadBytesWireFormat(byte[] buffer, int bufferIndex)
  46. {
  47. return 0;
  48. }
  49. public override string ToString()
  50. {
  51. return "SmbComClose[" + base.ToString() + ",fid=" + _fid + ",lastWriteTime="
  52. + _lastWriteTime + "]";
  53. }
  54. }
  55. }