r1617: Start working on the svcctl pipe
[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 ] interface svcctl
11 {
12         typedef struct {
13                 uint32 is_locked;
14                 unistr *lock_owner;
15                 uint32 lock_duration;
16         } SERVICE_LOCK_STATUS;
17
18         typedef struct {
19                 uint32 type;
20                 uint32 state;
21                 uint32 controls_accepted;
22                 uint32 win32_exit_code;
23                 uint32 service_exit_code;
24                 uint32 check_point;
25                 uint32 wait_hint;
26         } SERVICE_STATUS;
27
28         typedef struct {
29                 unistr *service_name;
30                 unistr *display_name;
31                 SERVICE_STATUS status;
32         } ENUM_SERVICE_STATUS;
33
34         typedef enum {
35                 SERVICE_TYPE_KERNEL_DRIVER=0x01,
36                 SERVICE_TYPE_FS_DRIVER=0x02,
37                 SERVICE_TYPE_ADAPTER=0x04,
38                 SERVICE_TYPE_RECOGNIZER_DRIVER=0x08,
39                 SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER,
40                 SERVICE_TYPE_WIN32_OWN_PROCESS=0x10,
41                 SERVICE_TYPE_WIN32_SHARE_PROCESS=0x20,
42                 SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS
43         } ServiceType;
44
45         typedef enum {
46                 SERVICE_STATE_ACTIVE=0x01,
47                 SERVICE_STATE_INACTIVE=0x02,
48                 SERVICE_STATE_ALL=0x03
49         } ServiceState;
50         
51         /*****************/
52         /* Function 0x00 */
53         uint32 svcctl_CloseServiceHandle(
54                                                 [in,out,ref] policy_handle *handle
55                                                 );
56
57         /*****************/
58         /* Function 0x01 */
59
60         WERROR svcctl_ControlService();
61
62         /*****************/
63         /* Function 0x02 */
64         WERROR svcctl_DeleteService();
65
66         /*****************/
67         /* Function 0x03 */
68
69         WERROR svcctl_LockServiceDatabase(
70                                                          [in,ref] policy_handle *handle,
71                                                          [out] policy_handle lock
72                                                         );
73
74         /*****************/
75         /* Function 0x04 */
76         WERROR svcctl_QueryServiceObjectSecurity();
77
78         /*****************/
79         /* Function 0x05 */
80         WERROR svcctl_SetServiceObjectSecurity();
81
82         /*****************/
83         /* Function 0x06 */
84         WERROR svcctl_QueryServiceStatus(
85                                                           [in,ref] policy_handle *handle,
86                                                           [out,ref] SERVICE_STATUS *status);
87
88         /*****************/
89         /* Function 0x07 */
90         WERROR svcctl_SetServiceStatus();
91
92         /*****************/
93         /* Function 0x08 */
94         WERROR svcctl_UnlockServiceDatabase(
95                                                            [in,out,ref] policy_handle *lock
96                                                           );
97
98         /*****************/
99         /* Function 0x09 */
100         WERROR svcctl_NotifyBootConfigStatus();
101
102         /*****************/
103         /* Function 0x0a */
104         WERROR svcctl_SCSetServiceBits();
105
106         /*****************/
107         /* Function 0x0b */
108         WERROR svcctl_ChangeServiceConfig();
109
110         /*****************/
111         /* Function 0x0c */
112         WERROR svcctl_CreateService();
113
114         /*****************/
115         /* Function 0x0d */
116         WERROR svcctl_EnumDependentServices();
117
118         /*****************/
119         /* Function 0x0e */
120         WERROR svcctl_EnumServicesStatus(
121                                                         [in,ref] policy_handle *handle,
122                                                         [in] uint32 type,
123                                                         [in] uint32 state,
124                                                         [out,size_is(buf_size)] ENUM_SERVICE_STATUS *service,
125                                                         [in] uint32 buf_size,
126                                                         [out] uint32 bytes_needed,
127                                                         [out] uint32 services_returned,
128                                                         [in,out] uint32 *resume_handle
129                                                    );
130         /*****************/
131         /* Function 0x0f */
132         WERROR svcctl_OpenSCManager(
133                                            [in] unistr *MachineName,
134                                            [in] unistr *DatabaseName,
135                                            [in] uint32 access_mask,
136                                            [out,ref] policy_handle *handle);
137
138         /*****************/
139         /* Function 0x10 */
140         WERROR svcctl_OpenService();
141
142         /*****************/
143         /* Function 0x11 */
144         WERROR svcctl_QueryServiceConfig();
145
146         /*****************/
147         /* Function 0x12 */
148         WERROR svcctl_QueryServiceLockStatus(
149                 [in,ref] policy_handle *handle,
150                 [in] uint32 buf_size,
151                 [out,ref] SERVICE_LOCK_STATUS *status,
152                 [out,ref] uint32 *required_buf_size
153                 );
154
155         /*****************/
156         /* Function 0x13 */
157         WERROR svcctl_StartService(
158                                                            [in,ref] policy_handle *handle,
159                                                            [in] uint32 NumArgs,
160                                                            [in,length_of(NumArgs)] unistr *Arguments);
161 }