INTFileStore: Added NotifyChange and Cancel methods

This commit is contained in:
Tal Aloni 2017-07-25 17:33:51 +03:00
parent 6507d88bf5
commit 6c9ea46eb4
3 changed files with 37 additions and 0 deletions

View file

@ -382,6 +382,17 @@ namespace SMBLibrary
return NTStatus.STATUS_SUCCESS;
}
public NTStatus NotifyChange(out object ioRequest, object handle, NotifyChangeFilter completionFilter, bool watchTree, int outputBufferSize, OnNotifyChangeCompleted onNotifyChangeCompleted, object context)
{
ioRequest = null;
return NTStatus.STATUS_NOT_SUPPORTED;
}
public NTStatus Cancel(object ioRequest)
{
return NTStatus.STATUS_NOT_SUPPORTED;
}
public NTStatus DeviceIOControl(object handle, uint ctlCode, byte[] input, out byte[] output, int maxOutputLength)
{
output = null;

View file

@ -11,6 +11,8 @@ using Utilities;
namespace SMBLibrary
{
public delegate void OnNotifyChangeCompleted(NTStatus status, byte[] buffer, object context);
/// <summary>
/// A file store (a.k.a. object store) interface to allow access to a file system or a named pipe in an NT-like manner dictated by the SMB protocol.
/// </summary>
@ -34,6 +36,19 @@ namespace SMBLibrary
NTStatus GetFileSystemInformation(out FileSystemInformation result, FileSystemInformationClass informationClass);
/// <summary>
/// Monitor the contents of a directory (and its subdirectories) by using change notifications.
/// When something changes within the directory being watched this operation is completed.
/// </summary>
/// <returns>
/// STATUS_PENDING - The directory is being watched, change notification will be provided using callback method.
/// STATUS_NOT_SUPPORTED - The underlying object store does not support change notifications.
/// STATUS_INVALID_HANDLE - The handle supplied is invalid.
/// </returns>
NTStatus NotifyChange(out object ioRequest, object handle, NotifyChangeFilter completionFilter, bool watchTree, int outputBufferSize, OnNotifyChangeCompleted onNotifyChangeCompleted, object context);
NTStatus Cancel(object ioRequest);
NTStatus DeviceIOControl(object handle, uint ctlCode, byte[] input, out byte[] output, int maxOutputLength);
}
}

View file

@ -177,5 +177,16 @@ namespace SMBLibrary
result = null;
return NTStatus.STATUS_NOT_SUPPORTED;
}
public NTStatus NotifyChange(out object ioRequest, object handle, NotifyChangeFilter completionFilter, bool watchTree, int outputBufferSize, OnNotifyChangeCompleted onNotifyChangeCompleted, object context)
{
ioRequest = null;
return NTStatus.STATUS_NOT_SUPPORTED;
}
public NTStatus Cancel(object ioRequest)
{
return NTStatus.STATUS_NOT_SUPPORTED;
}
}
}