1 /* 2 ReactOS Kernel Streaming 3 Digital Rights Management 4 5 Author: Andrew Greenwood 6 */ 7 8 #ifndef DRMK_H 9 #define DRMK_H 10 11 typedef struct { 12 DWORD Flags; 13 PDEVICE_OBJECT DeviceObject; 14 PFILE_OBJECT FileObject; 15 PVOID Context; 16 } DRMFORWARD, *PDRMFORWARD, *PCDRMFORWARD; 17 18 typedef struct { 19 BOOL CopyProtect; 20 ULONG Reserved; 21 BOOL DigitalOutputDisable; 22 } DRMRIGHTS, *PDRMRIGHTS; 23 24 typedef const DRMRIGHTS *PCDRMRIGHTS; 25 26 /* =============================================================== 27 Digital Rights Management Functions 28 TODO: Check calling convention 29 */ 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 _IRQL_requires_max_(PASSIVE_LEVEL) 36 NTSTATUS 37 NTAPI 38 DrmAddContentHandlers( 39 _In_ ULONG ContentId, 40 _In_reads_(NumHandlers) PVOID *paHandlers, 41 _In_ ULONG NumHandlers); 42 43 _IRQL_requires_max_(PASSIVE_LEVEL) 44 NTSTATUS 45 NTAPI 46 DrmCreateContentMixed( 47 _In_ PULONG paContentId, 48 _In_ ULONG cContentId, 49 _Out_ PULONG pMixedContentId); 50 51 _IRQL_requires_max_(PASSIVE_LEVEL) 52 NTSTATUS 53 NTAPI 54 DrmDestroyContent( 55 _In_ ULONG ContentId); 56 57 NTSTATUS 58 NTAPI 59 DrmForwardContentToDeviceObject( 60 _In_ ULONG ContentId, 61 _In_opt_ PVOID Reserved, 62 _In_ PCDRMFORWARD DrmForward); 63 64 _IRQL_requires_max_(PASSIVE_LEVEL) 65 NTSTATUS 66 NTAPI 67 DrmForwardContentToFileObject( 68 _In_ ULONG ContentId, 69 _In_ PFILE_OBJECT FileObject); 70 71 _IRQL_requires_max_(PASSIVE_LEVEL) 72 NTSTATUS 73 NTAPI 74 DrmForwardContentToInterface( 75 _In_ ULONG ContentId, 76 _In_ PUNKNOWN pUnknown, 77 _In_ ULONG NumMethods); 78 79 _IRQL_requires_max_(PASSIVE_LEVEL) 80 NTSTATUS 81 NTAPI 82 DrmGetContentRights( 83 _In_ ULONG ContentId, 84 _Out_ PDRMRIGHTS DrmRights); 85 86 #ifdef __cplusplus 87 } 88 #endif 89 90 DEFINE_GUID(IID_IDrmAudioStream, 91 0x1915c967, 0x3299, 0x48cb, 0xa3, 0xe4, 0x69, 0xfd, 0x1d, 0x1b, 0x30, 0x6e); 92 93 #undef INTERFACE 94 #define INTERFACE IDrmAudioStream 95 96 DECLARE_INTERFACE_(IDrmAudioStream, IUnknown) { 97 STDMETHOD_(NTSTATUS, QueryInterface)(THIS_ 98 _In_ REFIID InterfaceId, 99 _Out_ PVOID* Interface 100 ) PURE; 101 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 102 STDMETHOD_(ULONG,Release)(THIS) PURE; 103 STDMETHOD_(NTSTATUS,SetContentId)(THIS_ 104 _In_ ULONG ContentId, 105 _In_ PCDRMRIGHTS DrmRights 106 ) PURE; 107 }; 108 109 typedef IDrmAudioStream *PDRMAUDIOSTREAM; 110 111 #define IMP_IDrmAudioStream \ 112 STDMETHODIMP_(NTSTATUS) SetContentId( \ 113 _In_ ULONG ContentId, \ 114 _In_ PCDRMRIGHTS DrmRights); 115 116 #endif /* DRMK_H */ 117