2015-06-17 21:26:42 +00:00
|
|
|
#pragma once
|
|
|
|
#include "Node.h"
|
|
|
|
|
2015-10-25 17:01:19 +00:00
|
|
|
enum IconOverlays
|
|
|
|
{
|
|
|
|
OverlayProblem = 1,
|
|
|
|
OverlayDisabled,
|
|
|
|
OverlayInfo
|
|
|
|
};
|
|
|
|
|
2015-06-17 21:26:42 +00:00
|
|
|
class CDeviceNode : public CNode
|
|
|
|
{
|
|
|
|
private:
|
2015-06-25 18:59:23 +00:00
|
|
|
SP_DEVINFO_DATA m_DevinfoData;
|
2015-06-17 21:26:42 +00:00
|
|
|
DEVINST m_DevInst;
|
2015-10-15 17:21:37 +00:00
|
|
|
HDEVINFO m_hDevInfo;
|
|
|
|
|
2015-06-17 21:26:42 +00:00
|
|
|
ULONG m_Status;
|
|
|
|
ULONG m_ProblemNumber;
|
|
|
|
int m_OverlayImage;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CDeviceNode(
|
|
|
|
_In_opt_ DEVINST Device,
|
|
|
|
_In_ PSP_CLASSIMAGELIST_DATA ImageListData
|
|
|
|
);
|
|
|
|
|
|
|
|
~CDeviceNode();
|
|
|
|
|
2015-10-23 12:45:41 +00:00
|
|
|
CDeviceNode(
|
|
|
|
_In_ const CDeviceNode &Node
|
|
|
|
);
|
|
|
|
|
2015-06-17 21:26:42 +00:00
|
|
|
virtual bool SetupNode();
|
|
|
|
|
|
|
|
DEVINST GetDeviceInst() { return m_DevInst; }
|
|
|
|
int GetOverlayImage() { return m_OverlayImage; }
|
|
|
|
|
2015-06-25 18:59:23 +00:00
|
|
|
bool HasProblem();
|
2015-06-17 21:26:42 +00:00
|
|
|
bool IsHidden();
|
|
|
|
bool CanDisable();
|
2015-07-03 06:56:58 +00:00
|
|
|
virtual bool IsDisabled();
|
2015-06-17 21:26:42 +00:00
|
|
|
bool IsStarted();
|
|
|
|
bool IsInstalled();
|
2015-06-25 18:59:23 +00:00
|
|
|
bool CanUninstall();
|
2015-07-03 06:56:58 +00:00
|
|
|
virtual bool CanUpdate() { return true; } // unimplemented
|
2015-06-25 18:59:23 +00:00
|
|
|
|
|
|
|
bool EnableDevice(
|
|
|
|
_In_ bool Enable,
|
|
|
|
_Out_ bool &NeedsReboot
|
|
|
|
);
|
|
|
|
|
2015-07-05 08:49:54 +00:00
|
|
|
bool UninstallDevice(
|
|
|
|
);
|
|
|
|
|
2015-06-25 18:59:23 +00:00
|
|
|
private:
|
2015-06-26 08:45:49 +00:00
|
|
|
void Cleanup(
|
|
|
|
);
|
|
|
|
|
2015-06-25 18:59:23 +00:00
|
|
|
bool SetFlags(
|
|
|
|
_In_ DWORD Flags,
|
|
|
|
_In_ DWORD FlagsEx
|
|
|
|
);
|
|
|
|
|
|
|
|
bool RemoveFlags(
|
|
|
|
_In_ DWORD Flags,
|
|
|
|
_In_ DWORD FlagsEx
|
|
|
|
);
|
|
|
|
|
|
|
|
DWORD GetFlags(
|
|
|
|
);
|
2015-06-17 21:26:42 +00:00
|
|
|
};
|
|
|
|
|