Don't terminate a cpp_quote statement with a semicolon. New versions of WIDL will...
[reactos.git] / reactos / include / reactos / idl / eventlogrpc.idl
1 /*
2 * Copyright 2005 Saveliy Tretiakov
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19 [
20 uuid(82273FDC-E32A-18C3-3F78-827929DC23EA),
21 version(0.0),
22 pointer_default(unique)
23 #ifndef __midl
24 ,explicit_handle
25 #endif
26 ]
27
28 interface eventlog
29 {
30 cpp_quote("#if 0")
31 #ifdef __midl
32 typedef [handle, unique] wchar_t *LPWSTR;
33 typedef [handle, unique] char *LPSTR;
34 typedef unsigned int NTSTATUS;
35 #else
36 #define LPWSTR wchar_t *
37 #define LPSTR char *
38 #define NTSTATUS long
39 #endif
40
41 #ifdef __midl
42 typedef struct _UNICODE_STRING {
43 unsigned short Length;
44 unsigned short MaximumLength;
45 [size_is(MaximumLength/2), unique] wchar_t *Buffer;
46 } UNICODE_STRING, *PUNICODE_STRING;
47
48 typedef struct _ANSI_STRING {
49 unsigned short Length;
50 unsigned short MaximumLength;
51 [size_is(MaximumLength), unique] char *Buffer;
52 } ANSI_STRING, *PANSI_STRING;
53 #else
54 #define PUNICODE_STRING wchar_t *
55 #define PANSI_STRING char *
56 #endif
57 cpp_quote("#endif")
58
59 #ifdef __midl
60 typedef [context_handle] struct _LOGHANDLE {
61 int pos;
62 } *LOGHANDLE;
63 typedef LOGHANDLE *PLOGHANDLE;
64 #else
65 #define LOGHANDLE unsigned int
66 #define PLOGHANDLE unsigned int*
67 cpp_quote("typedef unsigned int LOGHANDLE, *PLOGHANDLE;")
68 #endif
69
70 /* Function 0x00 */
71 NTSTATUS ElfrClearELFW(
72 #ifndef __midl
73 handle_t BindingHandle,
74 #endif
75 [in] LOGHANDLE Handle,
76 [in] PUNICODE_STRING BackupName);
77
78 /* Function 0x01 */
79 NTSTATUS ElfrBackupELFW(
80 #ifndef __midl
81 handle_t BindingHandle,
82 #endif
83 [in] LOGHANDLE Handle,
84 [in] PUNICODE_STRING BackupName);
85
86 /* Function 0x02 */
87 NTSTATUS ElfrCloseEL(
88 #ifndef __midl
89 handle_t BindingHandle,
90 #endif
91 [in,out] PLOGHANDLE Handle);
92
93 /* Function 0x03 */
94 NTSTATUS ElfrDeregisterEventSource(
95 #ifndef __midl
96 handle_t BindingHandle,
97 #endif
98 [in,out] PLOGHANDLE Handle);
99
100 /* Function 0x04 */
101 NTSTATUS ElfrNumberOfRecords(
102 #ifndef __midl
103 handle_t BindingHandle,
104 #endif
105 [in] LOGHANDLE Handle,
106 [out] long *NumberOfRecords);
107
108 /* Function 0x05 */
109 NTSTATUS ElfrOldestRecord(
110 #ifndef __midl
111 handle_t BindingHandle,
112 #endif
113 [in] LOGHANDLE LogHandle,
114 [out] long *OldestRecNumber);
115
116 /* Function 0x06 */
117 //NTSTATUS ElfrChangeNotify(); // FIXME
118
119 /* Function 0x07 */
120 NTSTATUS ElfrOpenELW(
121 #ifndef __midl
122 handle_t BindingHandle,
123 #endif
124 [in, unique] LPWSTR ServerName,
125 [in] PUNICODE_STRING FileName,
126 [in] PUNICODE_STRING NullStr,
127 [in] long MajorVer,
128 [in] long MinorVer,
129 [out] PLOGHANDLE Handle );
130
131 /* Function 0x08 */
132 NTSTATUS ElfrRegisterEventSourceW(
133 #ifndef __midl
134 handle_t BindingHandle,
135 #endif
136 [in, unique] LPWSTR ServerName,
137 [in] PUNICODE_STRING LogName,
138 [in] PUNICODE_STRING NullStr,
139 [in] long MajorVer,
140 [in] long MinorVer,
141 [out] PLOGHANDLE Handle);
142
143 /* Function 0x09 */
144 NTSTATUS ElfrOpenBELW(
145 #ifndef __midl
146 handle_t BindingHandle,
147 #endif
148 [in, unique] LPWSTR ServerName,
149 [in] PUNICODE_STRING BackupName,
150 [in] long MajorVer,
151 [in] long MinorVer,
152 [out] PLOGHANDLE Handle);
153
154 /* Function 0x0a */
155 NTSTATUS ElfrReadELW(
156 #ifndef __midl
157 handle_t BindingHandle,
158 #endif
159 [in] LOGHANDLE Handle,
160 [in] long Flags,
161 [in] long Offset,
162 [in] long BufSize,
163 [out,size_is(BufSize)] unsigned char *Buffer,
164 [out] long *BytesRead,
165 [out] long *BytesNeeded);
166
167 /* Function 0x0b */
168 NTSTATUS ElfrReportEventW(
169 #ifndef __midl
170 handle_t BindingHandle,
171 #endif
172 [in] LOGHANDLE Handle,
173 [in] long Time,
174 [in] short Type,
175 [in] short Category,
176 [in] long ID,
177 [in] short NumStrings,
178 [in] long DataSize,
179 [in] PUNICODE_STRING ComputerName,
180 [in, unique] unsigned char *SID,
181 #ifdef __midl
182 [in, size_is(NumStrings), unique] PUNICODE_STRING Strings[*],
183 #else
184 [in, size_is(NumStrings), unique] PUNICODE_STRING *Strings,
185 #endif
186 [in, size_is(DataSize), unique] unsigned char *Data,
187 [in] short Flags,
188 [in,out,unique] long *unknown1,
189 [in,out,unique] long *unknown2);
190
191 /* Function 0x0c */
192 NTSTATUS ElfrClearELFA(
193 #ifndef __midl
194 handle_t BindingHandle,
195 #endif
196 [in] LOGHANDLE Handle,
197 [in,unique] PANSI_STRING BackupName);
198
199 /* Function 0x0d */
200 NTSTATUS ElfrBackupELFA(
201 #ifndef __midl
202 handle_t BindingHandle,
203 #endif
204 [in] LOGHANDLE Handle,
205 [in] PANSI_STRING BackupName);
206
207 /* Function 0x0e */
208 NTSTATUS ElfrOpenELA(
209 #ifndef __midl
210 handle_t BindingHandle,
211 #endif
212 [in, unique] LPSTR ServerName,
213 [in] PANSI_STRING LogName,
214 [in] PANSI_STRING NullStr,
215 [in] long MajorVer,
216 [in] long MinorVer,
217 [out] PLOGHANDLE Handle);
218
219 /* Function 0x0f */
220 NTSTATUS ElfrRegisterEventSourceA(
221 #ifndef __midl
222 handle_t BindingHandle,
223 #endif
224 [in, unique] LPSTR ServerName,
225 [in] PANSI_STRING LogName,
226 [in] PANSI_STRING NullStr,
227 [in] long MajorVer,
228 [in] long MinorVer,
229 [out] PLOGHANDLE Handle);
230
231 /* Function 0x10 */
232 NTSTATUS ElfrOpenBELA(
233 #ifndef __midl
234 handle_t BindingHandle,
235 #endif
236 [in, unique] LPSTR ServerName,
237 [in] PANSI_STRING BakckupName,
238 [in] long MajorVer,
239 [in] long MinorVer,
240 [out] PLOGHANDLE Handle);
241
242 /* Function 0x11 */
243 NTSTATUS ElfrReadELA(
244 #ifndef __midl
245 handle_t BindingHandle,
246 #endif
247 [in] LOGHANDLE Handle,
248 [in] long Flags,
249 [in] long Offset,
250 [in] long BufSize,
251 [out,size_is(BufSize)] unsigned char *Buffer,
252 [out] long *BytesRead,
253 [out] long *BytesNeeded);
254
255 /* Function 0x12 */
256 NTSTATUS ElfrReportEventA(
257 #ifndef __midl
258 handle_t BindingHandle,
259 #endif
260 [in] LOGHANDLE Handle,
261 [in] long Time,
262 [in] short Type,
263 [in] short Category,
264 [in] long ID,
265 [in] short NumStrings,
266 [in] long DataSize,
267 [in] PANSI_STRING ComputerName,
268 [in, unique] unsigned char *SID,
269 #ifdef __midl
270 [in, size_is(NumStrings), unique] PANSI_STRING Strings[*],
271 #else
272 [in, size_is(NumStrings), unique] PANSI_STRING *Strings,
273 #endif
274 [in, size_is(DataSize), unique] unsigned char *Data,
275 [in] short Flags,
276 [in,out,unique] long *unknown1,
277 [in,out,unique] long *unknown2);
278
279 /* Function 0x13 */
280 //NTSTATUS ElfrRegisterClusterSvc(); //FIXME
281
282 /* Function 0x14 */
283 //NTSTATUS ElfrDeregisterClusterSvc(); //FIXME
284
285 /* Function 0x15 */
286 //NTSTATUS ElfrWriteClusterEvents(); //FIXME
287
288 /* Function 0x16 */
289 NTSTATUS ElfrGetLogInformation(
290 #ifndef __midl
291 handle_t BindingHandle,
292 #endif
293 [in] LOGHANDLE Handle,
294 [in] long InfoLevel,
295 [out, size_is(BufSize)] unsigned char *Buffer,
296 [in] long BufSize,
297 [out] long *BytesNeeded);
298
299 /* Function 0x17 */
300 NTSTATUS ElfrFlushEL(
301 #ifndef __midl
302 handle_t BindingHandle,
303 #endif
304 [in] LOGHANDLE Handle);
305
306 }