r3286: filled in more missing SV_TYPE_* defines
[samba.git] / source / 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_SQLSERVER         = 0x00000004;
52         const int SV_TYPE_DOMAIN_CTRL       = 0x00000008;
53         const int SV_TYPE_DOMAIN_BAKCTRL    = 0x00000010;
54         const int SV_TYPE_TIME_SOURCE       = 0x00000020;
55         const int SV_TYPE_AFP               = 0x00000040;
56         const int SV_TYPE_NOVELL            = 0x00000080;
57
58         const int SV_TYPE_DOMAIN_MEMBER     = 0x00000100;
59         const int SV_TYPE_PRINTQ_SERVER     = 0x00000200;
60         const int SV_TYPE_DIALIN_SERVER     = 0x00000400;
61         const int SV_TYPE_SERVER_UNIX       = 0x00000800;
62         const int SV_TYPE_NT                = 0x00001000;
63         const int SV_TYPE_WFW               = 0x00002000;
64         const int SV_TYPE_SERVER_MFPN       = 0x00004000;
65         const int SV_TYPE_SERVER_NT         = 0x00008000;
66         const int SV_TYPE_POTENTIAL_BROWSER = 0x00010000;
67         const int SV_TYPE_BACKUP_BROWSER    = 0x00020000;
68         const int SV_TYPE_MASTER_BROWSER    = 0x00040000;
69         const int SV_TYPE_DOMAIN_MASTER     = 0x00080000;
70         const int SV_TYPE_SERVER_OSF        = 0x00100000;
71         const int SV_TYPE_SERVER_VMS        = 0x00200000;
72         const int SV_TYPE_WIN95_PLUS        = 0x00400000;
73         const int SV_TYPE_DFS_SERVER        = 0x00800000;
74         const int SV_TYPE_ALTERNATE_XPORT   = 0x20000000;
75         const int SV_TYPE_LOCAL_LIST_ONLY   = 0x40000000;
76         const int SV_TYPE_DOMAIN_ENUM       = 0x80000000;
77         const int SV_TYPE_ALL               = 0xFFFFFFFF;
78         
79         /*****************/
80         /* Function 0x00 */
81         uint32 svcctl_CloseServiceHandle(
82                                                 [in,out,ref] policy_handle *handle
83                                                 );
84
85         /*****************/
86         /* Function 0x01 */
87
88         typedef enum {
89                 FIXME=1
90         } SERVICE_CONTROL;
91         
92         WERROR svcctl_ControlService(
93                                                                  [in,ref] policy_handle *handle,
94                                                                  [in] uint32 control,
95                                                                  [out] SERVICE_STATUS status
96                                                                  );
97
98         /*****************/
99         /* Function 0x02 */
100         WERROR svcctl_DeleteService([in,ref] policy_handle *handle);
101
102         /*****************/
103         /* Function 0x03 */
104
105         WERROR svcctl_LockServiceDatabase(
106                                                          [in,ref] policy_handle *handle,
107                                                          [out] policy_handle lock
108                                                         );
109
110         /*****************/
111         /* Function 0x04 */
112         WERROR svcctl_QueryServiceObjectSecurity();
113
114         /*****************/
115         /* Function 0x05 */
116         WERROR svcctl_SetServiceObjectSecurity();
117
118         /*****************/
119         /* Function 0x06 */
120         WERROR svcctl_QueryServiceStatus(
121                                                           [in,ref] policy_handle *handle,
122                                                           [out,ref] SERVICE_STATUS *status);
123
124         /*****************/
125         /* Function 0x07 */
126         WERROR svcctl_SetServiceStatus();
127
128         /*****************/
129         /* Function 0x08 */
130         WERROR svcctl_UnlockServiceDatabase(
131                                                            [in,out,ref] policy_handle *lock
132                                                           );
133
134         /*****************/
135         /* Function 0x09 */
136         WERROR svcctl_NotifyBootConfigStatus();
137
138         /*****************/
139         /* Function 0x0a */
140         WERROR svcctl_SCSetServiceBitsW(
141                                                                    [in,ref] policy_handle *handle,
142                                                                    [in] uint32 bits,
143                                                                    [in] boolean32 bitson,
144                                                                    [in] boolean32 immediate);
145
146         /*****************/
147         /* Function 0x0b */
148         WERROR svcctl_ChangeServiceConfigW([in,ref] policy_handle *handle,
149                                                                           [in] uint32 type,
150                                                                           [in] uint32 start,
151                                                                           [in] uint32 error,
152                                                                           [in] unistr *binary_path,
153                                                                           [in] unistr *load_order_group,
154                                                                           [out] uint32 tag_id,
155                                                                           [in] unistr *dependencies,
156                                                                           [in] unistr *service_start_name,
157                                                                           [in] unistr *password,
158                                                                           [in] unistr *display_name);
159
160         /*****************/
161         /* Function 0x0c */
162         WERROR svcctl_CreateServiceW([in,ref] policy_handle *handle,
163                                                                 [in] unistr *ServiceName,
164                                                                 [in] unistr *DisplayName,
165                                                                 [in] uint32 desired_access,
166                                                                 [in] uint32 type,
167                                                                 [in] uint32 start_type,
168                                                                 [in] uint32 error_control,
169                                                                 [in] unistr *binary_path,
170                                                                 [in] unistr *LoadOrderGroupKey,
171                                                                 [out] uint32 *TagId,
172                                                                 [in] unistr *dependencies,
173                                                                 [in] unistr *service_start_name,
174                                                                 [in] unistr *password);
175
176         /*****************/
177         /* Function 0x0d */
178         WERROR svcctl_EnumDependentServicesW([in,ref] policy_handle *service,
179                                                                                 [in] uint32 state,
180                                                                                 [out] ENUM_SERVICE_STATUS *status,
181                                                                                 [in] uint32 buf_size,
182                                                                                 [out] uint32 bytes_needed,
183                                                                                 [out] uint32 services_returned);
184
185         /*****************/
186         /* Function 0x0e */
187         WERROR svcctl_EnumServicesStatusW(
188                                                         [in,ref] policy_handle *handle,
189                                                         [in] uint32 type,
190                                                         [in] uint32 state,
191                                                         [in] uint32 buf_size,
192                                                         [out,size_is(buf_size)] uint8 service[*],
193                                                         [out] uint32 bytes_needed,
194                                                         [out] uint32 services_returned,
195                                                         [in,out] uint32 *resume_handle
196                                                    );
197         /*****************/
198         /* Function 0x0f */
199         WERROR svcctl_OpenSCManagerW(
200                                            [in] unistr *MachineName,
201                                            [in] unistr *DatabaseName,
202                                            [in] uint32 access_mask,
203                                            [out,ref] policy_handle *handle);
204
205         /*****************/
206         /* Function 0x10 */
207         WERROR svcctl_OpenServiceW([in,ref] policy_handle *scmanager_handle,
208                                                           [in] unistr *ServiceName,
209                                                           [in] uint32 access_mask);
210
211         /*****************/
212         /* Function 0x11 */
213         WERROR svcctl_QueryServiceConfigW([in,ref] policy_handle *handle,
214                                                                          [out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */
215                                                                          [in] uint32 buf_size,
216                                                                          [out] uint32 bytes_needed
217                                                                          );
218
219         /*****************/
220         /* Function 0x12 */
221         WERROR svcctl_QueryServiceLockStatusW(
222                 [in,ref] policy_handle *handle,
223                 [in] uint32 buf_size,
224                 [out,ref] SERVICE_LOCK_STATUS *status,
225                 [out,ref] uint32 *required_buf_size
226                 );
227
228         /*****************/
229         /* Function 0x13 */
230         WERROR svcctl_StartServiceW(
231                                                            [in,ref] policy_handle *handle,
232                                                            [in] uint32 NumArgs,
233                                                            [in,length_of(NumArgs)] unistr *Arguments);
234
235         /*****************/
236         /* Function 0x14 */
237         WERROR svcctl_GetServiceDisplayNameW([in,ref] policy_handle *handle,
238                                                                                 [in] unistr *service_name,
239                                                                                 [out] unistr *display_name,
240                                                                                 [in,out] uint32 *display_name_length); 
241         /*****************/
242         /* Function 0x15 */
243         WERROR svcctl_GetServiceKeyNameW([in,ref] policy_handle *handle,
244                                                                                 [in] unistr *service_name,
245                                                                                 [out] unistr *key_name,
246                                                                                 [in,out] uint32 *display_name_length);                                                                  
247         /*****************/
248         /* Function 0x16 */
249         WERROR svcctl_SCSetServiceBitsA(
250                                                                    [in,ref] policy_handle *handle,
251                                                                    [in] uint32 bits,
252                                                                    [in] boolean32 bitson,
253                                                                    [in] boolean32 immediate);
254
255         /*****************/
256         /* Function 0x17 */
257         WERROR svcctl_ChangeServiceConfigA([in,ref] policy_handle *handle,
258                                                                           [in] uint32 type,
259                                                                           [in] uint32 start,
260                                                                           [in] uint32 error,
261                                                                           [in] unistr *binary_path,
262                                                                           [in] unistr *load_order_group,
263                                                                           [out] uint32 tag_id,
264                                                                           [in] unistr *dependencies,
265                                                                           [in] unistr *service_start_name,
266                                                                           [in] unistr *password,
267                                                                           [in] unistr *display_name);
268
269         /*****************/
270         /* Function 0x18 */
271         WERROR svcctl_CreateServiceA([in,ref] policy_handle *handle,
272                                                                 [in] unistr *ServiceName,
273                                                                 [in] unistr *DisplayName,
274                                                                 [in] uint32 desired_access,
275                                                                 [in] uint32 type,
276                                                                 [in] uint32 start_type,
277                                                                 [in] uint32 error_control,
278                                                                 [in] unistr *binary_path,
279                                                                 [in] unistr *LoadOrderGroupKey,
280                                                                 [out] uint32 *TagId,
281                                                                 [in] unistr *dependencies,
282                                                                 [in] unistr *service_start_name,
283                                                                 [in] unistr *password);
284
285         /*****************/
286         /* Function 0x19 */
287         WERROR svcctl_EnumDependentServicesA([in,ref] policy_handle *service,
288                                                                                 [in] uint32 state,
289                                                                                 [out] ENUM_SERVICE_STATUS *status,
290                                                                                 [in] uint32 buf_size,
291                                                                                 [out] uint32 bytes_needed,
292                                                                                 [out] uint32 services_returned);
293
294         /*****************/
295         /* Function 0x1a */
296         WERROR svcctl_EnumServicesStatusA(
297                                                         [in,ref] policy_handle *handle,
298                                                         [in] uint32 type,
299                                                         [in] uint32 state,
300                                                         [in] uint32 buf_size,
301                                                         [out,size_is(buf_size)] uint8 service[*],
302                                                         [out] uint32 bytes_needed,
303                                                         [out] uint32 services_returned,
304                                                         [in,out] uint32 *resume_handle
305                                                    );
306         
307         /*****************/
308         /* Function 0x1b */
309         WERROR svcctl_OpenSCManagerA(
310                                            [in] unistr *MachineName,
311                                            [in] unistr *DatabaseName,
312                                            [in] uint32 access_mask,
313                                            [out,ref] policy_handle *handle);
314
315         /*****************/
316         /* Function 0x1c */
317         WERROR svcctl_OpenServiceA([in,ref] policy_handle *scmanager_handle,
318                                                           [in] unistr *ServiceName,
319                                                           [in] uint32 access_mask);
320
321         /*****************/
322         /* Function 0x1d */
323         WERROR svcctl_QueryServiceConfigA([in,ref] policy_handle *handle,
324                                                                          [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
325                                                                          [in] uint32 buf_size,
326                                                                          [out] uint32 bytes_needed
327                                                                          );
328
329         /*****************/
330         /* Function 0x1e */
331         WERROR svcctl_QueryServiceLockStatusA(
332                 [in,ref] policy_handle *handle,
333                 [in] uint32 buf_size,
334                 [out,ref] SERVICE_LOCK_STATUS *status,
335                 [out,ref] uint32 *required_buf_size
336                 );
337
338         /*****************/
339         /* Function 0x1f */
340         WERROR svcctl_StartServiceA(
341                                                            [in,ref] policy_handle *handle,
342                                                            [in] uint32 NumArgs,
343                                                            [in,length_of(NumArgs)] unistr *Arguments);
344
345         /*****************/
346         /* Function 0x20 */
347         WERROR svcctl_GetServiceDisplayNameA([in,ref] policy_handle *handle,
348                                                                                 [in] unistr *service_name,
349                                                                                 [out] unistr *display_name,
350                                                                                 [in,out] uint32 *display_name_length); 
351         /*****************/
352         /* Function 0x21 */
353         WERROR svcctl_GetServiceKeyNameA([in,ref] policy_handle *handle,
354                                                                                 [in] unistr *service_name,
355                                                                                 [out] unistr *key_name,
356                                                                                 [in,out] uint32 *display_name_length);                                                                  
357
358         /*****************/
359         /* Function 0x22 */
360         WERROR svcctl_GetCurrentGroupeStateW();
361
362         /*****************/
363         /* Function 0x23 */
364         WERROR svcctl_EnumServiceGroupW();
365
366         /*****************/
367         /* Function 0x24 */
368         WERROR svcctl_ChangeServiceConfig2A([in,ref] policy_handle *handle,
369                                                                                 [in] uint32 info_level,
370                                                                                 [in] uint8 *info
371                                                                                 );
372
373         /*****************/
374         /* Function 0x25 */
375         WERROR svcctl_ChangeServiceConfig2W([in,ref] policy_handle *handle,
376                                                                                 [in] uint32 info_level,
377                                                                                 [in] uint8 *info);
378
379         /*****************/
380         /* Function 0x26 */
381         WERROR svcctl_QueryServiceConfig2A(
382                                                                           [in,ref] policy_handle *handle,
383                                                                           [in] uint32 info_level,
384                                                                           [out] uint8 buffer[buf_size],
385                                                                           [in] uint32 buf_size,
386                                                                           [out] uint32 bytes_needed);
387
388         /*****************/
389         /* Function 0x27 */
390         WERROR svcctl_QueryServiceConfig2W(
391                                                                           [in,ref] policy_handle *handle,
392                                                                           [in] uint32 info_level,
393                                                                           [out] uint8 buffer[buf_size],
394                                                                           [in] uint32 buf_size,
395                                                                           [out] uint32 bytes_needed);
396
397         /*****************/
398         /* Function 0x28 */
399         WERROR svcctl_QueryServiceStatusEx(
400                                                                            [in,ref] policy_handle *handle,
401                                                                            [in] uint32 info_level,
402                                                                            [out] uint8 buffer[buf_size],
403                                                                            [in] uint32 buf_size,
404                                                                            [out] uint32 bytes_needed);
405
406         /*****************/
407         /* Function 0x29 */
408         WERROR EnumServicesStatusExA(
409                                                                  [in,ref] policy_handle *scmanager,
410                                                                  [in] uint32 info_level,
411                                                                  [in] uint32 type,
412                                                                  [in] uint32 state,
413                                                                  [out] uint8 services[buf_size],
414                                                                  [in] uint32 buf_size,
415                                                                  [out] uint32 bytes_needed,
416                                                                  [out] uint32 service_returned,
417                                                                  [in,out] uint32 *resume_handle, 
418                                                                  [out] unistr *group_name);
419
420         /*****************/
421         /* Function 0x2a */
422         WERROR EnumServicesStatusExW(
423                                                                  [in,ref] policy_handle *scmanager,
424                                                                  [in] uint32 info_level,
425                                                                  [in] uint32 type,
426                                                                  [in] uint32 state,
427                                                                  [out] uint8 services[buf_size],
428                                                                  [in] uint32 buf_size,
429                                                                  [out] uint32 bytes_needed,
430                                                                  [out] uint32 service_returned,
431                                                                  [in,out] uint32 *resume_handle, 
432                                                                  [out] unistr *group_name);
433
434         /*****************/
435         /* Function 0x2b */
436         WERROR svcctl_SCSendTSMessage();
437 }