ReactOS  0.4.14-dev-49-gfb4591c
CPortTopology Class Reference
Inheritance diagram for CPortTopology:
Collaboration diagram for CPortTopology:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
 CPortTopology (IUnknown *OuterUnknown)
 
virtual ~CPortTopology ()
 

Public Attributes

 IMP_IPortTopology
 
 IMP_ISubdevice
 
 IMP_IPortEvents
 

Protected Attributes

BOOL m_bInitialized
 
PMINIPORTTOPOLOGY m_pMiniport
 
PDEVICE_OBJECT m_pDeviceObject
 
PPINCOUNT m_pPinCount
 
PPOWERNOTIFY m_pPowerNotify
 
PPCFILTER_DESCRIPTOR m_pDescriptor
 
PSUBDEVICE_DESCRIPTOR m_SubDeviceDescriptor
 
IPortFilterTopology * m_Filter
 
LONG m_Ref
 

Friends

PMINIPORTTOPOLOGY GetTopologyMiniport (PPORTTOPOLOGY Port)
 

Detailed Description

Definition at line 17 of file port_topology.cpp.

Constructor & Destructor Documentation

◆ CPortTopology()

CPortTopology::CPortTopology ( IUnknown OuterUnknown)
inline

Definition at line 43 of file port_topology.cpp.

43 {}

◆ ~CPortTopology()

virtual CPortTopology::~CPortTopology ( )
inlinevirtual

Definition at line 44 of file port_topology.cpp.

44 {}

Member Function Documentation

◆ QueryInterface()

NTSTATUS NTAPI CPortTopology::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

Definition at line 130 of file port_topology.cpp.

133 {
135 
136  DPRINT("IPortTopology_fnQueryInterface\n");
137 
138  if (IsEqualGUIDAligned(refiid, IID_IPortTopology) ||
139  IsEqualGUIDAligned(refiid, IID_IPort) ||
141  {
142  *Output = PVOID(PUNKNOWN((IPortTopology*)this));
143  PUNKNOWN(*Output)->AddRef();
144  return STATUS_SUCCESS;
145  }
146  else if (IsEqualGUIDAligned(refiid, IID_IPortEvents))
147  {
148  *Output = PVOID(PPORTEVENTS(this));
149  PUNKNOWN(*Output)->AddRef();
150  return STATUS_SUCCESS;
151  }
152  else if (IsEqualGUIDAligned(refiid, IID_ISubdevice))
153  {
154  *Output = PVOID(PSUBDEVICE(this));
155  PUNKNOWN(*Output)->AddRef();
156  return STATUS_SUCCESS;
157  }
158  else if (IsEqualGUIDAligned(refiid, IID_IPortClsVersion))
159  {
161  }
162  else if (IsEqualGUIDAligned(refiid, IID_IDrmPort) ||
163  IsEqualGUIDAligned(refiid, IID_IDrmPort2))
164  {
165  return NewIDrmPort((PDRMPORT2*)Output);
166  }
167  else if (IsEqualGUIDAligned(refiid, IID_IUnregisterSubdevice))
168  {
170  }
171  else if (IsEqualGUIDAligned(refiid, IID_IUnregisterPhysicalConnection))
172  {
174  }
175 
177  {
178  DPRINT1("IPortTopology_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
180  }
181  return STATUS_UNSUCCESSFUL;
182 }
IPortEvents * PPORTEVENTS
Definition: portcls.h:2065
static PWSTR GuidString
Definition: apphelp.c:91
IUnknown * PUNKNOWN
Definition: com_apitest.h:45
IUnregisterSubdevice * PUNREGISTERSUBDEVICE
Definition: portcls.h:633
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:233
void DPRINT(...)
Definition: polytest.cpp:61
void * PVOID
Definition: retypes.h:9
IUnregisterPhysicalConnection * PUNREGISTERPHYSICALCONNECTION
Definition: portcls.h:675
IDrmPort2 * PDRMPORT2
Definition: portcls.h:2172
const GUID IID_IUnknown
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
ULONG AddRef()
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
Definition: arc.h:85
NTSTATUS NTAPI NewIUnregisterSubdevice(OUT PUNREGISTERSUBDEVICE *OutDevice)
Definition: unregister.cpp:143
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
ISubdevice * PSUBDEVICE
Definition: interfaces.hpp:305
NTSTATUS NewPortClsVersion(OUT PPORTCLSVERSION *OutVersion)
Definition: version.cpp:93
#define DPRINT1
Definition: precomp.h:8
NTSTATUS NTAPI NewIUnregisterPhysicalConnection(OUT PUNREGISTERPHYSICALCONNECTION *OutConnection)
Definition: connection.cpp:148
NTSTATUS NewIDrmPort(OUT PDRMPORT2 *OutPort)
Definition: drm_port.cpp:145
return STATUS_SUCCESS
Definition: btrfs.c:2966
IPortClsVersion * PPORTCLSVERSION
Definition: portcls.h:2209

◆ STDMETHODIMP_() [1/2]

CPortTopology::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 24 of file port_topology.cpp.

25  {
27  return m_Ref;
28  }
#define InterlockedIncrement
Definition: armddk.h:53

◆ STDMETHODIMP_() [2/2]

CPortTopology::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 29 of file port_topology.cpp.

30  {
32 
33  if (!m_Ref)
34  {
35  delete this;
36  return 0;
37  }
38  return m_Ref;
39  }
#define InterlockedDecrement
Definition: armddk.h:52

Friends And Related Function Documentation

◆ GetTopologyMiniport

PMINIPORTTOPOLOGY GetTopologyMiniport ( PPORTTOPOLOGY  Port)
friend

Definition at line 619 of file port_topology.cpp.

621 {
623  return This->m_pMiniport;
624 }
CPPORT Port[4]
Definition: headless.c:34

Member Data Documentation

◆ IMP_IPortEvents

CPortTopology::IMP_IPortEvents

Definition at line 42 of file port_topology.cpp.

◆ IMP_IPortTopology

CPortTopology::IMP_IPortTopology

Definition at line 40 of file port_topology.cpp.

◆ IMP_ISubdevice

CPortTopology::IMP_ISubdevice

Definition at line 41 of file port_topology.cpp.

◆ m_bInitialized

BOOL CPortTopology::m_bInitialized
protected

Definition at line 47 of file port_topology.cpp.

◆ m_Filter

IPortFilterTopology* CPortTopology::m_Filter
protected

Definition at line 56 of file port_topology.cpp.

◆ m_pDescriptor

PPCFILTER_DESCRIPTOR CPortTopology::m_pDescriptor
protected

Definition at line 54 of file port_topology.cpp.

◆ m_pDeviceObject

PDEVICE_OBJECT CPortTopology::m_pDeviceObject
protected

Definition at line 50 of file port_topology.cpp.

◆ m_pMiniport

PMINIPORTTOPOLOGY CPortTopology::m_pMiniport
protected

Definition at line 49 of file port_topology.cpp.

◆ m_pPinCount

PPINCOUNT CPortTopology::m_pPinCount
protected

Definition at line 51 of file port_topology.cpp.

◆ m_pPowerNotify

PPOWERNOTIFY CPortTopology::m_pPowerNotify
protected

Definition at line 52 of file port_topology.cpp.

◆ m_Ref

LONG CPortTopology::m_Ref
protected

Definition at line 58 of file port_topology.cpp.

Referenced by STDMETHODIMP_().

◆ m_SubDeviceDescriptor

PSUBDEVICE_DESCRIPTOR CPortTopology::m_SubDeviceDescriptor
protected

Definition at line 55 of file port_topology.cpp.


The documentation for this class was generated from the following file: