/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _POOL_XML_IMPL_H
#define _POOL_XML_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* This file contains the definitions of types and supporting
* functions to implement the libpool XML specific data manipulation
* facility.
*
* For more information on the libpool generic data manipulation
* facility, look at pool_impl.h.
*
* The central types for the generic data representation/storage
* facility are here enhanced to provide additional XML specific
* information.
*/
/*
* pool_xml_elem_t is the XML (to be precise, libxml - although this
* could be easily ported to an alternative C-API xml library)
* specific representation of the pool_elem_t structure.
*
* The pxe_node pointer is a pointer to an XML element which
* represents the element in the XML document
*/
typedef struct pool_xml_elem {
/*
* Common to pool_elem_t
*/
void *pxe_pad1;
void *pxe_pad2;
/*
* Common to pool_xml_elem_t
*/
typedef struct pool_xml_resource {
/*
* Common to pool_elem_t
*/
/*
* Specific to pool_resource_t
*/
/*
* Common to pool_xml_elem_t
*/
typedef struct pool_xml_pool {
/*
* Common to pool_elem_t
*/
/*
* Specific to pool_t
*/
/*
* Common to pool_xml_elem_t
*/
/*
* pool_xml_result_set_t is the XML (to be precise, libxml - although
* this could be easily ported to an alternative C-API xml library)
* specific representation of the pool_result_set_t structure.
*
* The pxr_ctx member is a pointer to an XML XPath Context which
* represents the context in which this result set is valid. AN
* alternative way of thinking about this is to envisage the context
* as the root of the search which is used to build the result set.
*
* The pxr_path member is a pointer to the compiled XPath statement
* used to generate this result set.
*
* The prs_index member is a cursor into the result set and is used by
* the various result set functions to determine which result set
* member to access.
*
*/
typedef struct pool_xml_result_set {
/*
* End of common part
*/
/*
* pool_xml_connection_t is the XML (to be precise, libxml - although
* this could be easily ported to an alternative C-API xml library)
* specific representation of the pool_result_set_t structure.
*
* The pxc_doc member is a pointer to an XML document structure which
* contains information about the XML document which acts as the data
* store for this connection.
*
* The pxc_file member is a FILE pointer to the data file used to
* store the XML document.
*
* The pxc_oflags member is the OR'd list of options specified when
* opening this connection.
*
* The pxc_cleanup member is a boolean flag indicating whether a
* configuration has a backup which needs to be cleaned up. This is
* used as a means of providing resilient configuration changes in the
* face of potential failure.
*
*/
typedef struct pool_xml_connection {
const pool_elem_t *, const char *,
pool_component_t **);
/*
* End of common part
*/
#ifdef __cplusplus
}
#endif
#endif /* _POOL_XML_IMPL_H */