UsbDk: Introduce class describing redirection entity
CUsbDkRedirection class introduced Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This commit is contained in:
parent
3d4b8eda14
commit
bfa21156bb
2 changed files with 51 additions and 0 deletions
|
|
@ -300,3 +300,33 @@ bool CUsbDkControlDevice::Allocate()
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
NTSTATUS CUsbDkRedirection::Create(const USB_DK_DEVICE_ID &Id)
|
||||
{
|
||||
auto status = m_DeviceID.Create(Id.DeviceID);
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
return m_InstanceID.Create(Id.InstanceID);
|
||||
}
|
||||
|
||||
void CUsbDkRedirection::Dump() const
|
||||
{
|
||||
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_CONTROLDEVICE,
|
||||
"%!FUNC! Redirect: DevID: %wZ, InstanceID: %wZ",
|
||||
m_DeviceID, m_InstanceID);
|
||||
}
|
||||
|
||||
bool CUsbDkRedirection::operator==(const USB_DK_DEVICE_ID &Id)
|
||||
{
|
||||
return (m_DeviceID == Id.DeviceID) &&
|
||||
(m_InstanceID == Id.InstanceID);
|
||||
}
|
||||
|
||||
bool CUsbDkRedirection::operator==(const CUsbDkRedirection &Other)
|
||||
{
|
||||
return (m_DeviceID == Other.m_DeviceID) &&
|
||||
(m_InstanceID == Other.m_InstanceID);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue