ReactOS 0.4.15-dev-8096-ga0eec98
drm_port.cpp
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Kernel Streaming
4 * FILE: drivers/wdm/audio/backpln/portcls/drm_port.cpp
5 * PURPOSE: portcls drm port object
6 * PROGRAMMER: Johannes Anderwald
7 */
8
9#include "private.hpp"
10
11#define NDEBUG
12#include <debug.h>
13
14class CDrmPort2 : public CUnknownImpl<IDrmPort2>
15{
16public:
18
20 CDrmPort2(IUnknown *OuterUnknown){}
21 virtual ~CDrmPort2(){}
22};
23
27 IN REFIID refiid,
29{
31
32 if (IsEqualGUIDAligned(refiid, IID_IDrmPort) ||
33 IsEqualGUIDAligned(refiid, IID_IDrmPort2) ||
35 {
36 *Output = PVOID(PUNKNOWN(this));
37 PUNKNOWN(*Output)->AddRef();
38 return STATUS_SUCCESS;
39 }
40
42 {
43 DPRINT("IDrmPort2_QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
45 }
47}
48
51CDrmPort2::CreateContentMixed(
52 IN PULONG paContentId,
55{
58}
59
62CDrmPort2::DestroyContent(
63 IN ULONG ContentId)
64{
66 return DrmDestroyContent(ContentId);
67}
68
71CDrmPort2::ForwardContentToFileObject(
72 IN ULONG ContentId,
74{
76}
77
80CDrmPort2::ForwardContentToInterface(
81 IN ULONG ContentId,
84{
87}
88
91CDrmPort2::GetContentRights(
92 IN ULONG ContentId,
94{
96 return DrmGetContentRights(ContentId, DrmRights);
97}
98
100NTAPI
101CDrmPort2::AddContentHandlers(
102 IN ULONG ContentId,
103 IN PVOID * paHandlers,
105{
107 return DrmAddContentHandlers(ContentId, paHandlers, NumHandlers);
108}
109
111NTAPI
112CDrmPort2::ForwardContentToDeviceObject(
113 IN ULONG ContentId,
115 IN PCDRMFORWARD DrmForward)
116{
118 return DrmForwardContentToDeviceObject(ContentId, Reserved, DrmForward);
119}
120
123 OUT PDRMPORT2 *OutPort)
124{
126 if (!This)
128
129 This->AddRef();
130
131 *OutPort = (PDRMPORT2)This;
132 return STATUS_SUCCESS;
133}
LONG NTSTATUS
Definition: precomp.h:26
#define STDMETHODIMP
Definition: basetyps.h:43
const GUID IID_IUnknown
CDrmPort2(IUnknown *OuterUnknown)
Definition: drm_port.cpp:20
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: drm_port.cpp:26
virtual ~CDrmPort2()
Definition: drm_port.cpp:21
IUnknown * PUNKNOWN
Definition: com_apitest.h:45
#define NULL
Definition: types.h:112
NTSTATUS NTAPI DrmForwardContentToInterface(IN ULONG ContentId, IN PUNKNOWN pUnknown, IN ULONG NumMethods)
Definition: stubs.cpp:116
NTSTATUS NTAPI DrmDestroyContent(IN ULONG ContentId)
Definition: stubs.cpp:64
NTSTATUS NTAPI DrmForwardContentToDeviceObject(IN ULONG ContentId, IN PVOID Reserved, IN PCDRMFORWARD DrmForward)
Definition: stubs.cpp:80
NTSTATUS NTAPI DrmAddContentHandlers(IN ULONG ContentId, IN PVOID *paHandlers, IN ULONG NumHandlers)
Definition: stubs.cpp:29
NTSTATUS NTAPI DrmGetContentRights(IN ULONG ContentId, OUT PDRMRIGHTS DrmRights)
Definition: stubs.cpp:133
NTSTATUS NTAPI DrmCreateContentMixed(IN PULONG paContentId, IN ULONG cContentId, OUT PULONG pMixedContentId)
Definition: stubs.cpp:47
NTSTATUS NTAPI DrmForwardContentToFileObject(IN ULONG ContentId, IN PFILE_OBJECT FileObject)
Definition: stubs.cpp:99
NTSTATUS NewIDrmPort(OUT PDRMPORT2 *OutPort)
Definition: drm_port.cpp:122
_In_ ULONG cContentId
Definition: drmk.h:48
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
_In_ ULONG NumHandlers
Definition: drmk.h:41
_Out_ PDRMRIGHTS DrmRights
Definition: drmk.h:84
_In_ ULONG _Out_ PULONG pMixedContentId
Definition: drmk.h:49
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define NonPagedPool
Definition: env_spec_w32.h:307
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
ULONG AddRef()
static PWSTR GuidString
Definition: apphelp.c:93
@ NumMethods
Definition: actctx.c:1556
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
IDrmPort2 * PDRMPORT2
Definition: portcls.h:2228
#define PC_ASSERT_IRQL_EQUAL(x)
Definition: private.hpp:31
#define TAG_PORTCLASS
Definition: private.hpp:24
#define REFIID
Definition: guiddef.h:118
@ Output
Definition: arc.h:85
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
Definition: drmk.h:18
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
* PFILE_OBJECT
Definition: iotypes.h:1998