svcctl_scm.h revision b89a8333f5e1f75ec0c269b22524bd2eccb972ba
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SVCCTL_H
#define _SVCCTL_H
#include <libuutil.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Calculate the wide-char equivalent string length required to
* store a string - including the terminating null wide-char.
*/
/* An AVL-storable node representing each service in the SCM database. */
typedef struct svcctl_svc_node {
char *sn_name; /* Service Name (Key) */
char *sn_fmri; /* Display Name (FMRI) */
char *sn_desc; /* Description */
char *sn_state; /* State */
/* This structure provides context for each svcctl_s_OpenManager call. */
typedef struct svcctl_manager_context {
/* This structure provides context for each svcctl_s_OpenService call. */
typedef struct svcctl_service_context {
char *sc_svcname; /* Service Name */
typedef enum {
/* This structure provides abstraction for service and manager context call. */
typedef struct svcctl_context {
union {
void *uc_cp;
} c_ctx;
/* Service Control Manager (SCM) functions */
void svcctl_scm_fini(svcctl_manager_context_t *);
void svcctl_scm_enum_services(svcctl_manager_context_t *, unsigned char *);
uint32_t svcctl_scm_map_status(const char *);
#ifdef __cplusplus
}
#endif
#endif /* _SVCCTL_H */