b12cecb56cd2dacb0920883c1e127a382e9eb4e7
[amitay/samba.git] / source3 / include / rpc_svcctl.h
1 /* 
2    Unix SMB/CIFS implementation.
3    SMB parameters and setup
4    Copyright (C) Andrew Tridgell              1992-1997,
5    Copyright (C) Gerald (Jerry) Carter        2005
6    
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef _RPC_SVCCTL_H /* _RPC_SVCCTL_H */
22 #define _RPC_SVCCTL_H 
23
24 /* svcctl pipe */
25
26 #define SVCCTL_CLOSE_SERVICE                    0x00
27 #define SVCCTL_CONTROL_SERVICE                  0x01
28 #define SVCCTL_LOCK_SERVICE_DB                  0x03
29 #define SVCCTL_QUERY_SERVICE_SEC                0x04
30 #define SVCCTL_SET_SERVICE_SEC                  0x05
31 #define SVCCTL_QUERY_STATUS                     0x06
32 #define SVCCTL_UNLOCK_SERVICE_DB                0x08
33 #define SVCCTL_ENUM_DEPENDENT_SERVICES_W        0x0d
34 #define SVCCTL_ENUM_SERVICES_STATUS_W           0x0e
35 #define SVCCTL_OPEN_SCMANAGER_W                 0x0f
36 #define SVCCTL_OPEN_SERVICE_W                   0x10
37 #define SVCCTL_QUERY_SERVICE_CONFIG_W           0x11
38 #define SVCCTL_START_SERVICE_W                  0x13
39 #define SVCCTL_GET_DISPLAY_NAME                 0x14
40 #define SVCCTL_QUERY_SERVICE_CONFIG2_W          0x27
41 #define SVCCTL_QUERY_SERVICE_STATUSEX_W         0x28
42
43 /* ANSI versions not implemented currently 
44 #define SVCCTL_ENUM_SERVICES_STATUS_A           0x0e
45 #define SVCCTL_OPEN_SCMANAGER_A                 0x1b
46 */
47
48 /* utility structures for RPCs */
49
50 typedef struct {
51         UNISTR servicename;
52         UNISTR displayname;
53         struct SERVICE_STATUS status;
54 } ENUM_SERVICES_STATUS;
55
56 /* rpc structures */
57
58 /**************************/
59
60 typedef struct {
61         POLICY_HND handle;
62         uint32 type;
63         uint32 state;
64         uint32 buffer_size;
65         uint32 *resume;
66 } SVCCTL_Q_ENUM_SERVICES_STATUS;
67
68 typedef struct {
69         RPC_BUFFER buffer;
70         uint32 needed;
71         uint32 returned;
72         uint32 *resume;
73         WERROR status;
74 } SVCCTL_R_ENUM_SERVICES_STATUS;
75
76 #endif /* _RPC_SVCCTL_H */
77