using System.Runtime.InteropServices;
namespace Whisper.Internal
{
/// Unmanaged code calls this to check for cancellation
/// Return 0 to proceed, or 1 to stop the process and return from Context.runCapture method
[UnmanagedFunctionPointer( CallingConvention.StdCall )]
public delegate int pfnShouldCancel( IntPtr pv );
/// Unmanaged code calls this to notify about the status
[UnmanagedFunctionPointer( CallingConvention.StdCall )]
public delegate int pfnCaptureStatus( IntPtr pv, eCaptureStatus status );
/// Capture callbacks for unmanaged code
public struct sCaptureCallbacks
{
/// Cancellation function pointer
public pfnShouldCancel shouldCancel;
/// Capture status function pointer
public pfnCaptureStatus captureStatus;
/// Context pointer, only needed for C++ compatibility
public IntPtr pv;
}
}