Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

asn1XerCTypes.h

Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 1997-2004 by Objective Systems, Inc. 00003 * 00004 * This software is furnished under a license and may be used and copied 00005 * only in accordance with the terms of such license and with the 00006 * inclusion of the above copyright notice. This software or any other 00007 * copies thereof may not be provided or otherwise made available to any 00008 * other person. No title to and ownership of the software is hereby 00009 * transferred. 00010 * 00011 * The information in this software is subject to change without notice 00012 * and should not be construed as a commitment by Objective Systems, Inc. 00013 * 00014 * PROPRIETARY NOTICE 00015 * 00016 * This software is an unpublished work subject to a confidentiality agreement 00017 * and is protected by copyright and trade secret law. Unauthorized copying, 00018 * redistribution or other use of this work is prohibited. 00019 * 00020 * The above notice of copyright on this source code product does not indicate 00021 * any actual or intended publication of such source code. 00022 * 00023 *****************************************************************************/ 00024 00029 #ifndef _ASN1XERCTYPES_H_ 00030 #define _ASN1XERCTYPES_H_ 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 #include <stdio.h> 00037 #include <stdlib.h> 00038 #include <setjmp.h> 00039 00040 #include "asn1xer.h" 00041 #include "csaxParser.h" 00042 00043 typedef void (*ASN1XERStartElementHandler)(void *userData, 00044 ASN1Const XMLCHAR *name, 00045 ASN1Const XMLCHAR **atts); 00046 00047 typedef void (*ASN1XEREndElementHandler)(void *userData, 00048 ASN1Const XMLCHAR *name); 00049 00050 /* s is not 0 terminated. */ 00051 typedef void (*ASN1XERCharacterHandler)(void *userData, 00052 ASN1Const XMLCHAR *s, 00053 int len); 00054 00055 typedef struct ASN1SAXCDecodeHandlerBase { 00056 ASN1XERStartElementHandler mpStartElement; 00057 ASN1XEREndElementHandler mpEndElement; 00058 ASN1XERCharacterHandler mpCharacters; 00059 00060 ASN1CTXT* mpCtxt; 00061 ASN1ConstCharPtr mpTypeName; 00062 ASN1XERState mCurrState; 00063 int mLevel, mStartLevel; 00064 } ASN1SAXCDecodeHandlerBase; 00065 00066 #define ISCOMPLETE(e) (e->mSaxBase.mLevel == e->mSaxBase.mStartLevel) 00067 00068 #define ASN1SAXCTRY(pctxt,stat) \ 00069 if ((stat = setjmp((pctxt)->jmpMark)) == 0) 00070 00071 #define ASN1SAXCTHROW(pctxt,stat) do { LOG_ASN1ERR ((pctxt), stat); \ 00072 longjmp((pctxt)->jmpMark, stat); } while (0) 00073 00074 #define ASN1SAXCCATCH else 00075 00076 #define STRX(pctxt,pWideStr) xerTextToCStr ((pctxt), (pWideStr)) 00077 00078 #if defined (XML_UNICODE) && defined(XML_UNICODE_WCHAR_T) 00079 #define LSTRX(pctxt,pLStr) xerTextToCStr ((pctxt), (pLStr)) 00080 #else 00081 #define LSTRX(pctxt,pLStr) \ 00082 strcpy ((char*)ASN1MALLOC (pctxt, strlen (pLStr) + 1), (pLStr)) 00083 #endif 00084 00086 #define XERCDIAGSTRM2(pctxt,a) RTDIAGSTRM2(pctxt,a) 00087 #define XERCDIAGSTRM3(pctxt,a,b) RTDIAGSTRM3(pctxt,a,b) 00088 #define XERCDIAGSTRM4(pctxt,a,b,c) do { \ 00089 void* p = (void*)b; \ 00090 RTDIAGSTRM4(pctxt,a,p,c ); \ 00091 ASN1MEMFREEPTR(pctxt,p); \ 00092 } while (0) 00093 00094 /* 00095 #define XERCDIAG1(a) RTDIAG1(a) 00096 #define XERCDIAG2(a,b) RTDIAG2(a,b) 00097 #define XERCDIAG3(a,b,c) do { \ 00098 void* p = (void*)b; \ 00099 RTDIAG3(a,p,c); \ 00100 ASN1MEMFREEPTR(pctxt,p); \ 00101 } while (0) 00102 */ 00103 00104 #ifndef _COMPACT 00105 #define DECLARE_NON_COMPACT_VAR(type,var) type var 00106 #else 00107 #define DECLARE_NON_COMPACT_VAR(type,var) 00108 #endif 00109 00110 //EXTERNXER int getXerXmlFactory (IXMLFactory** factory); 00111 00112 #ifdef __cplusplus 00113 } 00114 #endif 00115 #endif /* _ASN1XERCTYPES_H_ */

Copyright © 1997-2004 Objective Systems,Inc.
All Rights Reserved.
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.

This file was last modified on 1 Oct 2004.
ASN1C XER Runtime, ASN1C v5.7x