1 /*************************************************************************/ 2 /* module: Definition of en-/decoder tagtable data */ 3 /* file: XLTTagtbl.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 #ifndef _XLT_TAGTBL_H 45 #define _XLT_TAGTBL_H 46 47 48 /*************************************************************************/ 49 /* Definitions */ 50 /*************************************************************************/ 51 52 #include "xlttags.h" 53 #include "xltdec.h" 54 #include "xltdeccom.h" 55 56 typedef struct Tag_s 57 { 58 XltTagID_t id; 59 Byte_t wbxml; 60 String_t xml; 61 } Tag_t, *TagPtr_t; 62 63 /** 64 * FUNCTION: buildXXX 65 * 66 * These functions each decode one single SyncML element starting at the 67 * current position within the SyncML document. Child elements are build 68 * recursively. 69 * The functions check that the pointer to the memory structures are 70 * NULL when called and return an error otherwise. This will only happen 71 * when a SyncML element contains several child elements of the same type 72 * for which this is not allowed according to the SyncML DTD; e.g. a 73 * SyncHdr with two or more MsgID tags. Items and other list types 74 * are handled separately by the appendXXXList functions (see below). 75 * 76 * PRE-Condition: 77 * ppElem is NULL 78 * The scanner's current token is the start tag (may be 79 * empty) of the SyncML element to be decoded. 80 * 81 * POST-Condition: 82 * The scanner's current token is the end tag (or empty 83 * start tag) of the SyncML element to be decoded. 84 */ 85 /* implemented in xltdec.c! */ 86 Ret_t buildAlert(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 87 #if (defined ATOMIC_RECEIVE || defined SEQUENCE_RECEIVE) 88 Ret_t buildAtomOrSeq(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 89 #endif 90 Ret_t buildChal(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 91 Ret_t buildCred(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 92 Ret_t buildDelete(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 93 Ret_t buildExec(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 94 Ret_t buildGenericCmd(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 95 Ret_t buildItem(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 96 Ret_t buildMap(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 97 Ret_t buildMapItem(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 98 Ret_t buildPCData(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 99 Ret_t buildPCDataList(XltDecoderPtr_t pDecoder, VoidPtr_t *ppPCData); 100 Ret_t buildPutOrGet(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 101 Ret_t buildResults(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 102 #ifdef SEARCH_RECEIVE 103 Ret_t buildSearch(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 104 #endif 105 Ret_t buildStatus(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 106 Ret_t buildSync(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 107 Ret_t buildSyncHdr(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 108 Ret_t buildTargetOrSource(XltDecoderPtr_t pDecoder, VoidPtr_t *ppElem); 109 110 #ifdef NOWSM 111 const // without WSM, the tag table is a global read-only constant 112 #endif 113 TagPtr_t getTagTable(SmlPcdataExtension_t cp); 114 115 #endif /* _XLT_TAGTBL_H */ 116 117