summaryrefslogtreecommitdiff
path: root/AVStream/avscamera/sys/Waitable.h
diff options
context:
space:
mode:
Diffstat (limited to 'AVStream/avscamera/sys/Waitable.h')
-rw-r--r--AVStream/avscamera/sys/Waitable.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/AVStream/avscamera/sys/Waitable.h b/AVStream/avscamera/sys/Waitable.h
new file mode 100644
index 00000000..1f092657
--- /dev/null
+++ b/AVStream/avscamera/sys/Waitable.h
@@ -0,0 +1,58 @@
+/**************************************************************************
+
+ A/V Stream Camera Sample
+
+ Copyright (c) 2014, Microsoft Corporation.
+
+ File:
+
+ waitable.h
+
+ Abstract:
+
+ Base interface for any object that is waitable.
+ In otherwords, it contains a kernel dispatch object.
+
+ Also implements a Cancelable interface class.
+
+ History:
+
+ created 5/30/2014
+
+**************************************************************************/
+
+#pragma once
+
+//
+// Interface definitions for KWaitable and Cancelable
+//
+class KWaitable :
+ public CNonCopyable
+{
+public:
+ KWaitable();
+
+ virtual
+ ~KWaitable();
+
+ virtual
+ NTSTATUS
+ Wait(
+ _In_opt_ PLARGE_INTEGER Timeout = NULL
+ );
+
+ // Must implement
+ virtual
+ PVOID
+ GetDispatchObject() = 0;
+};
+
+class Cancelable
+{
+public:
+ // Must implement
+ virtual
+ BOOLEAN
+ Cancel() = 0;
+};
+