From: Kidong L. <bri...@us...> - 2004-05-24 01:34:28
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631/src/sml/xlt/all Modified Files: xltdec.c xltdeccom.h xltdecwbxml.c xltdecwbxml.h xltdecxml.c xltdevinf.c xltdevinf.h xltenc.c xltenccom.c xltenccom.h xltencwbxml.c xltencwbxml.h xltencxml.c xltencxml.h xltmetinf.c xltmetinf.h xlttags.c xlttags.h xlttagtbl.h xltutilstack.c xltutilstack.h Log Message: Modified comments to doxygen-readable Removed duplicated comments Index: xltenccom.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltenccom.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xltenccom.c 14 Aug 2003 12:48:42 -0000 1.3 --- xltenccom.c 24 May 2004 01:33:39 -0000 1.4 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: Encoder utils file */ ! /* file: xltenccom.c */ ! /* target system: All */ ! /* target OS: All */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * Encoder utils file ! * ! * @target_system All ! * @target_os All ! */ /* *************** *** 53,72 **** /** - * FUNCTION: xltAddToBuffer - * * Add a string to the global buffer * ! * PRE-Condition: pContent contains some content bytes to write to the (WB) XML buffer ! * ! * POST-Condition: content is written to the buffer ! * ! * IN: pContent, the character pointer referencing the content to ! * write to the buffer ! * size, the content length ! * ! * IN/OUT: pBufMgr, pointer to a structure containing buffer management elements ! * ! * RETURN: shows error codes of function, ! * 0, if OK */ Ret_t xltAddToBuffer(const MemPtr_t pContent, MemSize_t size, BufferMgmtPtr_t pBufMgr) --- 54,69 ---- /** * Add a string to the global buffer * ! * @pre pContent contains some content bytes to write to the (WB) XML buffer ! * @post content is written to the buffer ! * @param pContent (IN) ! * the character pointer referencing the content to write to the buffer ! * @param size (IN) ! * the content length ! * @param pBufMgr (IN/OUT) ! * pointer to a structure containing buffer management elements ! * @return shows error codes of function,\n ! * 0, if OK */ Ret_t xltAddToBuffer(const MemPtr_t pContent, MemSize_t size, BufferMgmtPtr_t pBufMgr) Index: xltdevinf.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltdevinf.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xltdevinf.h 6 Aug 2002 20:42:51 -0000 1.1 --- xltdevinf.h 24 May 2004 01:33:39 -0000 1.2 *************** *** 1,9 **** ! /*************************************************************************/ ! /* module: Definition of DevInf DTD prototypefunctions */ ! /* for the en-/decoder */ ! /* file: xltdevinf.h */ ! /* target system: all */ ! /* target OS: all */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * Definition of DevInf DTD prototypefunctions for the en-/decoder ! * ! * @target_system all ! * @target_os all ! */ /* Index: xltdecwbxml.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltdecwbxml.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xltdecwbxml.c 14 Nov 2003 09:43:26 -0000 1.3 --- xltdecwbxml.c 24 May 2004 01:33:39 -0000 1.4 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: WBXML decoder */ ! /* file: XLTDecWbxml.c */ ! /* target system: all */ ! /* target OS: all */ ! /*************************************************************************/ /* --- 1,11 ---- ! /** ! * @file ! * WBXML decoder ! * ! * @target_system all ! * @target_os all ! * @description The WBXML scanner/tokenizer. Used by the SyncML parser. ! */ ! /* *************** *** 42,49 **** */ - /** - * The WBXML scanner/tokenizer. Used by the SyncML parser. - */ - #include "syncml_tk_prefix_file.h" // %%% luz: needed for precompiled headers in eVC++ --- 45,48 ---- *************** *** 108,111 **** --- 107,112 ---- + /** @copydoc wbxmlScannerPriv_s */ + typedef struct wbxmlScannerPriv_s wbxmlScannerPriv_t, *wbxmlScannerPrivPtr_t; /** * Private Interface for the WBXML scanner. *************** *** 116,120 **** * scanner module. */ - typedef struct wbxmlScannerPriv_s wbxmlScannerPriv_t, *wbxmlScannerPrivPtr_t; struct wbxmlScannerPriv_s { --- 117,120 ---- *************** *** 127,156 **** /* public attributes */ ! XltDecTokenPtr_t curtok; /* current token */ ! Long_t charset; /* character set as specified in the WBXML header */ ! String_t charsetStr; /* NULL */ ! Long_t pubID; /* document public identifier as specified in the WBXML header */ ! String_t pubIDStr; /* pubID as a string - valid only when pubID == 0 */ ! Flag_t finished; /* set when end of buffer is reached */ /* private attributes */ ! MemPtr_t pos; /* current buffer position */ ! MemPtr_t bufend; /* end of buffer */ ! Long_t pubIDIdx; /* strtbl index of the string version of the pubID - valid only when pubID == 0 */ ! XltUtilStackPtr_t tagstack; /* stack of open start tags */ ! MemPtr_t strtbl; /* copy of the string table */ ! Long_t strtbllen; /* length of the string table */ ! Byte_t state; /* tag state or attribute state */ ! SmlPcdataExtension_t cptag; /* current codepage for tags */ ! Byte_t cpattr; /* current codepage for attributes */ ! SmlPcdataExtension_t activeExt; /* the active Sub DTD */ }; --- 127,156 ---- /* public attributes */ ! XltDecTokenPtr_t curtok; /**< current token */ ! Long_t charset; /**< character set as specified in the WBXML header */ ! String_t charsetStr; /**< NULL */ ! Long_t pubID; /**< document public identifier as specified in the WBXML header */ ! String_t pubIDStr; /**< pubID as a string - valid only when pubID == 0 */ ! Flag_t finished; /**< set when end of buffer is reached */ /* private attributes */ ! MemPtr_t pos; /**< current buffer position */ ! MemPtr_t bufend; /**< end of buffer */ ! Long_t pubIDIdx; /**< strtbl index of the string version of the pubID - valid only when pubID == 0 */ ! XltUtilStackPtr_t tagstack; /**< stack of open start tags */ ! MemPtr_t strtbl; /**< copy of the string table */ ! Long_t strtbllen; /**< length of the string table */ ! Byte_t state; /**< tag state or attribute state */ ! SmlPcdataExtension_t cptag; /**< current codepage for tags */ ! Byte_t cpattr; /**< current codepage for attributes */ ! SmlPcdataExtension_t activeExt; /**< the active Sub DTD */ }; *************** *** 159,163 **** typedef Long_t MBINT; ! /** * Public methods of the scanner interface. * --- 159,163 ---- typedef Long_t MBINT; ! /* * Public methods of the scanner interface. * *************** *** 171,200 **** /** - * FUNCTION: readBytes - * * Advance the current position pointer after checking whether the end of * the buffer has been reached. If the end of the buffer has been reached * the scanner's finished flag is set. ! ! * RETURNS: 0, if end of buffer has been reached ! * 1 otherwise */ static Boolean_t readBytes(wbxmlScannerPrivPtr_t pScanner, Long_t bytes); /** - * FUNCTION: parseInt - * * Decodes multi-byte integers. * ! * PRE-Condition: ! * pScanner->pos points to the first byte of the mb_int. ! * ! * POST-Condition: ! * pScanner->pos points to the last byte of the mb_int. */ static Ret_t parseInt(wbxmlScannerPrivPtr_t pScanner, MBINT *mbi); /** ! * FUNCTION: wbxmlHeader, wbxmlVersion, wbxmlPublicID, wbxmlCharset * * These functions are used for decoding the WBXML document header. --- 171,193 ---- /** * Advance the current position pointer after checking whether the end of * the buffer has been reached. If the end of the buffer has been reached * the scanner's finished flag is set. ! * ! * @return 0, if end of buffer has been reached ! * 1 otherwise */ static Boolean_t readBytes(wbxmlScannerPrivPtr_t pScanner, Long_t bytes); /** * Decodes multi-byte integers. * ! * @pre pScanner->pos points to the first byte of the mb_int. ! * @post pScanner->pos points to the last byte of the mb_int. */ static Ret_t parseInt(wbxmlScannerPrivPtr_t pScanner, MBINT *mbi); /** ! * wbxmlHeader, wbxmlVersion, wbxmlPublicID, wbxmlCharset * * These functions are used for decoding the WBXML document header. *************** *** 210,215 **** /** - * FUNCTION: wbxmlSwitchPage - * * Switch WBXML code page */ --- 203,206 ---- *************** *** 217,234 **** /** ! * FUNCTION: wbxmlXXXToken * * Scan the document for the next valid XML/WBXML token as defined in the * XLTDecCom header file (e.g. TOK_TAG_START). * ! * PRE-Condition: ! * pScanner->pos points to the first byte of a valid WBXML ! * element (String, Tag, etc.) ! * ! * POST-Condition: ! * pScanner->pos points to the last byte of the WBXML ! * element; ! * pScanner->curtok contains type and tagid or pcdata of ! * the token */ static Ret_t wbxmlStringToken(wbxmlScannerPrivPtr_t pScanner); --- 208,220 ---- /** ! * wbxmlXXXToken * * Scan the document for the next valid XML/WBXML token as defined in the * XLTDecCom header file (e.g. TOK_TAG_START). * ! * @pre pScanner->pos points to the first byte of a valid WBXML ! * element (String, Tag, etc.) ! * @post pScanner->pos points to the last byte of the WBXML element; ! * pScanner->curtok contains type and tagid or pcdata of the token */ static Ret_t wbxmlStringToken(wbxmlScannerPrivPtr_t pScanner); *************** *** 237,241 **** /** ! * FUNCTION: wbxmlXXXToken * * WBXML extensions, entities, processing instructions and attributes are --- 223,227 ---- /** ! * wbxmlSkipXXX * * WBXML extensions, entities, processing instructions and attributes are *************** *** 252,258 **** /*************************************************************************/ ! /** ! * FUNCTION: XltDecWbxmlInit ! * * Create and initialize a new WBXML scanner. Description see XLTDec.h. */ --- 238,242 ---- /*************************************************************************/ ! /* * Create and initialize a new WBXML scanner. Description see XLTDec.h. */ *************** *** 304,309 **** /** - * FUNCTION: destroy - * * Free memory. Description see XltDecAll.h. */ --- 288,291 ---- *************** *** 327,332 **** /** - * FUNCTION: nextTok - * * Get next token. */ --- 309,312 ---- *************** *** 370,375 **** /** - * FUNCTION: pushTok - * * Reset the scanner to the starting position of the current token within * the buffer. --- 350,353 ---- *************** *** 429,435 **** /*************************************************************************/ ! /** ! * FUNCTION: readBytes ! * * Advance the position pointer. Description see above. */ --- 407,411 ---- /*************************************************************************/ ! /* * Advance the position pointer. Description see above. */ *************** *** 445,449 **** } ! /** * NOTICE: Entities, Extensions, Processing Instructions and Attributes * are not supported by the WBXML scanner. --- 421,425 ---- } ! /* * NOTICE: Entities, Extensions, Processing Instructions and Attributes * are not supported by the WBXML scanner. *************** *** 456,462 **** */ ! /** ! * FUNCTION: wbxmlHeader ! * * Decode the WBXML header containing version number, document public * identifier, character set and a string table. --- 432,436 ---- */ ! /* * Decode the WBXML header containing version number, document public * identifier, character set and a string table. *************** *** 480,485 **** /** - * FUNCTION: wbxmlVersion - * * Decode WBXML version. The scanner returns an error if the major version * of the document differs from the major version this scanner supports or --- 454,457 ---- *************** *** 507,512 **** /** - * FUNCTION: wbxmlPublicID - * * Decodes WBXML Document Public Identifier. */ --- 479,482 ---- *************** *** 540,545 **** /** - * FUNCTION: wbxmlCharset - * * Decode WBXML Charset. */ --- 510,513 ---- *************** *** 564,569 **** /** - * FUNCTION: wbxmlStrtbl - * * Keep a copy of the string table. */ --- 532,535 ---- *************** *** 810,816 **** } ! /** ! * FUNCTION: wbxmlSwitchPage ! * * Switch WBXML code page. */ --- 776,780 ---- } ! /* * Switch WBXML code page. */ *************** *** 849,854 **** /** - * FUNCTION: wbxmlSkipEntity - * * Skips entities but doesn't do anything useful yet. */ --- 813,816 ---- *************** *** 870,876 **** ! /** ! * FUNCTION: wbxmlSkipExtension ! * * Decode WBXML extensions. Skips the extension but doesn't do anything * useful with it. --- 832,836 ---- ! /* * Decode WBXML extensions. Skips the extension but doesn't do anything * useful with it. *************** *** 904,910 **** } ! /** ! * FUNCTION: wbxmlSkipPI ! * * Handle XML processing instructions. PIs are not supported but the * scanner recognizes and skips over them. --- 864,868 ---- } ! /* * Handle XML processing instructions. PIs are not supported but the * scanner recognizes and skips over them. *************** *** 918,924 **** } ! /** ! * FUNCTION: wbxmlSkipAttribute ! * * Handle attributes. Attributes are not supported but the * scanner recognizes and skips over them. --- 876,880 ---- } ! /* * Handle attributes. Attributes are not supported but the * scanner recognizes and skips over them. Index: xltenc.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltenc.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** xltenc.c 24 Nov 2003 13:53:49 -0000 1.5 --- xltenc.c 24 May 2004 01:33:39 -0000 1.6 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: Encoder source file */ ! /* file: xltenc.c */ ! /* target system: All */ ! /* target OS: All */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * Encoder source file ! * ! * @target_system All ! * @target_os All ! */ /* *************** *** 147,183 **** /** - * FUNCTION: smlXltEncInit - * * Initializes an XML buffer; Creates XML code for the SyncHdr * and appends it to the buffer. * Returns 0 if operation was successful. * ! * PRE-Condition: no memory should be allocated for ppEncoder (should be NULL) ! * pHeader has to contain a valid SyncHdr structure ! * pBufEnd must point to the end of the (WB)XML buffer ! * ppBufPos has to be initialized to the start point of the ! * (WB)XML buffer. ! * ! * ! * POST-Condition: After the function call ppBufPos points to the ! * first free byte in the buffer behind the (WB)XML document ! * ! * IN: enc, the encoding constant (SML_WBXML or SML_XML) ! * pHeader, the SyncML header structure ! * pBufEnd, pointer to the end of the buffer to write on ! * ! * IN/OUT: ppBufPos, current position of the bufferpointer ! * ppEncoder, the encoder object ! * ! * RETURN: shows error codes of function, ! * 0, if OK ! * Possible Error Codes: ! * SML_ERR_XLT_MISSING_CONT ! * SML_ERR_XLT_BUF_ERR ! * SML_ERR_XLT_INVAL_ELEM_TYPE ! * SML_ERR_XLT_INVAL_LIST_TYPE ! * SML_ERR_XLT_INVAL_TAG_TYPE ! * SML_ERR_XLT_ENC_UNK ! * SML_ERR_XLT_INVAL_PROTO_ELEM */ Ret_t xltEncInit(SmlEncoding_t enc, --- 148,184 ---- /** * Initializes an XML buffer; Creates XML code for the SyncHdr * and appends it to the buffer. * Returns 0 if operation was successful. * ! * @pre no memory should be allocated for ppEncoder (should be NULL) ! * pHeader has to contain a valid SyncHdr structure ! * pBufEnd must point to the end of the (WB)XML buffer ! * ppBufPos has to be initialized to the start point of the ! * (WB)XML buffer. ! * @post After the function call ppBufPos points to the ! * first free byte in the buffer behind the (WB)XML document ! * @param enc (IN) ! * the encoding constant (SML_WBXML or SML_XML) ! * @param pHeader (IN) ! * the SyncML header structure ! * @param pBufEnd (IN) ! * pointer to the end of the buffer to write on ! * @param ppBufPos (IN/OUT) ! * current position of the bufferpointer ! * @param ppEncoder (IN/OUT) ! * the encoder object ! * @param vers (IN) ! * SyncML version ! * @return shows error codes of function,\n ! * 0, if OK\n ! * Possible Error Codes: ! * - SML_ERR_XLT_MISSING_CONT ! * - SML_ERR_XLT_BUF_ERR ! * - SML_ERR_XLT_INVAL_ELEM_TYPE ! * - SML_ERR_XLT_INVAL_LIST_TYPE ! * - SML_ERR_XLT_INVAL_TAG_TYPE ! * - SML_ERR_XLT_ENC_UNK ! * - SML_ERR_XLT_INVAL_PROTO_ELEM */ Ret_t xltEncInit(SmlEncoding_t enc, *************** *** 344,379 **** /** - * FUNCTION: smlXltEncAppend - * * Generates (WB)XML code and appends it to the XML buffer. * ! * PRE-Condition: pEncoder holds the initialized encoder structure. ! * the initialization takes place in the xltEncAppend function ! * pContent has to contain a valid content structure structure ! * pBufEnd must point to the end of the (WB)XML buffer ! * ppBufPos has to be initialized to the start point of the ! * (WB)XML buffer. ! * ! * ! * POST-Condition: After the function call ppBufPos points to the ! * first free byte in the buffer behind the (WB)XML document ! * ! * IN: pEncoder, the encoder object ! * pe, the protocol element (PE_ADD, ...) ! * pBufEnd, pointer to the end of the buffer to write on ! * pContent, the content to append to the SyncML document ! * ! * IN/OUT: ppBufPos, current position of the bufferpointer ! * ! * RETURN: shows error codes of function, ! * 0, if OK ! * Possible Error Codes: ! * SML_ERR_XLT_MISSING_CONT ! * SML_ERR_XLT_BUF_ERR ! * SML_ERR_XLT_INVAL_ELEM_TYPE ! * SML_ERR_XLT_INVAL_LIST_TYPE ! * SML_ERR_XLT_INVAL_TAG_TYPE ! * SML_ERR_XLT_ENC_UNK ! * SML_ERR_XLT_INVAL_PROTO_ELEM */ Ret_t xltEncAppend(const XltEncoderPtr_t pEncoder, --- 345,378 ---- /** * Generates (WB)XML code and appends it to the XML buffer. * ! * @pre pEncoder holds the initialized encoder structure. ! * the initialization takes place in the xltEncAppend function ! * pContent has to contain a valid content structure structure ! * pBufEnd must point to the end of the (WB)XML buffer ! * ppBufPos has to be initialized to the start point of the ! * (WB)XML buffer. ! * @post After the function call ppBufPos points to the ! * first free byte in the buffer behind the (WB)XML document ! * @param pEncoder (IN) ! * the encoder object ! * @param pe (IN) ! * the protocol element (PE_ADD, ...) ! * @param pBufEnd (IN) ! * pointer to the end of the buffer to write on ! * @param pContent (IN) ! * the content to append to the SyncML document ! * @param ppBufPos (IN/OUT) ! * current position of the bufferpointer ! * @return shows error codes of function,\n ! * 0, if OK\n ! * Possible Error Codes: ! * - SML_ERR_XLT_MISSING_CONT ! * - SML_ERR_XLT_BUF_ERR ! * - SML_ERR_XLT_INVAL_ELEM_TYPE ! * - SML_ERR_XLT_INVAL_LIST_TYPE ! * - SML_ERR_XLT_INVAL_TAG_TYPE ! * - SML_ERR_XLT_ENC_UNK ! * - SML_ERR_XLT_INVAL_PROTO_ELEM */ Ret_t xltEncAppend(const XltEncoderPtr_t pEncoder, *************** *** 455,487 **** /** - * FUNCTION: smlXltEncTerminate - * * Filnalizes the (WB)XML document and returns the size of written bytes to * the workspace module * ! * PRE-Condition: pEncoder holds the initialized encoder structure. ! * the initialization takes place in the xltEncAppend function ! * pBufEnd must point to the end of the (WB)XML buffer ! * ppBufPos has to be initialized to the start point of the ! * (WB)XML buffer. ! * ! * POST-Condition: After the function call ppBufPos points to the ! * first free byte in the buffer behind the (WB)XML document ! * ! * IN: pEncoder, the encoder object ! * pBufEnd, pointer to the end of the buffer to write on ! * ! * IN/OUT: ppBufPos, current position of the bufferpointer ! * ! * RETURN: shows error codes of function, ! * 0, if OK ! * Possible Error Codes: ! * SML_ERR_XLT_BUF_ERR ! * SML_ERR_XLT_MISSING_CONT ! * SML_ERR_XLT_INVAL_ELEM_TYPE ! * SML_ERR_XLT_INVAL_LIST_TYPE ! * SML_ERR_XLT_INVAL_TAG_TYPE ! * SML_ERR_XLT_ENC_UNK ! * SML_ERR_XLT_INVAL_PROTO_ELEM */ Ret_t xltEncTerminate(const XltEncoderPtr_t pEncoder, --- 454,483 ---- /** * Filnalizes the (WB)XML document and returns the size of written bytes to * the workspace module * ! * @pre pEncoder holds the initialized encoder structure. ! * the initialization takes place in the xltEncAppend function ! * pBufEnd must point to the end of the (WB)XML buffer ! * ppBufPos has to be initialized to the start point of the ! * (WB)XML buffer. ! * @post After the function call ppBufPos points to the ! * first free byte in the buffer behind the (WB)XML document ! * @param pEncoder (IN) ! * the encoder object ! * @param pBufEnd (IN) ! * pointer to the end of the buffer to write on ! * @param ppBufPos (IN/OUT) ! * current position of the bufferpointer ! * @return shows error codes of function,\n ! * 0, if OK\n ! * Possible Error Codes: ! * - SML_ERR_XLT_BUF_ERR ! * - SML_ERR_XLT_MISSING_CONT ! * - SML_ERR_XLT_INVAL_ELEM_TYPE ! * - SML_ERR_XLT_INVAL_LIST_TYPE ! * - SML_ERR_XLT_INVAL_TAG_TYPE ! * - SML_ERR_XLT_ENC_UNK ! * - SML_ERR_XLT_INVAL_PROTO_ELEM */ Ret_t xltEncTerminate(const XltEncoderPtr_t pEncoder, *************** *** 570,584 **** /** - * FUNCTION: smlXltStartEvaluation - * * Starts an evaluation run which prevents further API-Calls to write tags - * just the tag-sizes are calculated. Must be sopped via smlEndEvaluation * ! * IN: XltEncoderPtr_t ! * the encoder object ! * ! * ! * RETURN: Ret_t ! * Return Code */ SML_API Ret_t xltStartEvaluation(XltEncoderPtr_t pEncoder) --- 566,575 ---- /** * Starts an evaluation run which prevents further API-Calls to write tags - * just the tag-sizes are calculated. Must be sopped via smlEndEvaluation * ! * @param pEncoder (IN) ! * the encoder object ! * @return Return Code */ SML_API Ret_t xltStartEvaluation(XltEncoderPtr_t pEncoder) *************** *** 602,618 **** /** - * FUNCTION: smlXltEndEvaluation - * * Stops an evaluation run which prevents further API-Calls to write tags - * the remaining free buffer size after all Tags are written is returned * ! * IN: XltEncoderPtr_t ! * the encoder object ! * ! * IN/OUT: MemSize_t ! * Size of free buffer for data after all tags are written ! * ! * RETURN: Ret_t ! * Return Code */ SML_API Ret_t xltEndEvaluation(InstanceID_t id, XltEncoderPtr_t pEncoder, MemSize_t *freemem) --- 593,606 ---- /** * Stops an evaluation run which prevents further API-Calls to write tags - * the remaining free buffer size after all Tags are written is returned * ! * @param id (IN) ! * instance ID ! * @param pEncoder (IN) ! * the encoder object ! * @param freemem (IN/OUT) ! * Size of free buffer for data after all tags are written ! * @return Return Code */ SML_API Ret_t xltEndEvaluation(InstanceID_t id, XltEncoderPtr_t pEncoder, MemSize_t *freemem) *************** *** 642,665 **** /** - * FUNCTION: xltEncBlock - * * Generates a (WB)XML Block for a given tag ID and a given content * ! * PRE-Condition: pContent holds a valid content structure ! * tagId contains a valid SyncML tag ID ! * ! * POST-Condition: the (WB)XML buffer in the pBufMgr structure contains the ! * encoded (WB)XML block ! * ! * IN: tagId, the ID for the tag to generate (TN_ADD, ...) ! * reqOptFlag, flag if the block is required or optional ! * pContent, the content structure of the block ! * enc, the encoding constant (SML_WBXML or SML_XML) ! * attFlag, indicates if the encoded tag contain Attributes in namespace extensions ! * ! * IN/OUT: pBufMgr, pointer to a structure containing buffer management elements ! * ! * RETURN: shows error codes of function, ! * 0, if OK */ Ret_t xltEncBlock(XltTagID_t tagId, XltRO_t reqOptFlag, const VoidPtr_t pContent, SmlEncoding_t enc, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag) --- 630,654 ---- /** * Generates a (WB)XML Block for a given tag ID and a given content * ! * @pre pContent holds a valid content structure ! * tagId contains a valid SyncML tag ID ! * @post the (WB)XML buffer in the pBufMgr structure contains the ! * encoded (WB)XML block ! * @param tagId (IN) ! * the ID for the tag to generate (TN_ADD, ...) ! * @param reqOptFlag (IN) ! * flag if the block is required or optional ! * @param pContent (IN) ! * the content structure of the block ! * @param enc (IN) ! * the encoding constant (SML_WBXML or SML_XML) ! * @param attFlag (IN) ! * indicates if the encoded tag contain Attributes ! * in namespace extensions ! * @param pBufMgr (IN/OUT) ! * pointer to a structure containing buffer management elements ! * @return shows error codes of function,\n ! * 0, if OK */ Ret_t xltEncBlock(XltTagID_t tagId, XltRO_t reqOptFlag, const VoidPtr_t pContent, SmlEncoding_t enc, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag) *************** *** 1165,1187 **** /** - * FUNCTION: xltEncList - * * Generates a list element which is not directly related to a tag * ! * PRE-Condition: pList holds a valid list structure ! * listId contains a valid SyncML list ID ! * ! * POST-Condition: the (WB)XML buffer in the pBufMgr structure contains the ! * encoded (WB)XML list ! * ! * IN: listId, the ID of the list to generate (e.g. TARGET_LIST, ...) ! * pList, reference to the list to process ! * enc, the encoding constant (SML_WBXML or SML_XML) ! * attFlag, indicates if the encoded tag contain Attributes in namespace extensions ! * ! * IN/OUT: pBufMgr, pointer to a structure containing buffer management elements ! * ! * RETURN: shows error codes of function, ! * 0, if OK */ Ret_t xltEncList(XltListType_t listId, XltRO_t reqOptFlag, VoidPtr_t pList, SmlEncoding_t enc, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag) --- 1154,1178 ---- /** * Generates a list element which is not directly related to a tag * ! * @pre pList holds a valid list structure ! * listId contains a valid SyncML list ID ! * @post the (WB)XML buffer in the pBufMgr structure contains the ! * encoded (WB)XML list ! * @param listId (IN) ! * the ID of the list to generate (e.g. TARGET_LIST, ...) ! * @param reqOptFlag (IN) ! * flag if the block is required or optional ! * @param pList (IN) ! * reference to the list to process ! * @param enc (IN) ! * the encoding constant (SML_WBXML or SML_XML) ! * @param pBufMgr (IN/OUT) ! * pointer to a structure containing buffer management elements ! * @param attFlag (IN) ! * indicates if the encoded tag contain Attributes ! * in namespace extensions ! * @return shows error codes of function,\n ! * 0, if OK */ Ret_t xltEncList(XltListType_t listId, XltRO_t reqOptFlag, VoidPtr_t pList, SmlEncoding_t enc, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag) *************** *** 1257,1277 **** /** - * FUNCTION: xltGenerateTag - * * Generates a (WB)XML tag * ! * PRE-Condition: valis parameters ! * ! * POST-Condition: the buffer contains a new tag ! * ! * IN: tagId, the tag ID ! * TagType, the tag type (begin tag, end tag, ...) ! * enc, the encoding constant (SML_WBXML or SML_XML) ! * attFlag, indicates if the encoded tag contain Attributes in namespace extensions ! * ! * IN/OUT: pBufMgr, pointer to a structure containing buffer management elements ! * ! * RETURN: shows error codes of function, ! * 0, if OK */ Ret_t xltGenerateTag(XltTagID_t tagId, XltTagType_t TagType, SmlEncoding_t enc, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag) --- 1248,1268 ---- /** * Generates a (WB)XML tag * ! * @pre valid parameters ! * @post the buffer contains a new tag ! * @param tagId (IN) ! * the tag ID ! * @param TagType (IN) ! * the tag type (begin tag, end tag, ...) ! * @param enc (IN) ! * the encoding constant (SML_WBXML or SML_XML) ! * @param attFlag (IN) ! * indicates if the encoded tag contain Attributes ! * in namespace extensions ! * @param pBufMgr (IN/OUT) ! * pointer to a structure containing buffer management elements ! * @return shows error codes of function,\n ! * 0, if OK */ Ret_t xltGenerateTag(XltTagID_t tagId, XltTagType_t TagType, SmlEncoding_t enc, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag) Index: xltdec.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltdec.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xltdec.c 2 May 2003 22:05:08 -0000 1.2 --- xltdec.c 24 May 2004 01:33:38 -0000 1.3 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: SyncmML Decoder */ ! /* file: XLTDec.c */ ! /* target system: all */ ! /* target OS: all */ ! /*************************************************************************/ /* --- 1,11 ---- ! /** ! * @file ! * SyncmML Decoder ! * ! * @target_system all ! * @target_os all ! * @description The SyncML parser. ! */ ! /* *************** *** 42,49 **** */ - /** - * The SyncML parser. - */ - /*************************************************************************/ /* Definitions */ --- 45,48 ---- *************** *** 75,80 **** /** - * FUNCTION: concatPCData - * * Tries to concatenate two Pcdata elements. Only works when the two * elements are of the same type (e.g. SML_PCDATA_STRING). Returns a --- 74,77 ---- *************** *** 85,89 **** /** ! * FUNCTION: appendXXXList * * These are auxiliary functions for building SyncML elements that contain --- 82,86 ---- /** ! * appendXXXList * * These are auxiliary functions for building SyncML elements that contain *************** *** 92,110 **** * element at the end. If the ListPtr points to NULL a new list is created. * ! * PRE-Condition: ! * The scanner's current token is the start tag (may be ! * empty) of the SyncML element to be appended to the list. ! * ! * POST-Condition: ! * The scanner's current token is the end tag (or empty ! * start tag) of the SyncML element that was added to the ! * list. ! * ! * IN/OUT: pDecoder, the decoder ! * ppXXXList, NULL or an initialized list, to which element ! * will be appended ! * ! * RETURNS: SML_ERR_OK, if an element was successfully appended ! * else error code */ static Ret_t appendItemList(XltDecoderPtr_t pDecoder, SmlItemListPtr_t *ppItemList); --- 89,102 ---- * element at the end. If the ListPtr points to NULL a new list is created. * ! * @pre The scanner's current token is the start tag (may be ! * empty) of the SyncML element to be appended to the list. ! * @post The scanner's current token is the end tag (or empty ! * start tag) of the SyncML element that was added to the list. ! * @param pDecoder (IN/OUT) ! * the decoder ! * @param ppXXXList (IN/OUT) ! * NULL or an initialized list, to which element will be appended ! * @return SML_ERR_OK, if an element was successfully appended\n ! * else error code */ static Ret_t appendItemList(XltDecoderPtr_t pDecoder, SmlItemListPtr_t *ppItemList); Index: xltdevinf.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltdevinf.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** xltdevinf.c 7 Apr 2004 06:51:06 -0000 1.5 --- xltdevinf.c 24 May 2004 01:33:39 -0000 1.6 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: DeviceInf DTD related functions for the en-/decoder */ ! /* file: xltdevinf.c */ ! /* target system: all */ ! /* target OS: all */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * DeviceInf DTD related functions for the en-/decoder ! * ! * @target_system all ! * @target_os all ! */ /* Index: xltenccom.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltenccom.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xltenccom.h 14 Aug 2003 12:48:42 -0000 1.3 --- xltenccom.h 24 May 2004 01:33:39 -0000 1.4 *************** *** 1,2 **** --- 1,10 ---- + /** + * @file + * Encoder utils header file + * + * @target_system All + * @target_os All + */ + /* * Copyright Notice *************** *** 52,56 **** #endif ! // flags if a (WB)XML block is required or optional typedef enum { OPTIONAL = 0, --- 60,64 ---- #endif ! /** flags if a (WB)XML block is required or optional */ typedef enum { OPTIONAL = 0, *************** *** 58,63 **** } XltRO_t; ! /* Tag Types (TT) - begin tags, end tags, ... ! */ typedef enum { TT_END = 0, --- 66,70 ---- } XltRO_t; ! /** Tag Types (TT) - begin tags, end tags, ... */ typedef enum { TT_END = 0, *************** *** 66,71 **** } XltTagType_t; ! /* Structure elements which are not directly relied to a tag ! */ typedef enum { ITEM_LIST, --- 73,77 ---- } XltTagType_t; ! /** Structure elements which are not directly relied to a tag */ typedef enum { ITEM_LIST, *************** *** 78,82 **** } XltListType_t; ! // Type for storing free mem size evaluation information typedef struct XltSpaceEvaluation_s { --- 84,88 ---- } XltListType_t; ! /** Type for storing free mem size evaluation information */ typedef struct XltSpaceEvaluation_s { *************** *** 106,127 **** } BufferMgmt_t, *BufferMgmtPtr_t; - /** - * FUNCTION: xltAddToBuffer - * - * Add a string to the global buffer - * - * PRE-Condition: pContent contains some content bytes to write to the (WB) XML buffer - * - * POST-Condition: content is written to the buffer - * - * IN: pContent, the character pointer referencing the content to - * write to the buffer - * size, the content length - * - * IN/OUT: pBufMgr, pointer to a structure containing buffer management elements - * - * RETURN: shows error codes of function, - * 0, if OK - */ Ret_t xltAddToBuffer(const MemPtr_t pContent, MemSize_t size, BufferMgmtPtr_t pBufMgr); --- 112,115 ---- Index: xltdecwbxml.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltdecwbxml.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xltdecwbxml.h 2 May 2003 22:05:08 -0000 1.2 --- xltdecwbxml.h 24 May 2004 01:33:39 -0000 1.3 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: internal WBXML decoder header file */ ! /* file: XLTDecWbxml.h */ ! /* target system: - */ ! /* target OS: - */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * internal WBXML decoder header file ! * ! * @target_system - ! * @target_os - ! */ /* Index: xltencxml.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltencxml.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xltencxml.h 14 Nov 2003 09:43:26 -0000 1.2 --- xltencxml.h 24 May 2004 01:33:39 -0000 1.3 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: The XML Encoder header file */ ! /* file: xltencxml.h */ ! /* target system: All */ ! /* target OS: All */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * The XML Encoder header file ! * ! * @target_system All ! * @target_os All ! */ /* *************** *** 53,72 **** #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 "'" --- 54,73 ---- #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 "'" *************** *** 76,96 **** #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); --- 77,80 ---- Index: xltutilstack.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltutilstack.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xltutilstack.h 6 Aug 2002 20:42:51 -0000 1.1 --- xltutilstack.h 24 May 2004 01:33:39 -0000 1.2 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: XLT Decoder Util */ ! /* file: XLTUtilStack.h */ ! /* target system: all */ ! /* target OS: all */ ! /*************************************************************************/ /* --- 1,11 ---- ! /** ! * @file ! * XLT Decoder Util ! * ! * @target_system all ! * @target_os all ! * @description Header file for a simple stack implementation used ! * by the WBXML scanner and the SyncML parser. ! */ /* *************** *** 42,50 **** */ - /** - * Header file for a simple stack implementation used by the WBXML scanner - * and the SyncML parser. - */ - /*************************************************************************/ /* Definitions */ --- 45,48 ---- *************** *** 56,62 **** #include <smldef.h> ! /* type for stack elements */ typedef XltTagID_t XltUtilStackItem_t; /** * XLTUtilStack interface --- 54,62 ---- #include <smldef.h> ! /** type for stack elements */ typedef XltTagID_t XltUtilStackItem_t; + /** @copydoc XltUtilStack_s */ + typedef struct XltUtilStack_s *XltUtilStackPtr_t, XltUtilStack_t; /** * XLTUtilStack interface *************** *** 67,155 **** * structure that is not visible to the users of the stack. A stack object * has the following public methods: ! * ! * FUNCTION: top ! * ! * Returns the top element of the stack. ! * ! * PRE-Condition: ! * the stack contains at least one element ! * ! * POST-Condition: ! * ! * IN: the stack ! * ! * OUT: the top element of the stack ! * ! * IN/OUT: ! * ! * RETURNS: SML_ERR_WRONG_USAGE, if the stack is empty ! * SML_ERR_OK, else ! * ! * FUNCTION: pop ! * ! * Returns the top element and takes it off the stack. ! * ! * PRE-Condition: ! * the stack contains at least one element ! * ! * POST-Condition: ! * the top element of the stack is removed ! * ! * IN: ! * ! * OUT: the top element of the stack ! * ! * IN/OUT: the stack ! * ! * RETURNS: SML_ERR_WRONG_USAGE, if the stack is empty ! * SML_ERR_NOT_ENOUGH_SPACE, if memory reallocation failed ! * SML_ERR_OK, else ! * ! * FUNCTION: push ! * ! * Put a new element on top of the stack. ! * ! * PRE-Condition: ! * ! * POST-Condition: ! * popping the stack yields the same stack as before ! * the push ! * ! * IN: the new stack element ! * ! * OUT: ! * ! * IN/OUT: the stack ! * ! * RETURNS: SML_ERR_NOT_ENOUGH_SPACE, if memory reallocation failed ! * SML_ERR_OK, else ! * ! * FUNCTION: destroy ! * ! * Free the memory used by the stack. ! * ! * PRE-Condition: ! * POST-Condition: ! * ! * IN: ! * ! * OUT: ! * ! * IN/OUT: the stack ! * ! * RETURNS: SML_ERR_OK ! */ ! typedef struct XltUtilStack_s *XltUtilStackPtr_t, XltUtilStack_t; struct XltUtilStack_s { ! Ret_t (*top)(const XltUtilStackPtr_t, XltUtilStackItem_t *); ! Ret_t (*pop)(XltUtilStackPtr_t, XltUtilStackItem_t *); ! Ret_t (*push)(XltUtilStackPtr_t, const XltUtilStackItem_t); ! Ret_t (*destroy)(XltUtilStackPtr_t); }; /** - * FUNCTION: xltUtilCreateStack - * * Creates a new stack. The size parameter indicates for how many elements * memory should be allocated initially. This does _not_ mean that you can --- 67,125 ---- * structure that is not visible to the users of the stack. A stack object * has the following public methods: ! */ struct XltUtilStack_s { ! /** ! * Returns the top element of the stack. ! * ! * @pre the stack contains at least one element ! * @param XltUtilStackPtr_t (IN) ! * the stack ! * @param XltUtilStackItem_t (OUT) ! * the top element of the stack ! * @return - SML_ERR_WRONG_USAGE, if the stack is empty ! * - SML_ERR_OK, else ! */ ! Ret_t (*top)(const XltUtilStackPtr_t, XltUtilStackItem_t *); ! ! /** ! * Returns the top element and takes it off the stack. ! * ! * @pre the stack contains at least one element ! * @post the top element of the stack is removed ! * @param XltUtilStackPtr_t (IN/OUT) ! * the stack ! * @param XltUtilStackItem_t (OUT) ! * the top element of the stack ! * @return - SML_ERR_WRONG_USAGE, if the stack is empty ! * - SML_ERR_NOT_ENOUGH_SPACE, if memory reallocation failed ! * - SML_ERR_OK, else ! */ ! Ret_t (*pop)(XltUtilStackPtr_t, XltUtilStackItem_t *); ! ! /** ! * Put a new element on top of the stack. ! * ! * @post popping the stack yields the same stack as before the push ! * @param XltUtilStackPtr_t (IN/OUT) ! * the stack ! * @param XltUtilStackItem_t (IN) ! * the new stack element ! * @return - SML_ERR_NOT_ENOUGH_SPACE, if memory reallocation failed ! * - SML_ERR_OK, else ! */ ! Ret_t (*push)(XltUtilStackPtr_t, const XltUtilStackItem_t); ! ! /** ! * Free the memory used by the stack. ! * ! * @param XltUtilStackPtr_t (IN/OUT) ! * the stack ! * @return - SML_ERR_OK ! */ ! Ret_t (*destroy)(XltUtilStackPtr_t); }; /** * Creates a new stack. The size parameter indicates for how many elements * memory should be allocated initially. This does _not_ mean that you can *************** *** 157,174 **** * memory for another size elements is allocated. * ! * PRE-Condition: ! * POST-Condition: ! * the stack pointer points to a new, empty stack ! * ! * IN: size, the initial size of the stack ! * ! * OUT: a new stack ! * ! * IN/OUT: ! * ! * RETURNS: SML_ERR_NOT_ENOUGH_SPACE, if memory allocation failed ! * SML_ERR_OK, else */ ! Ret_t xltUtilCreateStack(XltUtilStackPtr_t *, const Long_t size); #endif --- 127,139 ---- * memory for another size elements is allocated. * ! * @post the stack pointer points to a new, empty stack ! * @param ppStack (OUT) ! * a new stack ! * @param size (IN) ! * the initial size of the stack ! * @return - SML_ERR_NOT_ENOUGH_SPACE, if memory allocation failed ! * - SML_ERR_OK, else */ ! Ret_t xltUtilCreateStack(XltUtilStackPtr_t *ppStack, const Long_t size); #endif Index: xltmetinf.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltmetinf.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xltmetinf.h 6 Aug 2002 20:42:51 -0000 1.1 --- xltmetinf.h 24 May 2004 01:33:39 -0000 1.2 *************** *** 1,9 **** ! /*************************************************************************/ ! /* module: Definition of MetaInf DTD prototypefunctions */ ! /* for the en-/decoder */ ! /* file: xltmetinf.h */ ! /* target system: all */ ! /* target OS: all */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * Definition of MetaInf DTD prototypefunctions for the en-/decoder ! * ! * @target_system all ! * @target_os all ! */ /* Index: xlttagtbl.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xlttagtbl.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xlttagtbl.h 2 May 2003 22:05:09 -0000 1.2 --- xlttagtbl.h 24 May 2004 01:33:39 -0000 1.3 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: Definition of en-/decoder tagtable data */ ! /* file: XLTTagtbl.h */ ! /* target system: all */ ! /* target OS: all */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * Definition of en-/decoder tagtable data ! * ! * @target_system all ! * @target_os all ! */ /* *************** *** 62,66 **** /** ! * FUNCTION: buildXXX * * These functions each decode one single SyncML element starting at the --- 63,67 ---- /** ! * buildXXX * * These functions each decode one single SyncML element starting at the *************** *** 74,85 **** * are handled separately by the appendXXXList functions (see below). * ! * PRE-Condition: ! * ppElem is NULL ! * The scanner's current token is the start tag (may be ! * empty) of the SyncML element to be decoded. ! * ! * POST-Condition: ! * The scanner's current token is the end tag (or empty ! * start tag) of the SyncML element to be decoded. */ /* implemented in xltdec.c! */ --- 75,83 ---- * are handled separately by the appendXXXList functions (see below). * ! * @pre ppElem is NULL ! * The scanner's current token is the start tag (may be ! * empty) of the SyncML element to be decoded. ! * @post The scanner's current token is the end tag (or empty ! * start tag) of the SyncML element to be decoded. */ /* implemented in xltdec.c! */ Index: xltencxml.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltencxml.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** xltencxml.c 14 Nov 2003 09:43:26 -0000 1.4 --- xltencxml.c 24 May 2004 01:33:39 -0000 1.5 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: The XML Encoder source file */ ! /* file: xltencxml.c */ ! /* target system: All */ ! /* target OS: All */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * The XML Encoder source file ! * ! * @target_system All ! * @target_os All ! */ /* *************** *** 56,75 **** /** - * 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, ...) ! * attFlag, indicates if the encoded tag contain Attributes in namespace extensions ! * ! * 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) --- 57,75 ---- /** * Generates a XML tag * ! * @pre valid parameters ! * @post the XML tag is written to the XML buffer ! * @param tagId (IN) ! * the ID for the tag to generate (TN_ADD, ...) ! * @param tagType (IN) ! * the tag type (e.g. Begin Tag -> TT_BEG, ...) ! * @param attFlag (IN) ! * indicates if the encoded tag contain Attributes in namespace ! * extensions ! * @param pBufMgr (IN/OUT) ! * pointer to a structure containing buffer management elements ! * @return shows error codes of function,\n ! * 0, if OK */ Ret_t xmlGenerateTag(XltTagID_t tagId, XltTagType_t tagType, BufferMgmtPtr_t pBufMgr, SmlPcdataExtension_t attFlag) Index: xlttags.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xlttags.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xlttags.c 14 Aug 2003 12:48:42 -0000 1.3 --- xlttags.c 24 May 2004 01:33:39 -0000 1.4 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: Definition of WBXML/XML tags for the en-/decoder */ ! /* file: XLTTags.c */ ! /* target system: all */ ! /* target OS: all */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * Definition of WBXML/XML tags for the en-/decoder ! * ! * @target_system all ! * @target_os all ! */ /* *************** *** 89,94 **** /** - * FUNCTION: getDtdTable - * * Returns a copy of the table containing all known (sub) dtd's * On error a NULL pointer is returned --- 90,93 ---- *************** *** 127,132 **** /** - * FUNCTION: getExtName - * * Returns the official name for a given extention/sub-DTD * and stored it in 'name'. If not found name isn't modified --- 126,129 ---- *************** *** 166,175 **** /** - * FUNCTION: getCpByName - * * Returns the codepage constant assoziated with the name stored in 'ns' * ! * RETURN: a SmlPcdataExtension_t representing the corresponding codepage id. ! * If no corresponding codepage is found -1 is returned. */ SmlPcdataExtension_t getExtByName(String_t ns) { --- 163,170 ---- /** * Returns the codepage constant assoziated with the name stored in 'ns' * ! * @return a SmlPcdataExtension_t representing the corresponding codepage id. ! * If no corresponding codepage is found -1 is returned. */ SmlPcdataExtension_t getExtByName(String_t ns) { *************** *** 220,230 **** /** - * FUNCTION: getTagTable - * * Returns the tag table - this function is used to avoid a global * tag table variable * ! * RETURN: a pointer to the tag table containing tag ids, ! * codepages, wbxml tags and xml tags */ /* T.K. initialized the structure via _TOKEN Macro, to take --- 215,223 ---- /** * Returns the tag table - this function is used to avoid a global * tag table variable * ! * @return a pointer to the tag table containing tag ids, ! * codepages, wbxml tags and xml tags */ /* T.K. initialized the structure via _TOKEN Macro, to take *************** *** 434,452 **** /** - * FUNCTION: getTagString - * * Returns a tag string which belongs to a tag ID. * This function is needed for the XML encoding * ! * PRE-Condition: valid tag ID, the tagSring has to be allocated ! * ! * POST-Condition: tag string is returned ! * ! * IN: tagId, the ID for the tag ! * ! * IN/OUT: tagString, allocated string into which the XML ! * tag string will be written ! * ! * RETURN: 0,if OK */ #ifdef __SML_XML__ --- 427,442 ---- /** * Returns a tag string which belongs to a tag ID. * This function is needed for the XML encoding * ! * @pre valid tag ID, the tagSring has to be allocated ! * @post tag string is returned ! * @param tagID (IN) ! * the ID for the tag ! * @param tagString (IN/OUT) ! * allocated string into which the XML... [truncated message content] |