xref: /reactos/dll/win32/devmgr/devmgmt/Node.h (revision c2c66aff)
1 #pragma once
2 
3 #define DISPLAY_NAME_LEN    256
4 
5 enum NodeType
6 {
7     RootNode,
8     ClassNode,
9     DeviceNode
10 };
11 
12 class CNode
13 {
14 protected:
15     NodeType m_NodeType;
16     PSP_CLASSIMAGELIST_DATA m_ImageListData;
17     LPWSTR m_DeviceId;
18     WCHAR m_DisplayName[DISPLAY_NAME_LEN];
19     GUID  m_ClassGuid;
20     INT m_ClassImage;
21 
22 public:
23     CNode(
24         _In_ NodeType Type,
25         _In_ PSP_CLASSIMAGELIST_DATA ImageListData
26         );
27 
28     CNode(
29         _In_ const CNode& Node
30         );
31 
32     virtual ~CNode();
33 
34     virtual bool SetupNode() = 0;
35 
GetNodeType()36     NodeType GetNodeType() { return m_NodeType; }
GetClassGuid()37     LPGUID GetClassGuid() { return &m_ClassGuid; }
GetDisplayName()38     LPWSTR GetDisplayName() { return m_DisplayName; }
GetClassImage()39     INT GetClassImage() { return m_ClassImage; }
GetDeviceId()40     LPWSTR GetDeviceId() { return m_DeviceId; }
HasProperties()41     bool HasProperties() { return (m_DeviceId != NULL); }
42 };
43 
44