Add prototypes required by samba-gtk.
[metze/samba/wip.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         [todo] NTSTATUS eventlog_ReportEventW();
134
135         /*****************/
136         /* Function 0x0c */
137         [todo] NTSTATUS eventlog_ClearEventLogA();
138         
139         /******************/
140         /* Function: 0x0d */
141         [todo] NTSTATUS eventlog_BackupEventLogA();
142
143         /*****************/
144         /* Function 0x0e */
145         [todo] NTSTATUS eventlog_OpenEventLogA();
146
147         /*****************/
148         /* Function 0x0f */
149         [todo] NTSTATUS eventlog_RegisterEventSourceA();
150
151         /*****************/
152         /* Function 0x10 */
153         [todo] NTSTATUS eventlog_OpenBackupEventLogA();
154
155         /*****************/
156         /* Function 0x11 */
157         [todo] NTSTATUS eventlog_ReadEventLogA();
158
159         /*****************/
160         /* Function 0x12 */
161         [todo] NTSTATUS eventlog_ReportEventA();
162
163         /*****************/
164         /* Function 0x13 */
165         [todo] NTSTATUS eventlog_RegisterClusterSvc();
166
167         /*****************/
168         /* Function 0x14 */
169         [todo] NTSTATUS eventlog_DeregisterClusterSvc();
170
171         /*****************/
172         /* Function 0x15 */
173         [todo] NTSTATUS eventlog_WriteClusterEvents();
174
175         /*****************/
176         /* Function 0x16 */
177         [todo] NTSTATUS eventlog_GetLogIntormation();
178
179         /*****************/
180         /* Function 0x17 */
181         NTSTATUS eventlog_FlushEventLog(
182                 [in] policy_handle *handle
183         );      
184 }