eventlog: fill in IDL for eventlog_GetLogIntormation.
[tprouty/samba.git] / librpc / idl / eventlog.idl
1 #include "idl_types.h"
2
3 /*
4   eventlog interface definition
5 */
6
7 import "lsa.idl", "security.idl";
8
9 [ uuid("82273fdc-e32a-18c3-3f78-827929dc23ea"),
10   version(0.0),
11   helpstring("Event Logger")
12 ] interface eventlog
13 {
14         typedef [bitmap32bit] bitmap {
15                 EVENTLOG_SEQUENTIAL_READ = 0x0001,
16                 EVENTLOG_SEEK_READ       = 0x0002,
17                 EVENTLOG_FORWARDS_READ   = 0x0004,
18                 EVENTLOG_BACKWARDS_READ  = 0x0008
19         } eventlogReadFlags;
20
21         typedef [public] enum {
22                 EVENTLOG_SUCCESS          = 0x0000,
23                 EVENTLOG_ERROR_TYPE       = 0x0001,
24                 EVENTLOG_WARNING_TYPE     = 0x0002,
25                 EVENTLOG_INFORMATION_TYPE = 0x0004,
26                 EVENTLOG_AUDIT_SUCCESS    = 0x0008,
27                 EVENTLOG_AUDIT_FAILURE    = 0x0010
28         } eventlogEventTypes;
29
30         typedef struct {
31                 uint16 unknown0;
32                 uint16 unknown1;
33         } eventlog_OpenUnknown0;
34         
35         typedef [flag(NDR_NOALIGN),public] struct {
36                 uint32 size;
37                 [charset(DOS),value("eLfL")] uint8 reserved[4];
38                 uint32 record_number;
39                 time_t time_generated;
40                 time_t time_written;
41                 uint32 event_id;
42                 eventlogEventTypes event_type;
43                 [range(0,256)] uint16 num_of_strings;
44                 uint16 event_category;
45                 uint16 reserved_flags;
46                 uint32 closing_record_number;
47                 uint32 stringoffset;
48                 [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size;
49                 uint32 sid_offset;
50                 uint32 data_length;
51                 uint32 data_offset;
52                 nstring source_name;
53                 nstring computer_name;
54                 [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid;
55                 nstring strings[num_of_strings];
56                 astring raw_data;
57                 [flag(NDR_ALIGN4)] DATA_BLOB _padding;
58                 [value(size)] uint32 size2;
59         } eventlog_Record;
60
61         /******************/
62         /* Function: 0x00 */
63         NTSTATUS eventlog_ClearEventLogW(
64                 [in] policy_handle *handle,
65                 [in,unique] lsa_String *backupfile
66         );
67
68         /******************/
69         /* Function: 0x01 */
70         [todo] NTSTATUS eventlog_BackupEventLogW();
71         
72         /******************/
73         /* Function: 0x02 */
74         NTSTATUS eventlog_CloseEventLog(
75                 [in,out] policy_handle *handle
76         );
77
78         /******************/
79         /* Function: 0x03 */
80         [todo] NTSTATUS eventlog_DeregisterEventSource();
81
82         /******************/
83         /* Function: 0x04 */
84         NTSTATUS eventlog_GetNumRecords(
85                 [in] policy_handle *handle,
86                 [out,ref] uint32 *number
87         );
88
89         /******************/
90         /* Function: 0x05 */
91         NTSTATUS eventlog_GetOldestRecord(
92                 [in] policy_handle *handle,
93                 [out,ref] uint32 *oldest_entry
94         );
95
96         /******************/
97         /* Function: 0x06 */
98         [todo] NTSTATUS eventlog_ChangeNotify();
99
100         /******************/
101         /* Function: 0x07 */
102         NTSTATUS eventlog_OpenEventLogW(
103                 [in,unique]         eventlog_OpenUnknown0 *unknown0,
104                 [in,ref]    lsa_String *logname,
105                 [in,ref]    lsa_String *servername,
106                 [in]        uint32 major_version,
107                 [in]        uint32 minor_version,
108                 [out]   policy_handle *handle
109         );
110
111         /******************/
112         /* Function: 0x08 */
113         [todo] NTSTATUS eventlog_RegisterEventSourceW();
114
115         /******************/
116         /* Function: 0x09 */
117         [todo] NTSTATUS eventlog_OpenBackupEventLogW();
118
119         /******************/
120         /* Function: 0x0a */
121         NTSTATUS eventlog_ReadEventLogW(
122                 [in] policy_handle *handle,
123                 [in] eventlogReadFlags flags,
124                 [in] uint32 offset,
125                 [in] [range(0,0x7FFFF)] uint32 number_of_bytes,
126                 [out,ref,size_is(number_of_bytes)] uint8 *data,
127                 [out,ref] uint32 *sent_size,
128                 [out,ref] uint32 *real_size
129         );
130
131         /*****************/
132         /* Function 0x0b */
133         NTSTATUS eventlog_ReportEventW(
134                 [in] policy_handle *handle,
135                 [in] time_t timestamp,
136                 [in] eventlogEventTypes event_type,
137                 [in] uint16 event_category,
138                 [in] uint32 event_id,
139                 [in] [range(0,256)] uint16 num_of_strings,
140                 [in] [range(0,0x3FFFF)] uint32 data_size,
141                 [in,ref] lsa_String *servername,
142                 [in,unique] dom_sid *user_sid,
143                 [in,unique] [size_is(num_of_strings)] lsa_String **strings,
144                 [in,unique] [size_is(data_size)] uint8 *data,
145                 [in] uint16 flags,
146                 [in,out,unique] uint32 *record_number,
147                 [in,out,unique] time_t *time_written
148                 );
149
150         /*****************/
151         /* Function 0x0c */
152         [todo] NTSTATUS eventlog_ClearEventLogA();
153         
154         /******************/
155         /* Function: 0x0d */
156         [todo] NTSTATUS eventlog_BackupEventLogA();
157
158         /*****************/
159         /* Function 0x0e */
160         [todo] NTSTATUS eventlog_OpenEventLogA();
161
162         /*****************/
163         /* Function 0x0f */
164         [todo] NTSTATUS eventlog_RegisterEventSourceA();
165
166         /*****************/
167         /* Function 0x10 */
168         [todo] NTSTATUS eventlog_OpenBackupEventLogA();
169
170         /*****************/
171         /* Function 0x11 */
172         [todo] NTSTATUS eventlog_ReadEventLogA();
173
174         /*****************/
175         /* Function 0x12 */
176         [todo] NTSTATUS eventlog_ReportEventA();
177
178         /*****************/
179         /* Function 0x13 */
180         [todo] NTSTATUS eventlog_RegisterClusterSvc();
181
182         /*****************/
183         /* Function 0x14 */
184         [todo] NTSTATUS eventlog_DeregisterClusterSvc();
185
186         /*****************/
187         /* Function 0x15 */
188         [todo] NTSTATUS eventlog_WriteClusterEvents();
189
190         /*****************/
191         /* Function 0x16 */
192
193         typedef struct {
194                 boolean32 full;
195         } EVENTLOG_FULL_INFORMATION;
196
197         NTSTATUS eventlog_GetLogIntormation(
198                 [in] policy_handle *handle,
199                 [in] uint32 level,
200                 [out,ref] [size_is(buf_size)] uint8 *buffer,
201                 [in] [range(0,1024)] uint32 buf_size,
202                 [out,ref] uint32 *bytes_needed
203                 );
204
205         /*****************/
206         /* Function 0x17 */
207         NTSTATUS eventlog_FlushEventLog(
208                 [in] policy_handle *handle
209         );      
210 }