2015-06-16 21:13:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define DISPLAY_NAME_LEN 256
|
|
|
|
|
2015-07-03 06:56:58 +00:00
|
|
|
enum NodeType
|
|
|
|
{
|
|
|
|
RootNode,
|
|
|
|
ClassNode,
|
|
|
|
DeviceNode
|
|
|
|
};
|
|
|
|
|
2015-06-16 21:13:28 +00:00
|
|
|
class CNode
|
|
|
|
{
|
2015-06-17 21:26:42 +00:00
|
|
|
protected:
|
2015-10-15 17:21:37 +00:00
|
|
|
NodeType m_NodeType;
|
2015-06-16 21:13:28 +00:00
|
|
|
PSP_CLASSIMAGELIST_DATA m_ImageListData;
|
|
|
|
LPWSTR m_DeviceId;
|
|
|
|
WCHAR m_DisplayName[DISPLAY_NAME_LEN];
|
|
|
|
GUID m_ClassGuid;
|
|
|
|
INT m_ClassImage;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CNode(
|
2015-07-03 06:56:58 +00:00
|
|
|
_In_ NodeType Type,
|
2015-06-16 21:13:28 +00:00
|
|
|
_In_ PSP_CLASSIMAGELIST_DATA ImageListData
|
|
|
|
);
|
|
|
|
|
2015-10-23 12:45:41 +00:00
|
|
|
CNode(
|
|
|
|
_In_ const CNode& Node
|
|
|
|
);
|
|
|
|
|
2015-10-15 17:21:37 +00:00
|
|
|
virtual ~CNode();
|
2015-06-16 21:13:28 +00:00
|
|
|
|
2015-06-17 21:26:42 +00:00
|
|
|
virtual bool SetupNode() = 0;
|
2015-06-16 21:13:28 +00:00
|
|
|
|
2015-07-03 06:56:58 +00:00
|
|
|
NodeType GetNodeType() { return m_NodeType; }
|
2015-06-17 21:26:42 +00:00
|
|
|
LPGUID GetClassGuid() { return &m_ClassGuid; }
|
2015-06-16 21:13:28 +00:00
|
|
|
LPWSTR GetDisplayName() { return m_DisplayName; }
|
|
|
|
INT GetClassImage() { return m_ClassImage; }
|
|
|
|
LPWSTR GetDeviceId() { return m_DeviceId; }
|
2015-06-17 21:26:42 +00:00
|
|
|
bool HasProperties() { return (m_DeviceId != NULL); }
|
2015-06-16 21:13:28 +00:00
|
|
|
};
|
|
|
|
|