r3285: fixed another IDL typo
[bbaumbach/samba-autobuild/.git] / source4 / librpc / idl / svcctl.idl
1 #include "idl_types.h"
2
3 /*
4   svcctl interface definitions
5 */
6
7 [ uuid("367abb81-9844-35f1-ad32-98f038001003"),
8   version(2.0),
9   pointer_default(unique),
10   endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
11   helpstring("Service Control")
12 ] interface svcctl
13 {
14         typedef struct {
15                 uint32 is_locked;
16                 unistr *lock_owner;
17                 uint32 lock_duration;
18         } SERVICE_LOCK_STATUS;
19
20         typedef struct {
21                 uint32 type;
22                 uint32 state;
23                 uint32 controls_accepted;
24                 uint32 win32_exit_code;
25                 uint32 service_exit_code;
26                 uint32 check_point;
27                 uint32 wait_hint;
28         } SERVICE_STATUS;
29
30         typedef struct {
31                 [relative] astring *service_name;
32                 [relative] astring *display_name;
33                 SERVICE_STATUS status;
34         } ENUM_SERVICE_STATUS;
35
36         const int SERVICE_TYPE_KERNEL_DRIVER       = 0x01;
37         const int SERVICE_TYPE_FS_DRIVER           = 0x02;
38         const int SERVICE_TYPE_ADAPTER             = 0x04;
39         const int SERVICE_TYPE_RECOGNIZER_DRIVER   = 0x08;
40         const int SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER;
41         const int SERVICE_TYPE_WIN32_OWN_PROCESS   = 0x10;
42         const int SERVICE_TYPE_WIN32_SHARE_PROCESS = 0x20;
43         const int SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS;
44
45         const int SERVICE_STATE_ACTIVE   = 0x01;
46         const int SERVICE_STATE_INACTIVE = 0x02;
47         const int SERVICE_STATE_ALL      = 0x00;
48
49         const int SV_TYPE_WORKSTATION       = 0x00000001;
50         const int SV_TYPE_SERVER            = 0x00000002;
51         const int SV_TYPE_DOMAIN_CTRL       = 0x00000008;
52         const int SV_TYPE_DOMAIN_BAKCTRL    = 0x00000010;
53         const int SV_TYPE_TIME_SOURCE       = 0x00000020;
54         const int SV_TYPE_AFP               = 0x00000040;
55         const int SV_TYPE_DOMAIN_MEMBER     = 0x00000100;
56         const int SV_TYPE_PRINTQ_SERVER     = 0x00000200;
57         const int SV_TYPE_DIALIN_SERVER     = 0x00000400;
58         const int SV_TYPE_XENIX_SERVER      = 0x00000800;
59         const int SV_TYPE_SERVER_UNIX       = 0x00000800;
60         const int SV_TYPE_NT                = 0x00001000;
61         const int SV_TYPE_WFW               = 0x00002000;
62         const int SV_TYPE_POTENTIAL_BROWSER = 0x00010000;
63         const int SV_TYPE_BACKUP_BROWSER    = 0x00020000;
64         const int SV_TYPE_MASTER_BROWSER    = 0x00040000;
65         const int SV_TYPE_DOMAIN_MASTER     = 0x00080000;
66         const int SV_TYPE_LOCAL_LIST_ONLY   = 0x40000000;
67         const int SV_TYPE_DOMAIN_ENUM       = 0x80000000;
68         
69         /*****************/
70         /* Function 0x00 */
71         uint32 svcctl_CloseServiceHandle(
72                                                 [in,out,ref] policy_handle *handle
73                                                 );
74
75         /*****************/
76         /* Function 0x01 */
77
78         typedef enum {
79                 FIXME=1
80         } SERVICE_CONTROL;
81         
82         WERROR svcctl_ControlService(
83                                                                  [in,ref] policy_handle *handle,
84                                                                  [in] uint32 control,
85                                                                  [out] SERVICE_STATUS status
86                                                                  );
87
88         /*****************/
89         /* Function 0x02 */
90         WERROR svcctl_DeleteService([in,ref] policy_handle *handle);
91
92         /*****************/
93         /* Function 0x03 */
94
95         WERROR svcctl_LockServiceDatabase(
96                                                          [in,ref] policy_handle *handle,
97                                                          [out] policy_handle lock
98                                                         );
99
100         /*****************/
101         /* Function 0x04 */
102         WERROR svcctl_QueryServiceObjectSecurity();
103
104         /*****************/
105         /* Function 0x05 */
106         WERROR svcctl_SetServiceObjectSecurity();
107
108         /*****************/
109         /* Function 0x06 */
110         WERROR svcctl_QueryServiceStatus(
111                                                           [in,ref] policy_handle *handle,
112                                                           [out,ref] SERVICE_STATUS *status);
113
114         /*****************/
115         /* Function 0x07 */
116         WERROR svcctl_SetServiceStatus();
117
118         /*****************/
119         /* Function 0x08 */
120         WERROR svcctl_UnlockServiceDatabase(
121                                                            [in,out,ref] policy_handle *lock
122                                                           );
123
124         /*****************/
125         /* Function 0x09 */
126         WERROR svcctl_NotifyBootConfigStatus();
127
128         /*****************/
129         /* Function 0x0a */
130         WERROR svcctl_SCSetServiceBitsW(
131                                                                    [in,ref] policy_handle *handle,
132                                                                    [in] uint32 bits,
133                                                                    [in] boolean32 bitson,
134                                                                    [in] boolean32 immediate);
135
136         /*****************/
137         /* Function 0x0b */
138         WERROR svcctl_ChangeServiceConfigW([in,ref] policy_handle *handle,
139                                                                           [in] uint32 type,
140                                                                           [in] uint32 start,
141                                                                           [in] uint32 error,
142                                                                           [in] unistr *binary_path,
143                                                                           [in] unistr *load_order_group,
144                                                                           [out] uint32 tag_id,
145                                                                           [in] unistr *dependencies,
146                                                                           [in] unistr *service_start_name,
147                                                                           [in] unistr *password,
148                                                                           [in] unistr *display_name);
149
150         /*****************/
151         /* Function 0x0c */
152         WERROR svcctl_CreateServiceW([in,ref] policy_handle *handle,
153                                                                 [in] unistr *ServiceName,
154                                                                 [in] unistr *DisplayName,
155                                                                 [in] uint32 desired_access,
156                                                                 [in] uint32 type,
157                                                                 [in] uint32 start_type,
158                                                                 [in] uint32 error_control,
159                                                                 [in] unistr *binary_path,
160                                                                 [in] unistr *LoadOrderGroupKey,
161                                                                 [out] uint32 *TagId,
162                                                                 [in] unistr *dependencies,
163                                                                 [in] unistr *service_start_name,
164                                                                 [in] unistr *password);
165
166         /*****************/
167         /* Function 0x0d */
168         WERROR svcctl_EnumDependentServicesW([in,ref] policy_handle *service,
169                                                                                 [in] uint32 state,
170                                                                                 [out] ENUM_SERVICE_STATUS *status,
171                                                                                 [in] uint32 buf_size,
172                                                                                 [out] uint32 bytes_needed,
173                                                                                 [out] uint32 services_returned);
174
175         /*****************/
176         /* Function 0x0e */
177         WERROR svcctl_EnumServicesStatusW(
178                                                         [in,ref] policy_handle *handle,
179                                                         [in] uint32 type,
180                                                         [in] uint32 state,
181                                                         [in] uint32 buf_size,
182                                                         [out,size_is(buf_size)] uint8 service[*],
183                                                         [out] uint32 bytes_needed,
184                                                         [out] uint32 services_returned,
185                                                         [in,out] uint32 *resume_handle
186                                                    );
187         /*****************/
188         /* Function 0x0f */
189         WERROR svcctl_OpenSCManagerW(
190                                            [in] unistr *MachineName,
191                                            [in] unistr *DatabaseName,
192                                            [in] uint32 access_mask,
193                                            [out,ref] policy_handle *handle);
194
195         /*****************/
196         /* Function 0x10 */
197         WERROR svcctl_OpenServiceW([in,ref] policy_handle *scmanager_handle,
198                                                           [in] unistr *ServiceName,
199                                                           [in] uint32 access_mask);
200
201         /*****************/
202         /* Function 0x11 */
203         WERROR svcctl_QueryServiceConfigW([in,ref] policy_handle *handle,
204                                                                          [out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */
205                                                                          [in] uint32 buf_size,
206                                                                          [out] uint32 bytes_needed
207                                                                          );
208
209         /*****************/
210         /* Function 0x12 */
211         WERROR svcctl_QueryServiceLockStatusW(
212                 [in,ref] policy_handle *handle,
213                 [in] uint32 buf_size,
214                 [out,ref] SERVICE_LOCK_STATUS *status,
215                 [out,ref] uint32 *required_buf_size
216                 );
217
218         /*****************/
219         /* Function 0x13 */
220         WERROR svcctl_StartServiceW(
221                                                            [in,ref] policy_handle *handle,
222                                                            [in] uint32 NumArgs,
223                                                            [in,length_of(NumArgs)] unistr *Arguments);
224
225         /*****************/
226         /* Function 0x14 */
227         WERROR svcctl_GetServiceDisplayNameW([in,ref] policy_handle *handle,
228                                                                                 [in] unistr *service_name,
229                                                                                 [out] unistr *display_name,
230                                                                                 [in,out] uint32 *display_name_length); 
231         /*****************/
232         /* Function 0x15 */
233         WERROR svcctl_GetServiceKeyNameW([in,ref] policy_handle *handle,
234                                                                                 [in] unistr *service_name,
235                                                                                 [out] unistr *key_name,
236                                                                                 [in,out] uint32 *display_name_length);                                                                  
237         /*****************/
238         /* Function 0x16 */
239         WERROR svcctl_SCSetServiceBitsA(
240                                                                    [in,ref] policy_handle *handle,
241                                                                    [in] uint32 bits,
242                                                                    [in] boolean32 bitson,
243                                                                    [in] boolean32 immediate);
244
245         /*****************/
246         /* Function 0x17 */
247         WERROR svcctl_ChangeServiceConfigA([in,ref] policy_handle *handle,
248                                                                           [in] uint32 type,
249                                                                           [in] uint32 start,
250                                                                           [in] uint32 error,
251                                                                           [in] unistr *binary_path,
252                                                                           [in] unistr *load_order_group,
253                                                                           [out] uint32 tag_id,
254                                                                           [in] unistr *dependencies,
255                                                                           [in] unistr *service_start_name,
256                                                                           [in] unistr *password,
257                                                                           [in] unistr *display_name);
258
259         /*****************/
260         /* Function 0x18 */
261         WERROR svcctl_CreateServiceA([in,ref] policy_handle *handle,
262                                                                 [in] unistr *ServiceName,
263                                                                 [in] unistr *DisplayName,
264                                                                 [in] uint32 desired_access,
265                                                                 [in] uint32 type,
266                                                                 [in] uint32 start_type,
267                                                                 [in] uint32 error_control,
268                                                                 [in] unistr *binary_path,
269                                                                 [in] unistr *LoadOrderGroupKey,
270                                                                 [out] uint32 *TagId,
271                                                                 [in] unistr *dependencies,
272                                                                 [in] unistr *service_start_name,
273                                                                 [in] unistr *password);
274
275         /*****************/
276         /* Function 0x19 */
277         WERROR svcctl_EnumDependentServicesA([in,ref] policy_handle *service,
278                                                                                 [in] uint32 state,
279                                                                                 [out] ENUM_SERVICE_STATUS *status,
280                                                                                 [in] uint32 buf_size,
281                                                                                 [out] uint32 bytes_needed,
282                                                                                 [out] uint32 services_returned);
283
284         /*****************/
285         /* Function 0x1a */
286         WERROR svcctl_EnumServicesStatusA(
287                                                         [in,ref] policy_handle *handle,
288                                                         [in] uint32 type,
289                                                         [in] uint32 state,
290                                                         [in] uint32 buf_size,
291                                                         [out,size_is(buf_size)] uint8 service[*],
292                                                         [out] uint32 bytes_needed,
293                                                         [out] uint32 services_returned,
294                                                         [in,out] uint32 *resume_handle
295                                                    );
296         
297         /*****************/
298         /* Function 0x1b */
299         WERROR svcctl_OpenSCManagerA(
300                                            [in] unistr *MachineName,
301                                            [in] unistr *DatabaseName,
302                                            [in] uint32 access_mask,
303                                            [out,ref] policy_handle *handle);
304
305         /*****************/
306         /* Function 0x1c */
307         WERROR svcctl_OpenServiceA([in,ref] policy_handle *scmanager_handle,
308                                                           [in] unistr *ServiceName,
309                                                           [in] uint32 access_mask);
310
311         /*****************/
312         /* Function 0x1d */
313         WERROR svcctl_QueryServiceConfigA([in,ref] policy_handle *handle,
314                                                                          [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
315                                                                          [in] uint32 buf_size,
316                                                                          [out] uint32 bytes_needed
317                                                                          );
318
319         /*****************/
320         /* Function 0x1e */
321         WERROR svcctl_QueryServiceLockStatusA(
322                 [in,ref] policy_handle *handle,
323                 [in] uint32 buf_size,
324                 [out,ref] SERVICE_LOCK_STATUS *status,
325                 [out,ref] uint32 *required_buf_size
326                 );
327
328         /*****************/
329         /* Function 0x1f */
330         WERROR svcctl_StartServiceA(
331                                                            [in,ref] policy_handle *handle,
332                                                            [in] uint32 NumArgs,
333                                                            [in,length_of(NumArgs)] unistr *Arguments);
334
335         /*****************/
336         /* Function 0x20 */
337         WERROR svcctl_GetServiceDisplayNameA([in,ref] policy_handle *handle,
338                                                                                 [in] unistr *service_name,
339                                                                                 [out] unistr *display_name,
340                                                                                 [in,out] uint32 *display_name_length); 
341         /*****************/
342         /* Function 0x21 */
343         WERROR svcctl_GetServiceKeyNameA([in,ref] policy_handle *handle,
344                                                                                 [in] unistr *service_name,
345                                                                                 [out] unistr *key_name,
346                                                                                 [in,out] uint32 *display_name_length);                                                                  
347
348         /*****************/
349         /* Function 0x22 */
350         WERROR svcctl_GetCurrentGroupeStateW();
351
352         /*****************/
353         /* Function 0x23 */
354         WERROR svcctl_EnumServiceGroupW();
355
356         /*****************/
357         /* Function 0x24 */
358         WERROR svcctl_ChangeServiceConfig2A([in,ref] policy_handle *handle,
359                                                                                 [in] uint32 info_level,
360                                                                                 [in] uint8 *info
361                                                                                 );
362
363         /*****************/
364         /* Function 0x25 */
365         WERROR svcctl_ChangeServiceConfig2W([in,ref] policy_handle *handle,
366                                                                                 [in] uint32 info_level,
367                                                                                 [in] uint8 *info);
368
369         /*****************/
370         /* Function 0x26 */
371         WERROR svcctl_QueryServiceConfig2A(
372                                                                           [in,ref] policy_handle *handle,
373                                                                           [in] uint32 info_level,
374                                                                           [out] uint8 buffer[buf_size],
375                                                                           [in] uint32 buf_size,
376                                                                           [out] uint32 bytes_needed);
377
378         /*****************/
379         /* Function 0x27 */
380         WERROR svcctl_QueryServiceConfig2W(
381                                                                           [in,ref] policy_handle *handle,
382                                                                           [in] uint32 info_level,
383                                                                           [out] uint8 buffer[buf_size],
384                                                                           [in] uint32 buf_size,
385                                                                           [out] uint32 bytes_needed);
386
387         /*****************/
388         /* Function 0x28 */
389         WERROR svcctl_QueryServiceStatusEx(
390                                                                            [in,ref] policy_handle *handle,
391                                                                            [in] uint32 info_level,
392                                                                            [out] uint8 buffer[buf_size],
393                                                                            [in] uint32 buf_size,
394                                                                            [out] uint32 bytes_needed);
395
396         /*****************/
397         /* Function 0x29 */
398         WERROR EnumServicesStatusExA(
399                                                                  [in,ref] policy_handle *scmanager,
400                                                                  [in] uint32 info_level,
401                                                                  [in] uint32 type,
402                                                                  [in] uint32 state,
403                                                                  [out] uint8 services[buf_size],
404                                                                  [in] uint32 buf_size,
405                                                                  [out] uint32 bytes_needed,
406                                                                  [out] uint32 service_returned,
407                                                                  [in,out] uint32 *resume_handle, 
408                                                                  [out] unistr *group_name);
409
410         /*****************/
411         /* Function 0x2a */
412         WERROR EnumServicesStatusExW(
413                                                                  [in,ref] policy_handle *scmanager,
414                                                                  [in] uint32 info_level,
415                                                                  [in] uint32 type,
416                                                                  [in] uint32 state,
417                                                                  [out] uint8 services[buf_size],
418                                                                  [in] uint32 buf_size,
419                                                                  [out] uint32 bytes_needed,
420                                                                  [out] uint32 service_returned,
421                                                                  [in,out] uint32 *resume_handle, 
422                                                                  [out] unistr *group_name);
423
424         /*****************/
425         /* Function 0x2b */
426         WERROR svcctl_SCSendTSMessage();
427 }