1 //
2 //    Copyright (C) Microsoft.  All rights reserved.
3 //
4 #ifndef _FXUSBIDLEINFO_H_
5 #define _FXUSBIDLEINFO_H_
6 
7 struct FxUsbIdleInfo : public FxStump {
8 public:
FxUsbIdleInfoFxUsbIdleInfo9     FxUsbIdleInfo(
10         __in FxPkgPnp* PkgPnp
11         ) : m_IdleCallbackEvent(NULL), m_IdleIrp(NULL)
12     {
13         m_CallbackInfo.IdleCallback = _UsbIdleCallback;
14         m_CallbackInfo.IdleContext = PkgPnp;
15         m_EventDropped = FALSE;
16     }
17 
18     _Must_inspect_result_
19     NTSTATUS
20     Initialize(
21         VOID
22         );
23 
24     FxCREvent* m_IdleCallbackEvent;
25 
26     FxAutoIrp m_IdleIrp;
27 
28     USB_IDLE_CALLBACK_INFO m_CallbackInfo;
29 
30     //
31     // used to check if UsbSelectiveSuspendCompleted event was dropped.
32     //
33     BOOLEAN m_EventDropped;
34 
35 private:
36 
37     __drv_maxIRQL(PASSIVE_LEVEL)
38     static
39     VOID
40     STDCALL
41     _UsbIdleCallback(
42         __in PVOID Context
43         );
44 };
45 
46 #endif // _FXUSBIDLEINFO_H_
47