Reactos
1#pragma once
2#include "Node.h"
3
4enum IconOverlays
5{
6 OverlayProblem = 1,
7 OverlayDisabled,
8 OverlayInfo
9};
10
11class CDeviceNode : public CNode
12{
13private:
14 SP_DEVINFO_DATA m_DevinfoData;
15 DEVINST m_DevInst;
16 HDEVINFO m_hDevInfo;
17
18 ULONG m_Status;
19 ULONG m_ProblemNumber;
20 int m_OverlayImage;
21
22public:
23 CDeviceNode(
24 _In_opt_ DEVINST Device,
25 _In_ PSP_CLASSIMAGELIST_DATA ImageListData
26 );
27
28 ~CDeviceNode();
29
30 CDeviceNode(
31 _In_ const CDeviceNode &Node
32 );
33
34 virtual bool SetupNode();
35
36 DEVINST GetDeviceInst() { return m_DevInst; }
37 int GetOverlayImage() { return m_OverlayImage; }
38
39 bool HasProblem();
40 bool IsHidden();
41 bool CanDisable();
42 virtual bool IsDisabled();
43 bool IsStarted();
44 bool IsInstalled();
45 bool CanUninstall();
46 virtual bool CanUpdate() { return true; } // unimplemented
47
48 bool EnableDevice(
49 _In_ bool Enable,
50 _Out_ bool &NeedsReboot
51 );
52
53 bool UninstallDevice(
54 );
55
56 bool HasResources(
57 );
58
59private:
60 void Cleanup(
61 );
62
63 bool SetFlags(
64 _In_ DWORD Flags,
65 _In_ DWORD FlagsEx
66 );
67
68 bool RemoveFlags(
69 _In_ DWORD Flags,
70 _In_ DWORD FlagsEx
71 );
72
73 DWORD GetFlags(
74 );
75};
76