[740] | 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 _SERVICES_H /* _SERVICES_H */
|
---|
| 22 | #define _SERVICES_H
|
---|
| 23 |
|
---|
| 24 | #include "../librpc/gen_ndr/svcctl.h"
|
---|
| 25 |
|
---|
| 26 | /* where we assume the location of the service control scripts */
|
---|
| 27 | #define SVCCTL_SCRIPT_DIR "svcctl"
|
---|
| 28 |
|
---|
| 29 | /*
|
---|
| 30 | * dispatch table of functions to handle the =ServiceControl API
|
---|
| 31 | */
|
---|
| 32 |
|
---|
| 33 | typedef struct {
|
---|
| 34 | /* functions for enumerating subkeys and values */
|
---|
| 35 | WERROR (*stop_service)( const char *service, struct SERVICE_STATUS *status );
|
---|
| 36 | WERROR (*start_service) ( const char *service );
|
---|
| 37 | WERROR (*service_status)( const char *service, struct SERVICE_STATUS *status );
|
---|
| 38 | } SERVICE_CONTROL_OPS;
|
---|
| 39 |
|
---|
| 40 | /* structure to store the service handle information */
|
---|
| 41 |
|
---|
| 42 | typedef struct _ServiceInfo {
|
---|
| 43 | uint8 type;
|
---|
| 44 | char *name;
|
---|
| 45 | uint32 access_granted;
|
---|
| 46 | SERVICE_CONTROL_OPS *ops;
|
---|
| 47 | } SERVICE_INFO;
|
---|
| 48 |
|
---|
| 49 | #define SVC_HANDLE_IS_SCM 0x0000001
|
---|
| 50 | #define SVC_HANDLE_IS_SERVICE 0x0000002
|
---|
| 51 | #define SVC_HANDLE_IS_DBLOCK 0x0000003
|
---|
| 52 |
|
---|
| 53 | #endif /* _SERICES_H */
|
---|
| 54 |
|
---|