summaryrefslogtreecommitdiff
path: root/avstream/avscamera/sys/Waitable.h
blob: 1f092657789c17c689caa2f808e8f8d7a0bb9839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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;
};