/*
 * Portions of this file Copyright 1999-2005 University of Chicago
 * Portions of this file Copyright 1999-2005 The University of Southern California.
 *
 * This file or a portion of this file is licensed under the
 * terms of the Globus Toolkit Public License, found at
 * http://www.globus.org/toolkit/download/license.html.
 * If you redistribute this file, with or without
 * modifications, you must include this notice in the file.
 */

#ifndef GLOBUS_XSD_TYPE_INFO_H
#define GLOBUS_XSD_TYPE_INFO_H 1

#include "globus_common.h"

EXTERN_C_BEGIN

typedef struct globus_xsd_type_info_s * globus_xsd_type_info_t;

#include "globus_xsd_type_serialization.h"

struct globus_xsd_type_info_s
{
    xsd_QName *                         type;
    globus_xsd_serialize_func_t         serialize;
    globus_xsd_deserialize_func_t       deserialize;
    globus_xsd_init_func_t              initialize;
    globus_xsd_destroy_func_t           destroy;
    globus_xsd_copy_func_t              copy;
    globus_xsd_init_contents_func_t     initialize_contents;
    globus_xsd_destroy_contents_func_t  destroy_contents;
    globus_xsd_copy_contents_func_t     copy_contents;
    size_t                              type_size;
    globus_xsd_array_push_func_t        push;
    globus_xsd_type_info_t              contents_info;
    globus_xsd_type_info_t              array_info;
};

globus_result_t
globus_xsd_type_info_init_from_template(
    globus_xsd_type_info_t *            info,
    const xsd_QName *                   name,
    const globus_xsd_type_info_t        source);

void
globus_xsd_type_info_destroy(
    globus_xsd_type_info_t               info);

EXTERN_C_END

#endif /* GLOBUS_XSD_TYPE_INFO_H */
