ReactOS 0.4.15-dev-8145-ga541a46
fxchildlistum.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5Module Name:
6
7 FxChildListUm.cpp
8
9Abstract:
10
11 This module implements the FxChildList class
12
13Author:
14
15
16
17
18Environment:
19
20 User mode only
21
22Revision History:
23
24--*/
25
26#include <fxmin.hpp>
27
28#pragma warning(push)
29#pragma warning(disable:4100) //unreferenced parameter
30
33 __in ULONG AddressDescriptionSize,
35 )
36{
38}
39
41{
43}
44
47FxDeviceDescriptionEntry::operator new(
48 __in size_t AllocatorBlock,
49 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
50 __in size_t TotalDescriptionSize
51 )
52{
54 return NULL;
55}
56
57VOID
59 VOID
60 )
61{
63}
64
67 VOID
68 )
69/*++
70
71Routine Description:
72 This function tells the caller if the description has been reported missing
73 to the Pnp manager. It does not change the actual state of the description,
74 unlike IsDeviceRemoved().
75
76Arguments:
77 None
78
79Return Value:
80 TRUE if it has been reported missing, FALSE otherwise
81
82 --*/
83{
85 return FALSE;
86}
87
90 VOID
91 )
92{
94 return FALSE;
95}
96
97VOID
99 VOID
100 )
101{
103}
104
108 __inout PLIST_ENTRY FreeListHead
109 )
110{
112 return NULL;
113}
114
116 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
117 __in size_t TotalDescriptionSize,
120 ) :
122 m_TotalDescriptionSize(TotalDescriptionSize),
123 m_EvtCreateDevice(FxDriverGlobals),
124 m_EvtScanForChildren(FxDriverGlobals)
125{
127}
128
131 VOID
132 )
133{
135 return TRUE;
136}
137
142 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
143 __in PWDF_OBJECT_ATTRIBUTES ListAttributes,
144 __in size_t TotalDescriptionSize,
146 __in PWDF_CHILD_LIST_CONFIG ListConfig,
148 )
149{
151
153}
154
155VOID
158 )
159{
161}
162
163WDFDEVICE
165 VOID
166 )
167{
169 return NULL;
170}
171
175 )
176{
178 return NULL;
179}
180
186 )
187{
190}
191
192VOID
196 )
197{
199}
200
201VOID
203 __out_opt PULONG ScanTag
204 )
205{
207}
208
209VOID
211 __inout_opt PULONG ScanTag
212 )
213{
215}
216
217VOID
219 __in BOOLEAN EndTheScan,
220 __inout_opt PULONG ScanTag
221 )
222{
224}
225
226VOID
229 )
230{
232}
233
234VOID
237 )
238{
240}
241
242VOID
245 )
246{
248}
249
253 __out WDFDEVICE* Device,
256 )
257{
260}
261
262WDFDEVICE
264 __in WDFDEVICE PreviousDevice,
266 )
267{
269 return NULL;
270}
271
276 )
277{
280}
281
286 )
287/*++
288
289Routine Description:
290 Same as UpdateAsMissing except instead of a device description, we have the
291 device itself.
292
293Arguments:
294 Device - the device to mark as missing
295
296Return Value:
297 NTSTATUS
298
299 --*/
300{
303}
304
308 __in BOOLEAN FromQDR
309 )
310{
312 return FALSE;
313}
314
315VOID
318 )
319{
321}
322
323
324VOID
326 __in_opt PULONG ScanTag
327 )
328{
330}
331
337 __in_opt PULONG ScanTag
338 )
339{
342}
343
344VOID
348 )
349{
351}
352
355 __inout PLIST_ENTRY FreeListHead,
357 __in BOOLEAN FromQDR
358 )
359{
361 return FALSE;
362}
363
364VOID
366 __inout PLIST_ENTRY FreeListHead
367 )
368{
370}
371
372VOID
374 __inout FxDeviceDescriptionEntry* DescriptionEntry,
375 __in BOOLEAN ModificationCanBeQueued
376 )
377/*++
378
379Routine Description:
380
381 This worker function marks the passed in mod or desc entry in the device
382 list "not present". The change is enqueued in the mod list but the mod
383 list is not drained.
384
385Arguments:
386
387 DescEntry - Matching description entry, if found.
388
389 ModificationCanBeQueued - whether the caller allows for their to be a
390 modification already queued on the modification list
391
392Assumes:
393 DescriptionEntry->IsPresent() == TRUE
394
395Return Value:
396 None
397
398--*/
399{
401}
402
403VOID
405 __inout PLIST_ENTRY FreeListHead,
406 __inout FxDeviceDescriptionEntry* ModificationEntry
407 )
408/*++
409
410Routine Description:
411
412 This worker function marks the passed in mod or desc entry in the device
413 list "not present". The change is enqueued in the mod list but the mod
414 list is not drained.
415
416Arguments:
417
418 ModEntry - Matching modification entry, if found. If this parameter is
419 supplied, DescEntry should be NULL.
420
421Return Value:
422 The caller may not necessarily be interested in the transition from reported
423 as present and not yet created to reported as missing...as such, many
424 callers of this function will not inspect this return value.
425
426--*/
427{
429}
430
431VOID
433 __inout PLIST_ENTRY FreeListHead
434 )
435{
437}
438
442 )
443{
445 return NULL;
446}
447
451 )
452{
454 return NULL;
455}
456
461 )
462{
465}
466
471 )
472{
475}
476
480 __inout PBOOLEAN InvalidateRelations
481 )
482{
484 return FALSE;
485}
486
490 __inout PDEVICE_RELATIONS *DeviceRelations
491 )
492{
495}
496
497VOID
499 VOID
500 )
501{
503}
504
505VOID
507 VOID
508 )
509{
511}
512
513VOID
516 )
517/*++
518
519Routine Description:
520 Propagates the wait wake status to all the child PDOs. This will cause any
521 pended wait wake requests to be completed with the given wait wake status.
522
523Arguments:
524 WaitWakeStatus - The NTSTATUS value to use for compeleting any pended wait
525 wake requests on the child PDOs.
526
527Return Value:
528 None
529
530 --*/
531{
533}
534
535VOID
537 VOID
538 )
539/*++
540
541Routine Description:
542 Notification through IFxStateChangeNotification that the parent device is
543 being surprise removed
544
545Arguments:
546 None
547
548Return Value:
549 None
550
551 --*/
552{
554}
555
556VOID
558 __inout PLONG ChildCount
559 )
560/*++
561
562Routine Description:
563 Notification through IFxStateChangeNotification that the parent device is
564 being removed.
565
566Arguments:
567 None
568
569Return Value:
570 None
571
572 --*/
573{
575}
576
580 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
582 __in size_t* TotalDescriptionSize
583 )
584{
587}
588
592 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
594 __in size_t* TotalDescriptionSize
595 )
596{
599}
600
601#pragma warning(pop)
DWORD Id
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ NTSTATUS UpdateDeviceAsMissing(__in CfxDevice *Device)
VOID GetAddressDescriptionFromEntry(__in FxDeviceDescriptionEntry *Entry, __out PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription)
VOID EndScan(__inout_opt PULONG ScanTag=NULL)
VOID PostParentToD0(VOID)
VOID NotifyDeviceRemove(__inout PLONG ChildCount)
VOID ReenumerateEntry(__inout FxDeviceDescriptionEntry *Entry)
_Must_inspect_result_ NTSTATUS GetNextDevice(__out WDFDEVICE *Device, __inout PWDF_CHILD_LIST_ITERATOR Iterator, __inout_opt PWDF_CHILD_RETRIEVE_INFO Info)
_Must_inspect_result_ NTSTATUS VerifyDescriptionEntry(__in PLIST_ENTRY Entry)
virtual BOOLEAN Dispose(VOID)
static _Must_inspect_result_ NTSTATUS _ValidateConfig(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_CHILD_LIST_CONFIG Config, __in size_t *TotalDescriptionSize)
VOID DrainFreeListHead(__inout PLIST_ENTRY FreeListHead)
WDFDEVICE GetDevice(VOID)
VOID BeginScan(__out_opt PULONG ScanTag=NULL)
CfxDevice * GetDeviceFromId(__inout PWDF_CHILD_RETRIEVE_INFO Info)
_Must_inspect_result_ NTSTATUS GetAddressDescription(__in PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription, __out PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription)
VOID MarkDescriptionNotPresentWorker(__inout FxDeviceDescriptionEntry *DescriptionEntry, __in BOOLEAN ModificationCanBeQueued)
VOID InvokeReportedMissingCallback(VOID)
VOID ProcessModificationsLocked(__inout PLIST_ENTRY FreeListHead)
VOID BeginIteration(__inout PWDF_CHILD_LIST_ITERATOR Iterator)
FxDeviceDescriptionEntry * SearchBackwardsForMatchingDescriptionLocked(__in PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Id)
FxDeviceDescriptionEntry * SearchBackwardsForMatchingModificationLocked(__in PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Id)
_Must_inspect_result_ NTSTATUS VerifyModificationEntry(__in PLIST_ENTRY Entry)
VOID IndicateWakeStatus(__in NTSTATUS WakeWakeStatus)
VOID NotifyDeviceSurpriseRemove(VOID)
_Must_inspect_result_ NTSTATUS Add(__in PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription, __in_opt PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription, __in_opt PULONG ScanTag=NULL)
static _Must_inspect_result_ NTSTATUS _CreateAndInit(__out FxChildList **ChildList, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES ListAttributes, __in size_t TotalDescriptionSize, __in CfxDevice *Device, __in PWDF_CHILD_LIST_CONFIG ListConfig, __in BOOLEAN Static=FALSE)
VOID InitIterator(__inout PWDF_CHILD_LIST_ITERATOR Iterator)
VOID UpdateAddressDescriptionFromEntry(__inout FxDeviceDescriptionEntry *Entry, __in PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription)
VOID EndIteration(__inout PWDF_CHILD_LIST_ITERATOR Iterator)
BOOLEAN CreateDevice(__inout FxDeviceDescriptionEntry *Entry, __inout PBOOLEAN InvalidateRelations)
static _Must_inspect_result_ NTSTATUS _ComputeTotalDescriptionSize(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_CHILD_LIST_CONFIG Config, __in size_t *TotalDescriptionSize)
WDFDEVICE GetNextStaticDevice(__in WDFDEVICE PreviousDevice, __in ULONG Flags)
BOOLEAN ReenumerateEntryLocked(__inout FxDeviceDescriptionEntry *Entry, __in BOOLEAN FromQDR)
BOOLEAN CloneEntryLocked(__inout PLIST_ENTRY FreeListHead, __inout FxDeviceDescriptionEntry *Entry, __in BOOLEAN FromQDR)
VOID CancelScan(__in BOOLEAN EndTheScan, __inout_opt PULONG ScanTag)
VOID UpdateAllAsPresent(__in_opt PULONG ScanTag=NULL)
_Must_inspect_result_ NTSTATUS ProcessBusRelations(__inout PDEVICE_RELATIONS *DeviceRelations)
VOID Initialize(__in PWDF_CHILD_LIST_CONFIG Config)
FxChildList(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in size_t TotalDescriptionSize, __in CfxDevice *Device, __in BOOLEAN Static)
VOID MarkModificationNotPresentWorker(__inout PLIST_ENTRY FreeListHead, __inout FxDeviceDescriptionEntry *ModificationEntry)
_Must_inspect_result_ NTSTATUS UpdateAsMissing(__in PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Description)
#define __out_opt
Definition: dbghelp.h:65
#define __inout_opt
Definition: dbghelp.h:53
#define __in
Definition: dbghelp.h:35
#define __inout
Definition: dbghelp.h:50
#define __in_opt
Definition: dbghelp.h:38
#define __out
Definition: dbghelp.h:62
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR Description[]
Definition: oid.c:1266
PDEVICE_LIST DeviceList
Definition: utils.c:27
description Header IdentificationDescriptionSize
@ FX_TYPE_CHILD_LIST
Definition: fxtypes.h:82
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
base of all file and directory entries
Definition: entries.h:83
FxDeviceDescriptionEntry(__inout FxChildList *DeviceList, __in ULONG AddressDescriptionSize, __in ULONG IdentificationDescriptionSize)
Definition: fxchildlist.cpp:31
_Must_inspect_result_ FxDeviceDescriptionEntry * Clone(__inout PLIST_ENTRY FreeListHead)
VOID DeviceSurpriseRemoved(VOID)
BOOLEAN IsDeviceReportedMissing(VOID)
BOOLEAN IsDeviceRemoved(VOID)
Definition: window.h:585
Definition: typedefs.h:120
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
int32_t * PLONG
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
VOID UfxVerifierTrapNotImpl()
_In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR Iterator
Definition: wdfchildlist.h:656
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
Definition: wdfchildlist.h:124
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFCHILDLIST * ChildList
Definition: wdfchildlist.h:481
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:476
_Inout_ PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
Definition: wdfchildlist.h:255
_Must_inspect_result_ _In_ WDFDEVICE _In_ NTSTATUS WaitWakeStatus
Definition: wdfdevice.h:3945
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList