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 | NTSTATUS
|
---|
36 | NTAPI
|
---|
37 | DrmAddContentHandlers(
|
---|
38 | IN ULONG ContentId,
|
---|
39 | IN PVOID *paHandlers,
|
---|
40 | IN ULONG NumHandlers);
|
---|
41 |
|
---|
42 | NTSTATUS
|
---|
43 | NTAPI
|
---|
44 | DrmCreateContentMixed(
|
---|
45 | IN PULONG paContentId,
|
---|
46 | IN ULONG cContentId,
|
---|
47 | OUT PULONG pMixedContentId);
|
---|
48 |
|
---|
49 | NTSTATUS
|
---|
50 | NTAPI
|
---|
51 | DrmDestroyContent(
|
---|
52 | IN ULONG ContentId);
|
---|
53 |
|
---|
54 | NTSTATUS
|
---|
55 | NTAPI
|
---|
56 | DrmForwardContentToDeviceObject(
|
---|
57 | IN ULONG ContentId,
|
---|
58 | IN PVOID Reserved,
|
---|
59 | IN PCDRMFORWARD DrmForward);
|
---|
60 |
|
---|
61 | NTSTATUS
|
---|
62 | NTAPI
|
---|
63 | DrmForwardContentToFileObject(
|
---|
64 | IN ULONG ContentId,
|
---|
65 | IN PFILE_OBJECT FileObject);
|
---|
66 |
|
---|
67 | NTSTATUS
|
---|
68 | NTAPI
|
---|
69 | DrmForwardContentToInterface(
|
---|
70 | IN ULONG ContentId,
|
---|
71 | IN PUNKNOWN pUnknown,
|
---|
72 | IN ULONG NumMethods);
|
---|
73 |
|
---|
74 | NTSTATUS
|
---|
75 | NTAPI
|
---|
76 | DrmGetContentRights(
|
---|
77 | IN ULONG ContentId,
|
---|
78 | OUT PDRMRIGHTS DrmRights);
|
---|
79 |
|
---|
80 | #ifdef __cplusplus
|
---|
81 | }
|
---|
82 | #endif
|
---|
83 |
|
---|
84 |
|
---|
85 | DEFINE_GUID(IID_IDrmAudioStream,
|
---|
86 | 0x1915c967, 0x3299, 0x48cb, 0xa3, 0xe4, 0x69, 0xfd, 0x1d, 0x1b, 0x30, 0x6e);
|
---|
87 |
|
---|
88 | #undef INTERFACE
|
---|
89 | #define INTERFACE IDrmAudioStream
|
---|
90 |
|
---|
91 | DECLARE_INTERFACE_(IDrmAudioStream, IUnknown)
|
---|
92 | {
|
---|
93 | STDMETHOD_(NTSTATUS, QueryInterface)(THIS_
|
---|
94 | REFIID InterfaceId,
|
---|
95 | PVOID* Interface
|
---|
96 | ) PURE;
|
---|
97 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
98 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
99 | STDMETHOD_(NTSTATUS,SetContentId)(THIS_
|
---|
100 | IN ULONG ContentId,
|
---|
101 | IN PCDRMRIGHTS DrmRights) PURE;
|
---|
102 | };
|
---|
103 |
|
---|
104 | typedef IDrmAudioStream *PDRMAUDIOSTREAM;
|
---|
105 |
|
---|
106 | #define IMP_IDrmAudioStream \
|
---|
107 | STDMETHODIMP_(NTSTATUS) SetContentId \
|
---|
108 | ( IN ULONG ContentId, \
|
---|
109 | IN PCDRMRIGHTS DrmRights \
|
---|
110 | );
|
---|
111 |
|
---|
112 |
|
---|
113 | #endif /* DRMK_H */
|
---|
114 |
|
---|