ASN1C C/C++ Common Runtime  ASN1C v7.4.x
asn1CEvtHndlr.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2020 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 
36 #ifndef _ASN1CEVTHNDLR_H_
37 #define _ASN1CEVTHNDLR_H_
38 
39 #include <stdio.h>
40 #include "rtsrc/asn1type.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
62 typedef void (*rtxStartElement) (const char* name, OSSIZE idx) ;
63 
80 typedef void (*rtxEndElement) (const char* name, OSSIZE idx) ;
81 
89 typedef void (*rtxBoolValue) (OSBOOL value);
90 
98 typedef void (*rtxIntValue) (OSINT32 value);
99 
109 typedef void (*rtxUIntValue) (OSUINT32 value);
110 
119 typedef void (*rtxInt64Value) (OSINT64 value);
120 
129 typedef void (*rtxUInt64Value) (OSUINT64 value);
130 
141 typedef void (*rtxBitStrValue) (OSSIZE numbits, const OSOCTET* data);
142 
153 typedef void (*rtxOctStrValue) (OSSIZE numocts, const OSOCTET* data) ;
154 
163 typedef void (*rtxCharStrValue) (const char* value) ;
164 
178 typedef void (*rtxCharStrValue16Bit) (OSSIZE nchars, OSUNICHAR* data) ;
179 
192 typedef void (*rtxCharStrValue32Bit) (OSSIZE nchars, OS32BITCHAR* data) ;
193 
201 typedef void (*rtxNullValue) (void) ;
202 
212 typedef void (*rtxOidValue) (OSUINT32 numSubIds, OSUINT32* pSubIds) ;
213 
221 typedef void (*rtxRealValue) (double value) ;
222 
232 typedef void (*rtxEnumValue) (OSUINT32 value, const OSUTF8CHAR* text);
233 
243 typedef void (*rtxOpenTypeValue) (OSSIZE numocts, const OSOCTET* data) ;
244 
258 typedef int (*rtErrorHandler) (OSCTXT *pctxt, ASN1CCB *pCCB, int stat);
259 
264 typedef struct Asn1NamedCEventHandler {
265  rtxStartElement startElement;
266  rtxEndElement endElement;
267  rtxBoolValue boolValue;
268  rtxIntValue intValue;
269  rtxUIntValue uIntValue;
270  rtxInt64Value int64Value;
271  rtxUInt64Value uInt64Value;
272  rtxBitStrValue bitStrValue;
273  rtxOctStrValue octStrValue;
274  rtxCharStrValue charStrValue;
275  rtxCharStrValue16Bit charStrValue16Bit;
276  rtxCharStrValue32Bit charStrValue32Bit;
277  rtxNullValue nullValue;
278  rtxOidValue oidValue;
279  rtxRealValue realValue;
280  rtxEnumValue enumValue;
281  rtxOpenTypeValue openTypeValue;
283 
293 EXTERNRT void rtAddEventHandler
294 (OSCTXT* pCtxt, Asn1NamedCEventHandler* pHandler);
295 
304 EXTERNRT void rtRemoveEventHandler
305 (OSCTXT* pCtxt, Asn1NamedCEventHandler* pHandler);
306 
318 EXTERNRT void rtSetErrorHandler (OSCTXT *pctxt, rtErrorHandler pErrCB);
319 
327 EXTERNRT void rtRemoveErrorHandler (OSCTXT *pctxt);
328 
342 EXTERNRT int rtInvokeErrorHandler (OSCTXT *pctxt, ASN1CCB *pCCB, int stat);
343 
344 /*
345  * The following functions are invoked from within the generated
346  * code to call the various user-defined event handler methods ..
347  */
348 
357 EXTERNRT void rtInvokeStartElement
358 (OSCTXT* pCtxt, const char* name, OSSIZE idx);
359 
368 EXTERNRT void rtInvokeEndElement
369 (OSCTXT* pCtxt, const char* name, OSSIZE idx);
370 
378 EXTERNRT void rtInvokeBoolValue (OSCTXT* pCtxt, OSBOOL value);
379 
388 EXTERNRT void rtInvokeIntValue (OSCTXT* pCtxt, OSINT32 value);
389 
398 EXTERNRT void rtInvokeUIntValue (OSCTXT* pCtxt, OSUINT32 value);
399 
408 EXTERNRT void rtInvokeInt64Value (OSCTXT* pCtxt, OSINT64 value);
409 
418 EXTERNRT void rtInvokeUInt64Value (OSCTXT* pCtxt, OSUINT64 value);
419 
428 EXTERNRT void rtInvokeBitStrValue
429 (OSCTXT* pCtxt, OSSIZE numbits, const OSOCTET* data);
430 
439 EXTERNRT void rtInvokeOctStrValue
440 (OSCTXT* pCtxt, OSSIZE numocts, const OSOCTET* data);
441 
449 EXTERNRT void rtInvokeCharStrValue (OSCTXT* pCtxt, const char* value);
450 
459 EXTERNRT void rtInvokeCharStr16BitValue
460 (OSCTXT* pCtxt, OSSIZE nchars, OSUNICHAR* data);
461 
470 EXTERNRT void rtInvokeCharStr32BitValue
471 (OSCTXT* pCtxt, OSSIZE nchars, OS32BITCHAR* data);
472 
479 EXTERNRT void rtInvokeNullValue (OSCTXT* pCtxt);
480 
489 EXTERNRT void rtInvokeOidValue
490 (OSCTXT* pCtxt, OSUINT32 numSubIds, OSUINT32* pSubIds);
491 
499 EXTERNRT void rtInvokeRealValue (OSCTXT* pCtxt, double value);
500 
510 EXTERNRT void rtInvokeEnumValue
511 (OSCTXT* pCtxt, OSUINT32 value, const OSUTF8CHAR* text);
512 
521 EXTERNRT void rtInvokeOpenTypeValue
522 (OSCTXT* pCtxt, OSSIZE numocts, const OSOCTET* data);
523 
524 
525 #ifdef __cplusplus
526 }
527 #endif
528 
529 #endif
530 
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:98
void(* rtxOpenTypeValue)(OSSIZE numocts, const OSOCTET *data)
Definition: asn1CEvtHndlr.h:243
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:129
struct Asn1NamedCEventHandler Asn1NamedCEventHandler
void(* rtxEnumValue)(OSUINT32 value, const OSUTF8CHAR *text)
Definition: asn1CEvtHndlr.h:232
void(* rtxBoolValue)(OSBOOL value)
Definition: asn1CEvtHndlr.h:89
int(* rtErrorHandler)(OSCTXT *pctxt, ASN1CCB *pCCB, int stat)
Definition: asn1CEvtHndlr.h:258
void rtInvokeOpenTypeValue(OSCTXT *pCtxt, OSSIZE numocts, const OSOCTET *data)
void(* rtxStartElement)(const char *name, OSSIZE idx)
Definition: asn1CEvtHndlr.h:62
void rtInvokeEnumValue(OSCTXT *pCtxt, OSUINT32 value, const OSUTF8CHAR *text)
void(* rtxCharStrValue32Bit)(OSSIZE nchars, OS32BITCHAR *data)
Definition: asn1CEvtHndlr.h:192
void rtInvokeNullValue(OSCTXT *pCtxt)
void rtInvokeUInt64Value(OSCTXT *pCtxt, OSUINT64 value)
void(* rtxOidValue)(OSUINT32 numSubIds, OSUINT32 *pSubIds)
Definition: asn1CEvtHndlr.h:212
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:163
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:80
void(* rtxNullValue)(void)
Definition: asn1CEvtHndlr.h:201
Definition: asn1CEvtHndlr.h:264
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:119
void(* rtxCharStrValue16Bit)(OSSIZE nchars, OSUNICHAR *data)
Definition: asn1CEvtHndlr.h:178
void(* rtxBitStrValue)(OSSIZE numbits, const OSOCTET *data)
Definition: asn1CEvtHndlr.h:141
Definition: rtxContext.h:189
Definition: asn1type.h:1396
void rtInvokeCharStr16BitValue(OSCTXT *pCtxt, OSSIZE nchars, OSUNICHAR *data)
void(* rtxOctStrValue)(OSSIZE numocts, const OSOCTET *data)
Definition: asn1CEvtHndlr.h:153
void(* rtxRealValue)(double value)
Definition: asn1CEvtHndlr.h:221
void(* rtxUIntValue)(OSUINT32 value)
Definition: asn1CEvtHndlr.h:109
void rtInvokeIntValue(OSCTXT *pCtxt, OSINT32 value)