ASN1C C/C++ Common Runtime  ASN1C v7.8.x
asn1CEvtHndlr.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2022 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
24 
43 #ifndef _ASN1CEVTHNDLR_H_
44 #define _ASN1CEVTHNDLR_H_
45 
46 #include <stdio.h>
47 #include "rtsrc/asn1type.h"
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
69 typedef void (*rtxStartElement) (const char* name, OSSIZE idx) ;
70 
87 typedef void (*rtxEndElement) (const char* name, OSSIZE idx) ;
88 
96 typedef void (*rtxBoolValue) (OSBOOL value);
97 
105 typedef void (*rtxIntValue) (OSINT32 value);
106 
116 typedef void (*rtxUIntValue) (OSUINT32 value);
117 
126 typedef void (*rtxInt64Value) (OSINT64 value);
127 
136 typedef void (*rtxUInt64Value) (OSUINT64 value);
137 
148 typedef void (*rtxBitStrValue) (OSSIZE numbits, const OSOCTET* data);
149 
160 typedef void (*rtxOctStrValue) (OSSIZE numocts, const OSOCTET* data) ;
161 
170 typedef void (*rtxCharStrValue) (const char* value) ;
171 
185 typedef void (*rtxCharStrValue16Bit) (OSSIZE nchars, OSUNICHAR* data) ;
186 
199 typedef void (*rtxCharStrValue32Bit) (OSSIZE nchars, OS32BITCHAR* data) ;
200 
208 typedef void (*rtxNullValue) (void) ;
209 
219 typedef void (*rtxOidValue) (OSUINT32 numSubIds, OSUINT32* pSubIds) ;
220 
228 typedef void (*rtxRealValue) (double value) ;
229 
239 typedef void (*rtxEnumValue) (OSUINT32 value, const OSUTF8CHAR* text);
240 
250 typedef void (*rtxOpenTypeValue) (OSSIZE numocts, const OSOCTET* data) ;
251 
265 typedef int (*rtErrorHandler) (OSCTXT *pctxt, ASN1CCB *pCCB, int stat);
266 
271 typedef struct Asn1NamedCEventHandler {
272  rtxStartElement startElement;
273  rtxEndElement endElement;
274  rtxBoolValue boolValue;
275  rtxIntValue intValue;
276  rtxUIntValue uIntValue;
277  rtxInt64Value int64Value;
278  rtxUInt64Value uInt64Value;
279  rtxBitStrValue bitStrValue;
280  rtxOctStrValue octStrValue;
281  rtxCharStrValue charStrValue;
282  rtxCharStrValue16Bit charStrValue16Bit;
283  rtxCharStrValue32Bit charStrValue32Bit;
284  rtxNullValue nullValue;
285  rtxOidValue oidValue;
286  rtxRealValue realValue;
287  rtxEnumValue enumValue;
288  rtxOpenTypeValue openTypeValue;
290 
300 EXTERNRT void rtAddEventHandler
301 (OSCTXT* pCtxt, Asn1NamedCEventHandler* pHandler);
302 
311 EXTERNRT void rtRemoveEventHandler
312 (OSCTXT* pCtxt, Asn1NamedCEventHandler* pHandler);
313 
325 EXTERNRT void rtSetErrorHandler (OSCTXT *pctxt, rtErrorHandler pErrCB);
326 
334 EXTERNRT void rtRemoveErrorHandler (OSCTXT *pctxt);
335 
349 EXTERNRT int rtInvokeErrorHandler (OSCTXT *pctxt, ASN1CCB *pCCB, int stat);
350 
351 /*
352  * The following functions are invoked from within the generated
353  * code to call the various user-defined event handler methods ..
354  */
355 
364 EXTERNRT void rtInvokeStartElement
365 (OSCTXT* pCtxt, const char* name, OSSIZE idx);
366 
375 EXTERNRT void rtInvokeEndElement
376 (OSCTXT* pCtxt, const char* name, OSSIZE idx);
377 
385 EXTERNRT void rtInvokeBoolValue (OSCTXT* pCtxt, OSBOOL value);
386 
395 EXTERNRT void rtInvokeIntValue (OSCTXT* pCtxt, OSINT32 value);
396 
405 EXTERNRT void rtInvokeUIntValue (OSCTXT* pCtxt, OSUINT32 value);
406 
415 EXTERNRT void rtInvokeInt64Value (OSCTXT* pCtxt, OSINT64 value);
416 
425 EXTERNRT void rtInvokeUInt64Value (OSCTXT* pCtxt, OSUINT64 value);
426 
435 EXTERNRT void rtInvokeBitStrValue
436 (OSCTXT* pCtxt, OSSIZE numbits, const OSOCTET* data);
437 
446 EXTERNRT void rtInvokeOctStrValue
447 (OSCTXT* pCtxt, OSSIZE numocts, const OSOCTET* data);
448 
456 EXTERNRT void rtInvokeCharStrValue (OSCTXT* pCtxt, const char* value);
457 
466 EXTERNRT void rtInvokeCharStr16BitValue
467 (OSCTXT* pCtxt, OSSIZE nchars, OSUNICHAR* data);
468 
477 EXTERNRT void rtInvokeCharStr32BitValue
478 (OSCTXT* pCtxt, OSSIZE nchars, OS32BITCHAR* data);
479 
486 EXTERNRT void rtInvokeNullValue (OSCTXT* pCtxt);
487 
496 EXTERNRT void rtInvokeOidValue
497 (OSCTXT* pCtxt, OSUINT32 numSubIds, OSUINT32* pSubIds);
498 
506 EXTERNRT void rtInvokeRealValue (OSCTXT* pCtxt, double value);
507 
517 EXTERNRT void rtInvokeEnumValue
518 (OSCTXT* pCtxt, OSUINT32 value, const OSUTF8CHAR* text);
519 
528 EXTERNRT void rtInvokeOpenTypeValue
529 (OSCTXT* pCtxt, OSSIZE numocts, const OSOCTET* data);
530 
531 
532 #ifdef __cplusplus
533 }
534 #endif
535 
536 #endif
537 
void rtInvokeEndElement(OSCTXT *pCtxt, const char *name, OSSIZE idx)
void rtInvokeBitStrValue(OSCTXT *pCtxt, OSSIZE numbits, const OSOCTET *data)
void(* rtxIntValue)(OSINT32 value)
Definition: asn1CEvtHndlr.h:105
void(* rtxOpenTypeValue)(OSSIZE numocts, const OSOCTET *data)
Definition: asn1CEvtHndlr.h:250
int rtInvokeErrorHandler(OSCTXT *pctxt, ASN1CCB *pCCB, int stat)
void rtAddEventHandler(OSCTXT *pCtxt, Asn1NamedCEventHandler *pHandler)
void rtInvokeStartElement(OSCTXT *pCtxt, const char *name, OSSIZE idx)
void(* rtxUInt64Value)(OSUINT64 value)
Definition: asn1CEvtHndlr.h:136
struct Asn1NamedCEventHandler Asn1NamedCEventHandler
void(* rtxEnumValue)(OSUINT32 value, const OSUTF8CHAR *text)
Definition: asn1CEvtHndlr.h:239
void(* rtxBoolValue)(OSBOOL value)
Definition: asn1CEvtHndlr.h:96
int(* rtErrorHandler)(OSCTXT *pctxt, ASN1CCB *pCCB, int stat)
Definition: asn1CEvtHndlr.h:265
void rtInvokeOpenTypeValue(OSCTXT *pCtxt, OSSIZE numocts, const OSOCTET *data)
void(* rtxStartElement)(const char *name, OSSIZE idx)
Definition: asn1CEvtHndlr.h:69
void rtInvokeEnumValue(OSCTXT *pCtxt, OSUINT32 value, const OSUTF8CHAR *text)
void(* rtxCharStrValue32Bit)(OSSIZE nchars, OS32BITCHAR *data)
Definition: asn1CEvtHndlr.h:199
void rtInvokeNullValue(OSCTXT *pCtxt)
void rtInvokeUInt64Value(OSCTXT *pCtxt, OSUINT64 value)
void(* rtxOidValue)(OSUINT32 numSubIds, OSUINT32 *pSubIds)
Definition: asn1CEvtHndlr.h:219
void rtSetErrorHandler(OSCTXT *pctxt, rtErrorHandler pErrCB)
void rtInvokeBoolValue(OSCTXT *pCtxt, OSBOOL value)
void rtInvokeOidValue(OSCTXT *pCtxt, OSUINT32 numSubIds, OSUINT32 *pSubIds)
void rtRemoveErrorHandler(OSCTXT *pctxt)
void(* rtxCharStrValue)(const char *value)
Definition: asn1CEvtHndlr.h:170
void rtInvokeInt64Value(OSCTXT *pCtxt, OSINT64 value)
void rtInvokeCharStrValue(OSCTXT *pCtxt, const char *value)
void rtInvokeUIntValue(OSCTXT *pCtxt, OSUINT32 value)
void rtInvokeCharStr32BitValue(OSCTXT *pCtxt, OSSIZE nchars, OS32BITCHAR *data)
void(* rtxEndElement)(const char *name, OSSIZE idx)
Definition: asn1CEvtHndlr.h:87
void(* rtxNullValue)(void)
Definition: asn1CEvtHndlr.h:208
Definition: asn1CEvtHndlr.h:271
void rtInvokeOctStrValue(OSCTXT *pCtxt, OSSIZE numocts, const OSOCTET *data)
void rtRemoveEventHandler(OSCTXT *pCtxt, Asn1NamedCEventHandler *pHandler)
void rtInvokeRealValue(OSCTXT *pCtxt, double value)
void(* rtxInt64Value)(OSINT64 value)
Definition: asn1CEvtHndlr.h:126
void(* rtxCharStrValue16Bit)(OSSIZE nchars, OSUNICHAR *data)
Definition: asn1CEvtHndlr.h:185
void(* rtxBitStrValue)(OSSIZE numbits, const OSOCTET *data)
Definition: asn1CEvtHndlr.h:148
Definition: rtxContext.h:198
Definition: asn1type.h:1502
void rtInvokeCharStr16BitValue(OSCTXT *pCtxt, OSSIZE nchars, OSUNICHAR *data)
void(* rtxOctStrValue)(OSSIZE numocts, const OSOCTET *data)
Definition: asn1CEvtHndlr.h:160
void(* rtxRealValue)(double value)
Definition: asn1CEvtHndlr.h:228
void(* rtxUIntValue)(OSUINT32 value)
Definition: asn1CEvtHndlr.h:116
void rtInvokeIntValue(OSCTXT *pCtxt, OSINT32 value)