diff options
| author | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
| commit | 8c4603c73675958efc960fbd4bb599a2909d106a (patch) | |
| tree | 714dc6fc9a1672d5fd7f89676b97e10959662abc /WhisperNet/Internal/sCaptureCallbacks.cs | |
| parent | 990a8d0dbaefc996244097397259e92758b15cce (diff) | |
Source codes
Diffstat (limited to 'WhisperNet/Internal/sCaptureCallbacks.cs')
| -rw-r--r-- | WhisperNet/Internal/sCaptureCallbacks.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/WhisperNet/Internal/sCaptureCallbacks.cs b/WhisperNet/Internal/sCaptureCallbacks.cs new file mode 100644 index 0000000..483c2f2 --- /dev/null +++ b/WhisperNet/Internal/sCaptureCallbacks.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices; + +namespace Whisper.Internal +{ + /// <summary>Unmanaged code calls this to check for cancellation</summary> + [UnmanagedFunctionPointer( CallingConvention.StdCall )] + public delegate int pfnShouldCancel( IntPtr pv ); + + /// <summary>Unmanaged code calls this to notify about the status</summary> + [UnmanagedFunctionPointer( CallingConvention.StdCall )] + public delegate int pfnCaptureStatus( IntPtr pv, eCaptureStatus status ); + + /// <summary>Capture callbacks for unmanaged code</summary> + public struct sCaptureCallbacks + { + /// <summary>Cancellation function pointer</summary> + public pfnShouldCancel shouldCancel; + /// <summary>Capture status function pointer</summary> + public pfnCaptureStatus captureStatus; + /// <summary>COntext pointer, only needed for C++ compatibility</summary> + public IntPtr pv; + } +}
\ No newline at end of file |
