/*
 * 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 _XSD_STRING_H_
#define _XSD_STRING_H_

#include "globus_common.h"

EXTERN_C_BEGIN

typedef char *                          xsd_string;

#include "xsd_QName.h"
#include "globus_xsd_primitives.h"

GLOBUS_XSD_DECLARE_TYPE_FUNCTIONS(xsd_string);
GLOBUS_XSD_DECLARE_ATTR_FUNCTIONS(xsd_string);
GLOBUS_XSD_DECLARE_LIST_FUNCTIONS(xsd_string);

/* initializes xsd_string and assigns str.
 * xsd_string now owns str
 */
globus_result_t
xsd_string_init_cstr(
    xsd_string **                       ip,
    char *                              str);

/* assigns str. xsd_string now owns str */
globus_result_t
xsd_string_init_contents_cstr(
    xsd_string *                        instance,
    char *                              str);

/* initializes xsd_string and assigns duplicate of str */
globus_result_t
xsd_string_copy_cstr(
    xsd_string **                       ip,
    const char *                        str);

/* assigns duplicate of str */
globus_result_t
xsd_string_copy_contents_cstr(
    xsd_string *                        instance,
    const char *                        str);

EXTERN_C_END

#endif /* _XSD_STRING_H_ */
