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
00348 EXTERNRT void rtInvokeStartElement
00349 (OSCTXT* pCtxt, const char* name, int idx);
00350
00351 EXTERNRT void rtInvokeEndElement
00352 (OSCTXT* pCtxt, const char* name, int idx);
00353
00354 EXTERNRT void rtInvokeBoolValue (OSCTXT* pCtxt, OSBOOL value);
00355
00356 EXTERNRT void rtInvokeIntValue (OSCTXT* pCtxt, OSINT32 value);
00357
00358 EXTERNRT void rtInvokeUIntValue (OSCTXT* pCtxt, OSUINT32 value);
00359
00360 EXTERNRT void rtInvokeInt64Value (OSCTXT* pCtxt, OSINT64 value);
00361
00362 EXTERNRT void rtInvokeUInt64Value (OSCTXT* pCtxt, OSUINT64 value);
00363
00364 EXTERNRT void rtInvokeBitStrValue
00365 (OSCTXT* pCtxt, OSUINT32 numbits, const OSOCTET* data);
00366
00367 EXTERNRT void rtInvokeOctStrValue
00368 (OSCTXT* pCtxt, OSUINT32 numocts, const OSOCTET* data);
00369
00370 EXTERNRT void rtInvokeCharStrValue (OSCTXT* pCtxt, const char* value);
00371
00372 EXTERNRT void rtInvokeCharStr16BitValue
00373 (OSCTXT* pCtxt, OSUINT32 nchars, OSUNICHAR* data);
00374
00375 EXTERNRT void rtInvokeCharStr32BitValue
00376 (OSCTXT* pCtxt, OSUINT32 nchars, OS32BITCHAR* data);
00377
00378 EXTERNRT void rtInvokeNullValue (OSCTXT* pCtxt);
00379
00380 EXTERNRT void rtInvokeOidValue
00381 (OSCTXT* pCtxt, OSUINT32 numSubIds, OSUINT32* pSubIds);
00382
00383 EXTERNRT void rtInvokeRealValue (OSCTXT* pCtxt, double value);
00384
00385 EXTERNRT void rtInvokeEnumValue
00386 (OSCTXT* pCtxt, OSUINT32 value, const OSUTF8CHAR* text);
00387
00388 EXTERNRT void rtInvokeOpenTypeValue
00389 (OSCTXT* pCtxt, OSUINT32 numocts, const OSOCTET* data);
00390
00391
00392 #ifdef __cplusplus
00393 }
00394 #endif
00395
00396 #endif
00397