Home | History | Annotate | Download | only in src
      1 /*************************************************************************/
      2 /* module:          The XML Encoder header file                          */
      3 /* file:            xltencxml.h                                          */
      4 /* target system:   All                                                  */
      5 /* target OS:       All                                                  */
      6 /*************************************************************************/
      7 
      8 /*
      9  * Copyright Notice
     10  * Copyright (c) Ericsson, IBM, Lotus, Matsushita Communication
     11  * Industrial Co., Ltd., Motorola, Nokia, Openwave Systems, Inc.,
     12  * Palm, Inc., Psion, Starfish Software, Symbian, Ltd. (2001).
     13  * All Rights Reserved.
     14  * Implementation of all or part of any Specification may require
     15  * licenses under third party intellectual property rights,
     16  * including without limitation, patent rights (such a third party
     17  * may or may not be a Supporter). The Sponsors of the Specification
     18  * are not responsible and shall not be held responsible in any
     19  * manner for identifying or failing to identify any or all such
     20  * third party intellectual property rights.
     21  *
     22  * THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN ARE PROVIDED
     23  * ON AN "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND AND ERICSSON, IBM,
     24  * LOTUS, MATSUSHITA COMMUNICATION INDUSTRIAL CO. LTD, MOTOROLA,
     25  * NOKIA, PALM INC., PSION, STARFISH SOFTWARE AND ALL OTHER SYNCML
     26  * SPONSORS DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
     27  * BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
     28  * HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
     29  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
     30  * SHALL ERICSSON, IBM, LOTUS, MATSUSHITA COMMUNICATION INDUSTRIAL CO.,
     31  * LTD, MOTOROLA, NOKIA, PALM INC., PSION, STARFISH SOFTWARE OR ANY
     32  * OTHER SYNCML SPONSOR BE LIABLE TO ANY PARTY FOR ANY LOSS OF
     33  * PROFITS, LOSS OF BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF
     34  * BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL,
     35  * PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION WITH
     36  * THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED
     37  * OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
     38  *
     39  * The above notice and this paragraph must be included on all copies
     40  * of this document that are made.
     41  *
     42  */
     43 
     44 /*************************************************************************/
     45 /*  Definitions                                                          */
     46 /*************************************************************************/
     47 #ifdef __SML_XML__
     48 #ifndef _XLT_ENC_XML_H
     49 #define _XLT_ENC_XML_H
     50 
     51 #include <smlerr.h>
     52 #include "xlttags.h"
     53 #include "xltenccom.h"
     54 
     55 // byte for XML tag begin parentheses
     56 #define XML_BEGPAR '<'
     57 
     58 // byte for XML tag end parentheses
     59 #define XML_ENDPAR '>'
     60 
     61 // byte for XML tag del
     62 #define XML_TAGDEL '/'
     63 
     64 // XML version
     65 #define XML_VERSION "1.0"
     66 
     67 // XML encoding
     68 #define XML_ENCODING "UTF-8"
     69 
     70 // XML namespaceattribute
     71 #define XML_NSSTART " xmlns='"
     72 #define XML_NSEND   "'"
     73 
     74 #ifdef _cplusplus
     75 extern "C" {
     76 #endif
     77 
     78 /**
     79  * FUNCTION: xmlGenerateTag
     80  *
     81  * Generates a XML tag
     82  *
     83  * PRE-Condition:   valid parameters
     84  *
     85  * POST-Condition:  the XML tag is written to the XML buffer
     86  *
     87  * IN:              tagId, the ID for the tag to generate (TN_ADD, ...)
     88  *                  tagType, the tag type (e.g. Begin Tag -> TT_BEG, ...)
     89  *
     90  * IN/OUT:          pBufMgr, pointer to a structure containing buffer management elements
     91  *
     92  * RETURN:          shows error codes of function,
     93  *                  0, if OK
     94  */
     95 Ret_t xmlGenerateTag(XltTagID_t tagId, XltTagType_t tagType, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag);
     96 
     97 #ifdef _cplusplus
     98 }
     99 #endif
    100 
    101 #endif
    102 #endif
    103