/*******************************************************************

Copyright (c) 2004 Open Mobile Alliance, Ltd.  All Rights Reserved.

This software is made available under the usage and distribution terms 
covered by the Common Public License 1.0 and by using this software you
are bound by the terms and conditions of the same.

EXCEPT AS EXPRESSLY SET FORTH IN THE COMMON PUBLIC LICENSE,
THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, 
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, 
ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
   
Each recipient is solely responsible for determining the 
appropriateness of using and distributing this program and assumes 
all risks associated with its exercise of rights under the Common 
Public License, including but not limited to the risks and 
costs of program errors, compliance with applicable laws, 
damage to or loss of data, programs or equipment, and 
unavailability or interruption of operations.

********************************************************************/
/*************************************************************************/
/*  Definitions                                                          */
/*************************************************************************/
#ifdef __SML_XML__
#ifndef _XLT_ENC_XML_H
#define _XLT_ENC_XML_H

#include <smlerr.h>
#include "xlttags.h"
#include "xltenccom.h"

// byte for XML tag begin parentheses
#define XML_BEGPAR '<'

// byte for XML tag end parentheses
#define XML_ENDPAR '>'

// byte for XML tag del
#define XML_TAGDEL '/'

// XML version
#define XML_VERSION "1.0"

// XML encoding
#define XML_ENCODING "UTF-8"

// XML namespaceattribute
#define XML_NSSTART " xmlns='"
#define XML_NSEND   "'"

#ifdef _cplusplus
extern "C" {
#endif

/**
 * FUNCTION: xmlGenerateTag
 *
 * Generates a XML tag
 *
 * PRE-Condition:   valid parameters 
 *
 * POST-Condition:  the XML tag is written to the XML buffer
 *
 * IN:              tagId, the ID for the tag to generate (TN_ADD, ...)
 *                  tagType, the tag type (e.g. Begin Tag -> TT_BEG, ...)
 *
 * IN/OUT:          pBufMgr, pointer to a structure containing buffer management elements
 * 
 * RETURN:          shows error codes of function, 
 *                  0, if OK
 */
Ret_t xmlGenerateTag(XltTagID_t tagId, XltTagType_t tagType, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag);

#ifdef _cplusplus
}
#endif

#endif
#endif