1 // 2 // Copyright (C) Microsoft. All rights reserved. 3 // 4 #ifndef _PNPPRIVKM_H_ 5 #define _PNPPRIVKM_H_ 6 7 // public headers 8 #include "wdfdmaenabler.h" 9 10 // private headers 11 #include "fxirpqueue.hpp" 12 #include "fxcallback.hpp" 13 14 // <FxSystemWorkItem.hpp> 15 __drv_functionClass(EVT_SYSTEMWORKITEM) 16 __drv_maxIRQL(PASSIVE_LEVEL) 17 __drv_maxFunctionIRQL(DISPATCH_LEVEL) 18 __drv_sameIRQL 19 typedef 20 VOID 21 EVT_SYSTEMWORKITEM( 22 __in PVOID Parameter 23 ); 24 25 typedef EVT_SYSTEMWORKITEM *PFN_WDF_SYSTEMWORKITEM; 26 27 // </FxSystemWorkItem.hpp> 28 29 #include "fxcallbackspinlock.hpp" 30 #include "fxcallbackmutexlock.hpp" 31 #include "fxpackage.hpp" 32 #include "ifxmemory.hpp" 33 #include "fxcallback.hpp" 34 #include "fxrequestcontext.hpp" 35 #include "fxrequestcontexttypes.h" 36 #include "fxrequestbase.hpp" 37 #include "fxrequest.hpp" 38 #include "fxpkgpnp.hpp" 39 #include "fxpkgio.hpp" 40 #include "fxioqueue.hpp" 41 42 #include "fxdmaenabler.hpp" 43 #include "fxsystemworkitem.hpp" 44 45 // #include "FxDsf.h" // DSF support. 46 // #include <device_common.h> 47 // #include "FxTelemetry.hpp" 48 // __REACTOS__ 49 typedef struct _STACK_DEVICE_CAPABILITIES { 50 // 51 // The capabilities as garnered from IRP_MN_QUERY_CAPABILITIES. 52 // 53 DEVICE_CAPABILITIES DeviceCaps; 54 55 // 56 // The lowest-power D-state that a device can be in and still generate 57 // a wake signal, indexed by system state. (PowerSystemUnspecified is 58 // an unused slot in this array.) 59 // 60 DEVICE_WAKE_DEPTH DeepestWakeableDstate[PowerSystemHibernate+1]; 61 } STACK_DEVICE_CAPABILITIES, *PSTACK_DEVICE_CAPABILITIES; 62 // end __REACTOS__ 63 64 65 _Must_inspect_result_ 66 NTSTATUS 67 SendDeviceUsageNotificationWorker( 68 __in MxDeviceObject* RelatedDevice, 69 __inout FxIrp* RelatedIrp, 70 __in FxIrp* OriginalIrp, 71 __in BOOLEAN Revert 72 ); 73 74 IO_WORKITEM_ROUTINE 75 _DeviceUsageNotificationWorkItem; 76 77 struct FxUsageWorkitemParameters { 78 FxUsageWorkitemParametersFxUsageWorkitemParameters79 FxUsageWorkitemParameters( 80 VOID 81 ) 82 { 83 RelatedDevice = NULL; 84 RelatedIrp = NULL; 85 OriginalIrp = NULL; 86 Status = STATUS_UNSUCCESSFUL; 87 } 88 89 _In_ MxDeviceObject* RelatedDevice; 90 91 _In_ FxIrp* RelatedIrp; 92 93 _In_ FxIrp* OriginalIrp; 94 95 _In_ BOOLEAN Revert; 96 97 _In_ FxCREvent Event; 98 99 _Out_ NTSTATUS Status; 100 }; 101 102 103 #endif // _PNPPRIVKM_H_ 104