ReactOS 0.4.15-dev-5666-gc548b97
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#ifndef YDEBUG
12#define NDEBUG
13#endif
14
15#include <debug.h>
16
17class CDrmPort2 : public CUnknownImpl<IDrmPort2>
18{
19public:
21
23 CDrmPort2(IUnknown *OuterUnknown){}
24 virtual ~CDrmPort2(){}
25};
26
30 IN REFIID refiid,
32{
34
35 if (IsEqualGUIDAligned(refiid, IID_IDrmPort) ||
36 IsEqualGUIDAligned(refiid, IID_IDrmPort2) ||
38 {
39 *Output = PVOID(PUNKNOWN(this));
40 PUNKNOWN(*Output)->AddRef();
41 return STATUS_SUCCESS;
42 }
43
45 {
46 DPRINT("IDrmPort2_QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
48 }
50}
51
54CDrmPort2::CreateContentMixed(
55 IN PULONG paContentId,
58{
61}
62
65CDrmPort2::DestroyContent(
66 IN ULONG ContentId)
67{
69 return DrmDestroyContent(ContentId);
70}
71
74CDrmPort2::ForwardContentToFileObject(
75 IN ULONG ContentId,
77{
79}
80
83CDrmPort2::ForwardContentToInterface(
84 IN ULONG ContentId,
87{
90}
91
94CDrmPort2::GetContentRights(
95 IN ULONG ContentId,
97{
99 return DrmGetContentRights(ContentId, DrmRights);
100}
101
103NTAPI
104CDrmPort2::AddContentHandlers(
105 IN ULONG ContentId,
106 IN PVOID * paHandlers,
108{
110 return DrmAddContentHandlers(ContentId, paHandlers, NumHandlers);
111}
112
114NTAPI
115CDrmPort2::ForwardContentToDeviceObject(
116 IN ULONG ContentId,
118 IN PCDRMFORWARD DrmForward)
119{
121 return DrmForwardContentToDeviceObject(ContentId, Reserved, DrmForward);
122}
123
126 OUT PDRMPORT2 *OutPort)
127{
129 if (!This)
131
132 This->AddRef();
133
134 *OutPort = (PDRMPORT2)This;
135 return STATUS_SUCCESS;
136}
137
138
LONG NTSTATUS
Definition: precomp.h:26
#define STDMETHODIMP
Definition: basetyps.h:43
const GUID IID_IUnknown
CDrmPort2(IUnknown *OuterUnknown)
Definition: drm_port.cpp:23
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: drm_port.cpp:29
virtual ~CDrmPort2()
Definition: drm_port.cpp:24
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:125
_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()
unsigned int * PULONG
Definition: retypes.h:1
void * PVOID
Definition: retypes.h:9
unsigned int ULONG
Definition: retypes.h:1
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:71
Definition: drmk.h:18
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
#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