ReactOS  0.4.15-dev-439-g292f67a
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 
54  );
55 
57  UINT Action
58  );
59 
60  VOID Refresh(
62  _In_ bool ScanForChanges,
63  _In_ bool UpdateView
64  );
65 
67  VOID SetFocus();
68 
69  VOID SetHiddenDevices(_In_ bool ShowHidden)
70  {
71  m_ShowHidden = ShowHidden;
72  }
73 
75 
76  bool CreateActionMenu(
77  _In_ HMENU OwnerMenu,
78  _In_ bool MainMenu
79  );
80 
82  );
83 
84  bool SelDeviceIsStarted();
85  bool SelDeviceIsInstalled();
86 
87 private:
88  bool AddRootDevice();
89 
90  bool RefreshDeviceList();
91 
92  static unsigned int __stdcall RefreshThread(
93  void *Param
94  );
95 
97  );
98  bool ListDevicesByType(
99  );
100 
101  bool GetNextClass(
102  _In_ ULONG ClassIndex,
103  _Out_ LPGUID ClassGuid,
104  _Out_ HDEVINFO *hDevInfo
105  );
106 
107  bool RecurseChildDevices(
108  _In_ DEVINST ParentDevice,
109  _In_ HTREEITEM hParentTreeItem
110  );
111 
113  _In_ bool Enable,
114  _Out_ bool &NeedsReboot
115  );
116 
118  _Out_ bool &NeedsReboot
119  );
120 
122  );
123 
125  );
126 
127  bool GetChildDevice(
128  _In_ DEVINST ParentDevInst,
129  _Out_ PDEVINST DevInst
130  );
131 
132  bool GetSiblingDevice(
133  _In_ DEVINST PrevDevice,
134  _Out_ PDEVINST DevInst
135  );
136 
139  _In_ CNode *Node
140  );
141 
143  _In_ HMENU OwnerMenu,
144  _In_ CNode *Node,
145  _In_ bool MainMenu
146  );
147 
149  _In_ HTREEITEM hParentItem,
150  _In_ CNode *Node
151  );
152 
153  void SelectNode(
154  _In_ CNode *Node
155  );
156 
157  void EmptyDeviceView(
158  );
159 
160  CNode* GetNode(
161  _In_ LPTV_ITEMW TvItem
162  );
163 
165  _In_ LPGUID ClassGuid
166  );
169  );
170  void EmptyLists(
171  );
172 };
173 
bool RecurseChildDevices(_In_ DEVINST ParentDevice, _In_ HTREEITEM hParentTreeItem)
Definition: DeviceView.cpp:598
bool RunAddHardwareWizard()
Definition: DeviceView.cpp:764
VOID SetFocus()
Definition: DeviceView.cpp:298
bool RefreshDeviceList()
Type
Definition: Type.h:6
_In_ PIRP _In_ PDEVICE_OBJECT Device
Definition: fatprocs.h:2029
VOID Refresh(_In_ ViewType Type, _In_ bool ScanForChanges, _In_ bool UpdateView)
Definition: DeviceView.cpp:195
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:304
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
~CDeviceView(void)
Definition: DeviceView.cpp:49
LRESULT OnContextMenu(_In_ LPARAM lParam)
Definition: DeviceView.cpp:148
bool UpdateSelectedDevice(_Out_ bool &NeedsReboot)
Definition: DeviceView.cpp:722
#define _In_opt_
Definition: no_sal2.h:213
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:947
CDeviceNode * GetDeviceNode(_In_ DEVINST Device)
ViewType GetCurrentView()
Definition: DeviceView.h:74
bool UninstallSelectedDevice()
Definition: DeviceView.cpp:741
CAtlList< CDeviceNode * > m_DeviceNodeList
Definition: DeviceView.h:28
#define LPTV_ITEMW
Definition: commctrl.h:3291
bool EnableSelectedDevice(_In_ bool Enable, _Out_ bool &NeedsReboot)
Definition: DeviceView.cpp:694
void EmptyLists()
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
bool SelDeviceIsStarted()
CNode * GetSelectedNode()
Definition: DeviceView.cpp:320
#define _Out_
Definition: no_sal2.h:323
LONG_PTR LPARAM
Definition: windef.h:208
HWND m_hMainWnd
Definition: DeviceView.h:18
Definition: Node.h:12
VOID DisplayPropertySheet()
Definition: DeviceView.cpp:284
LRESULT OnAction(UINT Action)
Definition: DeviceView.cpp:222
bool GetNextClass(_In_ ULONG ClassIndex, _Out_ LPGUID ClassGuid, _Out_ HDEVINFO *hDevInfo)
Definition: DeviceView.cpp:339
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:801
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
HTREEITEM m_hTreeRoot
Definition: DeviceView.h:23
bool ListDevicesByType()
Definition: DeviceView.cpp:435
bool AddRootDevice()
Definition: DeviceView.cpp:332
bool Uninitialize()
Definition: DeviceView.cpp:94
void SelectNode(_In_ CNode *Node)
ViewType
Definition: DeviceView.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:814
HWND hMainWnd
Definition: magnifier.c:32
VOID SetHiddenDevices(_In_ bool ShowHidden)
Definition: DeviceView.h:69
HMENU m_hMenu
Definition: DeviceView.h:21
const DOCKBAR PVOID HWND hParent
Definition: tooldock.h:22
#define _In_
Definition: no_sal2.h:204
HWND m_hPropertyDialog
Definition: DeviceView.h:20
DWORD DEVINST
Definition: cfgmgr32.h:76
CDeviceView(HWND hMainWnd)
Definition: DeviceView.cpp:35
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:581
bool GetChildDevice(_In_ DEVINST ParentDevInst, _Out_ PDEVINST DevInst)
Definition: DeviceView.cpp:788
bool SelDeviceIsInstalled()
unsigned int ULONG
Definition: retypes.h:1
CClassNode * GetClassNode(_In_ LPGUID ClassGuid)
static unsigned int __stdcall RefreshThread(void *Param)
Definition: DeviceView.cpp:375
void BuildActionMenuForNode(_In_ HMENU OwnerMenu, _In_ CNode *Node, _In_ bool MainMenu)
Definition: DeviceView.cpp:850
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:128
bool ListDevicesByConnection()
Definition: DeviceView.cpp:584
SP_CLASSIMAGELIST_DATA m_ImageListData
Definition: DeviceView.h:29
CRootNode * m_RootNode
Definition: DeviceView.h:26
Definition: dlist.c:348