Added SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
[samba.git] / source3 / include / rpc_svcctl.h
1 /* 
2    Unix SMB/Netbios implementation.
3    Version 1.9.
4    SMB parameters and setup
5    Copyright (C) Andrew Tridgell 1992-1997
6    Copyright (C) Luke Kenneth Casson Leighton 1996-1997
7    Copyright (C) Paul Ashton 1997
8    
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24 #ifndef _RPC_SVCCTL_H /* _RPC_SVCCTL_H */
25 #define _RPC_SVCCTL_H 
26
27
28 /* svcctl pipe */
29 #define SVC_OPEN_SC_MAN      0x0f
30 #define SVC_ENUM_SVCS_STATUS 0x0e
31 #define SVC_QUERY_SVC_CONFIG 0x11
32 #define SVC_QUERY_DISP_NAME  0x14
33 #define SVC_OPEN_SERVICE     0x10
34 #define SVC_CLOSE            0x00
35
36
37 /* SVC_Q_OPEN_SC_MAN */
38 typedef struct q_svc_open_sc_man_info
39 {
40         uint32 ptr_srv_name;         /* pointer (to server name?) */
41         UNISTR2 uni_srv_name;        /* unicode server name starting with '\\' */
42
43         uint32 ptr_db_name;         /* pointer (to database name?) */
44         UNISTR2 uni_db_name;        /* unicode database name */
45
46         uint32 des_access;            /* 0x80000004 - SC_MANAGER_xxxx */
47
48 } SVC_Q_OPEN_SC_MAN;
49
50 /* SVC_R_OPEN_SC_MAN */
51 typedef struct r_svc_open_sc_man_info
52 {
53         POLICY_HND pol;
54         uint32 status;             /* return status */
55
56 } SVC_R_OPEN_SC_MAN;
57
58 /* SVC_Q_OPEN_SERVICE */
59 typedef struct q_svc_open_service_info
60 {
61         POLICY_HND scman_pol;
62         UNISTR2 uni_svc_name;        /* unicode service name */
63         uint32 des_access;            /* 0x8000 0001 */
64
65 } SVC_Q_OPEN_SERVICE;
66
67 /* SVC_R_OPEN_SERVICE */
68 typedef struct r_svc_open_service_info
69 {
70         POLICY_HND pol;
71         uint32 status;             /* return status */
72
73 } SVC_R_OPEN_SERVICE;
74
75
76 /* QUERY_SERVICE_CONFIG */
77 typedef struct query_service_config_info
78 {
79         uint32 service_type;
80         uint32 start_type;
81         uint32 error_control;
82         uint32 ptr_bin_path_name; 
83         uint32 ptr_load_order_grp; 
84         uint32 tag_id;
85         uint32 ptr_dependencies;
86         uint32 ptr_service_start_name;
87         uint32 ptr_display_name;
88
89         UNISTR2 uni_bin_path_name;
90         UNISTR2 uni_load_order_grp;
91         UNISTR2 uni_dependencies;
92         UNISTR2 uni_service_start_name;
93         UNISTR2 uni_display_name;
94
95 } QUERY_SERVICE_CONFIG;
96
97 /* SVC_STATUS */
98 typedef struct svc_status_info
99 {
100         uint32 svc_type;
101         uint32 current_state;
102         uint32 controls_accepted;
103         uint32 win32_exit_code;
104         uint32 svc_specific_exit_code;
105         uint32 check_point;
106         uint32 wait_hint;
107
108 } SVC_STATUS;
109
110 /* ENUM_SRVC_STATUS */
111 typedef struct enum_svc_status_info
112 {
113         UNISTR uni_srvc_name;
114         UNISTR uni_disp_name;
115         SVC_STATUS status;
116
117 } ENUM_SRVC_STATUS;
118
119 /* SVC_Q_ENUM_SVCS_STATUS */
120 typedef struct q_svc_enum_svcs_status_info
121 {
122         POLICY_HND pol;
123         uint32 service_type; /* 0x00000030 - win32 | 0x0000000b - driver */
124         uint32 service_state; /* 0x00000003 - state_all */
125         uint32 buf_size; /* max service buffer size */
126         ENUM_HND resume_hnd; /* resume handle */
127
128 } SVC_Q_ENUM_SVCS_STATUS;
129
130 /* SVC_R_ENUM_SVCS_STATUS */
131 typedef struct r_svc_enum_svcs_status_info
132 {
133         uint32 buf_size; /* service buffer size */
134         ENUM_SRVC_STATUS *svcs;
135         uint32 more_buf_size;
136         uint32 num_svcs;
137         ENUM_HND resume_hnd; /* resume handle */
138         uint32 dos_status; /* return status, DOS error code (wow!) */
139
140 } SVC_R_ENUM_SVCS_STATUS;
141
142
143 /* SVC_Q_QUERY_SVC_CONFIG */
144 typedef struct q_svc_query_svc_cfg_info
145 {
146         POLICY_HND pol;
147         uint32 buf_size;
148
149 } SVC_Q_QUERY_SVC_CONFIG;
150
151
152 /* SVC_R_QUERY_SVC_CONFIG */
153 typedef struct r_svc_query_svc_cfg_info
154 {
155         QUERY_SERVICE_CONFIG *cfg;
156         uint32 buf_size;
157         uint32 status;             /* return status */
158
159 } SVC_R_QUERY_SVC_CONFIG;
160
161
162 /* SVC_Q_QUERY_DISP_NAME */
163 typedef struct q_svc_query_disp_name_info
164 {
165         POLICY_HND scman_pol;
166         UNISTR2 uni_svc_name;
167         uint32 buf_size;
168
169 } SVC_Q_QUERY_DISP_NAME;
170
171
172 /* SVC_R_QUERY_DISP_NAME */
173 typedef struct r_svc_query_disp_name_info
174 {
175         UNISTR2 uni_disp_name;
176         uint32 buf_size;
177         uint32 status;
178
179 } SVC_R_QUERY_DISP_NAME;
180
181
182 /* SVC_Q_CLOSE */
183 typedef struct q_svc_close_info
184 {
185         POLICY_HND pol;
186
187 } SVC_Q_CLOSE;
188
189
190
191 /* SVC_R_CLOSE */
192 typedef struct r_svc_close_info
193 {
194         POLICY_HND pol;
195         uint32 status;             /* return status */
196
197 } SVC_R_CLOSE;
198
199
200 #endif /* _RPC_SVCCTL_H */
201