00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00036 #ifndef _ASN1CEVTHNDLR_H_
00037 #define _ASN1CEVTHNDLR_H_
00038
00039 #include <stdio.h>
00040 #include "rtsrc/asn1type.h"
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00062 typedef void (*rtxStartElement) (const char* name, int idx) ;
00063
00080 typedef void (*rtxEndElement) (const char* name, int idx) ;
00081
00089 typedef void (*rtxBoolValue) (OSBOOL value);
00090
00098 typedef void (*rtxIntValue) (OSINT32 value);
00099
00109 typedef void (*rtxUIntValue) (OSUINT32 value);
00110
00119 typedef void (*rtxInt64Value) (OSINT64 value);
00120
00129 typedef void (*rtxUInt64Value) (OSUINT64 value);
00130
00141 typedef void (*rtxBitStrValue) (OSUINT32 numbits, const OSOCTET* data);
00142
00153 typedef void (*rtxOctStrValue) (OSUINT32 numocts, const OSOCTET* data) ;
00154
00163 typedef void (*rtxCharStrValue) (const char* value) ;
00164
00178 typedef void (*rtxCharStrValue16Bit) (OSUINT32 nchars, OSUNICHAR* data) ;
00179
00192 typedef void (*rtxCharStrValue32Bit) (OSUINT32 nchars, OS32BITCHAR* data) ;
00193
00201 typedef void (*rtxNullValue) (void) ;
00202
00212 typedef void (*rtxOidValue) (OSUINT32 numSubIds, OSUINT32* pSubIds) ;
00213
00221 typedef void (*rtxRealValue) (double value) ;
00222
00232 typedef void (*rtxEnumValue) (OSUINT32 value, const OSUTF8CHAR* text);
00233
00243 typedef void (*rtxOpenTypeValue) (OSUINT32 numocts, const OSOCTET* data) ;
00244
00258 typedef int (*rtErrorHandler) (OSCTXT *pctxt, ASN1CCB *pCCB, int stat);
00259
00264 typedef struct Asn1NamedCEventHandler {
00265 rtxStartElement startElement;
00266 rtxEndElement endElement;
00267 rtxBoolValue boolValue;
00268 rtxIntValue intValue;
00269 rtxUIntValue uIntValue;
00270 rtxInt64Value int64Value;
00271 rtxUInt64Value uInt64Value;
00272 rtxBitStrValue bitStrValue;
00273 rtxOctStrValue octStrValue;
00274 rtxCharStrValue charStrValue;
00275 rtxCharStrValue16Bit charStrValue16Bit;
00276 rtxCharStrValue32Bit charStrValue32Bit;
00277 rtxNullValue nullValue;
00278 rtxOidValue oidValue;
00279 rtxRealValue realValue;
00280 rtxEnumValue enumValue;
00281 rtxOpenTypeValue openTypeValue;
00282 } Asn1NamedCEventHandler;
00283
00293 EXTERNRT void rtAddEventHandler
00294 (OSCTXT* pCtxt, Asn1NamedCEventHandler* pHandler);
00295
00304 EXTERNRT void rtRemoveEventHandler
00305 (OSCTXT* pCtxt, Asn1NamedCEventHandler* pHandler);
00306
00318 EXTERNRT void rtSetErrorHandler (OSCTXT *pctxt, rtErrorHandler pErrCB);
00319
00327 EXTERNRT void rtRemoveErrorHandler (OSCTXT *pctxt);
00328
00342 EXTERNRT int rtInvokeErrorHandler (OSCTXT *pctxt, ASN1CCB *pCCB, int stat);
00343
00344
00345
00346
00347
00348
00357 EXTERNRT void rtInvokeStartElement
00358 (OSCTXT* pCtxt, const char* name, int idx);
00359
00368 EXTERNRT void rtInvokeEndElement
00369 (OSCTXT* pCtxt, const char* name, int idx);
00370
00378 EXTERNRT void rtInvokeBoolValue (OSCTXT* pCtxt, OSBOOL value);
00379
00388 EXTERNRT void rtInvokeIntValue (OSCTXT* pCtxt, OSINT32 value);
00389
00398 EXTERNRT void rtInvokeUIntValue (OSCTXT* pCtxt, OSUINT32 value);
00399
00408 EXTERNRT void rtInvokeInt64Value (OSCTXT* pCtxt, OSINT64 value);
00409
00418 EXTERNRT void rtInvokeUInt64Value (OSCTXT* pCtxt, OSUINT64 value);
00419
00428 EXTERNRT void rtInvokeBitStrValue
00429 (OSCTXT* pCtxt, OSUINT32 numbits, const OSOCTET* data);
00430
00439 EXTERNRT void rtInvokeOctStrValue
00440 (OSCTXT* pCtxt, OSUINT32 numocts, const OSOCTET* data);
00441
00449 EXTERNRT void rtInvokeCharStrValue (OSCTXT* pCtxt, const char* value);
00450
00459 EXTERNRT void rtInvokeCharStr16BitValue
00460 (OSCTXT* pCtxt, OSUINT32 nchars, OSUNICHAR* data);
00461
00470 EXTERNRT void rtInvokeCharStr32BitValue
00471 (OSCTXT* pCtxt, OSUINT32 nchars, OS32BITCHAR* data);
00472
00479 EXTERNRT void rtInvokeNullValue (OSCTXT* pCtxt);
00480
00489 EXTERNRT void rtInvokeOidValue
00490 (OSCTXT* pCtxt, OSUINT32 numSubIds, OSUINT32* pSubIds);
00491
00499 EXTERNRT void rtInvokeRealValue (OSCTXT* pCtxt, double value);
00500
00510 EXTERNRT void rtInvokeEnumValue
00511 (OSCTXT* pCtxt, OSUINT32 value, const OSUTF8CHAR* text);
00512
00521 EXTERNRT void rtInvokeOpenTypeValue
00522 (OSCTXT* pCtxt, OSUINT32 numocts, const OSOCTET* data);
00523
00524
00525 #ifdef __cplusplus
00526 }
00527 #endif
00528
00529 #endif
00530