ReactOS  0.4.15-dev-4853-g3a72a52
DeviceView.h
Go to the documentation of this file.
1 #pragma once
2 #include "DeviceNode.h"
3 #include "ClassNode.h"
4 #include "RootNode.h"
5 
6 enum ViewType
7 {
12 };
13 
14 
16 {
17 
25 
27  CAtlList<CClassNode *> m_ClassNodeList;
28  CAtlList<CDeviceNode *> m_DeviceNodeList;
30 
31 public:
34  );
35 
36  ~CDeviceView(void);
37 
38  bool Initialize();
39  bool Uninitialize();
40 
42  _In_ int x,
43  _In_ int y,
44  _In_ int cx,
45  _In_ int cy
46  );
47 
49  _In_ LPNMHDR NmHdr
50  );
51 
53  _In_ LPNMHDR NmHdr
54  );
55 
58  );
59 
61  UINT Action
62  );
63 
64  VOID Refresh(
66  _In_ bool ScanForChanges,
67  _In_ bool UpdateView
68  );
69 
71  VOID SetFocus();
72 
73  VOID SetHiddenDevices(_In_ bool ShowHidden)
74  {
75  m_ShowHidden = ShowHidden;
76  }
77 
79 
80  bool CreateActionMenu(
81  _In_ HMENU OwnerMenu,
82  _In_ bool MainMenu
83  );
84 
86  );
87 
88  bool SelDeviceIsStarted();
89  bool SelDeviceIsInstalled();
90 
91 private:
92  bool AddRootDevice();
93 
94  bool RefreshDeviceList();
95 
96  static unsigned int __stdcall RefreshThread(
97  void *Param
98  );
99 
101  );
102  bool ListDevicesByType(
103  );
104 
105  bool GetNextClass(
106  _In_ ULONG ClassIndex,
107  _Out_ LPGUID ClassGuid,
108  _Out_ HDEVINFO *hDevInfo
109  );
110 
111  bool RecurseChildDevices(
113  _In_ HTREEITEM hParentTreeItem
114  );
115 
117  _In_ bool Enable,
118  _Out_ bool &NeedsReboot
119  );
120 
122  _Out_ bool &NeedsReboot
123  );
124 
126  );
127 
129  );
130 
131  bool GetChildDevice(
132  _In_ DEVINST ParentDevInst,
133  _Out_ PDEVINST DevInst
134  );
135 
136  bool GetSiblingDevice(
137  _In_ DEVINST PrevDevice,
138  _Out_ PDEVINST DevInst
139  );
140 
142  _In_opt_ HTREEITEM hParent,
143  _In_ CNode *Node
144  );
145 
147  _In_ HMENU OwnerMenu,
148  _In_ CNode *Node,
149  _In_ bool MainMenu
150  );
151 
153  _In_ HTREEITEM hParentItem,
154  _In_ CNode *Node
155  );
156 
157  void SelectNode(
158  _In_ CNode *Node
159  );
160 
161  void EmptyDeviceView(
162  );
163 
164  CNode* GetNode(
165  _In_ LPTV_ITEMW TvItem
166  );
167 
169  _In_ LPGUID ClassGuid
170  );
173  );
174  void EmptyLists(
175  );
176 };
177 
bool RecurseChildDevices(_In_ DEVINST ParentDevice, _In_ HTREEITEM hParentTreeItem)
Definition: DeviceView.cpp:590
bool RunAddHardwareWizard()
Definition: DeviceView.cpp:756
VOID SetFocus()
Definition: DeviceView.cpp:319
#define _In_opt_
Definition: ms_sal.h:309
bool RefreshDeviceList()
#define _Out_
Definition: ms_sal.h:345
VOID Refresh(_In_ ViewType Type, _In_ bool ScanForChanges, _In_ bool UpdateView)
Definition: DeviceView.cpp:216
CAtlList< CClassNode * > m_ClassNodeList
Definition: DeviceView.h:27
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
bool CreateActionMenu(_In_ HMENU OwnerMenu, _In_ bool MainMenu)
Definition: DeviceView.cpp:325
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
~CDeviceView(void)
Definition: DeviceView.cpp:49
LRESULT OnContextMenu(_In_ LPARAM lParam)
Definition: DeviceView.cpp:169
bool UpdateSelectedDevice(_Out_ bool &NeedsReboot)
Definition: DeviceView.cpp:714
_Must_inspect_result_ _In_ WDFDEVICE ParentDevice
Definition: wdfpdo.h:220
ViewType m_ViewType
Definition: DeviceView.h:22
HWND m_hTreeView
Definition: DeviceView.h:19
HTREEITEM RecurseFindDevice(_In_ HTREEITEM hParentItem, _In_ CNode *Node)
Definition: DeviceView.cpp:939
CDeviceNode * GetDeviceNode(_In_ DEVINST Device)
ViewType GetCurrentView()
Definition: DeviceView.h:78
bool UninstallSelectedDevice()
Definition: DeviceView.cpp:733
CAtlList< CDeviceNode * > m_DeviceNodeList
Definition: DeviceView.h:28
#define LPTV_ITEMW
Definition: commctrl.h:3295
bool EnableSelectedDevice(_In_ bool Enable, _Out_ bool &NeedsReboot)
Definition: DeviceView.cpp:686
void EmptyLists()
LRESULT OnDoubleClick(_In_ LPNMHDR NmHdr)
Definition: DeviceView.cpp:128
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:585
bool SelDeviceIsStarted()
CNode * GetSelectedNode()
Definition: DeviceView.cpp:341
#define _In_
Definition: ms_sal.h:308
LONG_PTR LPARAM
Definition: windef.h:208
HWND m_hMainWnd
Definition: DeviceView.h:18
Definition: Node.h:12
VOID DisplayPropertySheet()
Definition: DeviceView.cpp:305
LRESULT OnAction(UINT Action)
Definition: DeviceView.cpp:243
bool GetNextClass(_In_ ULONG ClassIndex, _Out_ LPGUID ClassGuid, _Out_ HDEVINFO *hDevInfo)
Definition: DeviceView.cpp:360
bool Initialize()
Definition: DeviceView.cpp:54
static void UpdateView(TreeListData *pData)
Definition: treelist.c:1636
bool GetSiblingDevice(_In_ DEVINST PrevDevice, _Out_ PDEVINST DevInst)
Definition: DeviceView.cpp:793
HTREEITEM m_hTreeRoot
Definition: DeviceView.h:23
bool ListDevicesByType()
Definition: DeviceView.cpp:444
bool AddRootDevice()
Definition: DeviceView.cpp:353
bool Uninitialize()
Definition: DeviceView.cpp:94
void SelectNode(_In_ CNode *Node)
ViewType
Definition: DeviceView.h:6
Type
Definition: Type.h:6
void EmptyDeviceView()
CNode * GetNode(_In_ LPTV_ITEMW TvItem)
LRESULT OnSize(_In_ int x, _In_ int y, _In_ int cx, _In_ int cy)
Definition: DeviceView.cpp:108
#define __stdcall
Definition: typedefs.h:25
HTREEITEM InsertIntoTreeView(_In_opt_ HTREEITEM hParent, _In_ CNode *Node)
Definition: DeviceView.cpp:806
HWND hMainWnd
Definition: magnifier.c:32
VOID SetHiddenDevices(_In_ bool ShowHidden)
Definition: DeviceView.h:73
HMENU m_hMenu
Definition: DeviceView.h:21
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
HWND m_hPropertyDialog
Definition: DeviceView.h:20
DWORD DEVINST
Definition: cfgmgr32.h:76
CDeviceView(HWND hMainWnd)
Definition: DeviceView.cpp:35
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:506
unsigned int UINT
Definition: ndis.h:50
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
DEVNODE * PDEVINST
Definition: cfgmgr32.h:77
_Out_opt_ int * cx
Definition: commctrl.h:585
bool GetChildDevice(_In_ DEVINST ParentDevInst, _Out_ PDEVINST DevInst)
Definition: DeviceView.cpp:780
bool SelDeviceIsInstalled()
unsigned int ULONG
Definition: retypes.h:1
CClassNode * GetClassNode(_In_ LPGUID ClassGuid)
static unsigned int __stdcall RefreshThread(void *Param)
Definition: DeviceView.cpp:384
void BuildActionMenuForNode(_In_ HMENU OwnerMenu, _In_ CNode *Node, _In_ bool MainMenu)
Definition: DeviceView.cpp:842
bool m_ShowHidden
Definition: DeviceView.h:24
LONG_PTR LRESULT
Definition: windef.h:209
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
LRESULT OnRightClick(_In_ LPNMHDR NmHdr)
Definition: DeviceView.cpp:149
bool ListDevicesByConnection()
Definition: DeviceView.cpp:576
SP_CLASSIMAGELIST_DATA m_ImageListData
Definition: DeviceView.h:29
CRootNode * m_RootNode
Definition: DeviceView.h:26
Definition: dlist.c:348