e03eaf1588744389a97379351c5c2cbae5906f3b
[reactos.git] / reactos / dll / win32 / devmgr_new / devmgmt / DeviceNode.h
1 #pragma once
2 #include "Node.h"
3
4 class CDeviceNode : public CNode
5 {
6 private:
7 SP_DEVINFO_DATA m_DevinfoData;
8 HDEVINFO m_hDevInfo;
9 DEVINST m_DevInst;
10 ULONG m_Status;
11 ULONG m_ProblemNumber;
12 int m_OverlayImage;
13
14 public:
15 CDeviceNode(
16 _In_opt_ DEVINST Device,
17 _In_ PSP_CLASSIMAGELIST_DATA ImageListData
18 );
19
20 ~CDeviceNode();
21
22 virtual bool SetupNode();
23
24 DEVINST GetDeviceInst() { return m_DevInst; }
25 int GetOverlayImage() { return m_OverlayImage; }
26
27 bool HasProblem();
28 bool IsHidden();
29 bool CanDisable();
30 virtual bool IsDisabled();
31 bool IsStarted();
32 bool IsInstalled();
33 bool CanUninstall();
34 virtual bool CanUpdate() { return true; } // unimplemented
35
36 bool EnableDevice(
37 _In_ bool Enable,
38 _Out_ bool &NeedsReboot
39 );
40
41 bool UninstallDevice(
42 );
43
44 private:
45 void Cleanup(
46 );
47
48 bool SetFlags(
49 _In_ DWORD Flags,
50 _In_ DWORD FlagsEx
51 );
52
53 bool RemoveFlags(
54 _In_ DWORD Flags,
55 _In_ DWORD FlagsEx
56 );
57
58 DWORD GetFlags(
59 );
60 };
61