Asn1CEventHandler
[C++ Run-Time Classes]
Classes | |
struct | Asn1NamedCEventHandler |
Typedefs | |
typedef void(* | rtxStartElement )(const char *name, int idx) |
typedef void(* | rtxEndElement )(const char *name, int idx) |
typedef void(* | rtxBoolValue )(OSBOOL value) |
typedef void(* | rtxIntValue )(OSINT32 value) |
typedef void(* | rtxUIntValue )(OSUINT32 value) |
typedef void(* | rtxInt64Value )(OSINT64 value) |
typedef void(* | rtxUInt64Value )(OSUINT64 value) |
typedef void(* | rtxBitStrValue )(OSUINT32 numbits, const OSOCTET *data) |
typedef void(* | rtxOctStrValue )(OSUINT32 numocts, const OSOCTET *data) |
typedef void(* | rtxCharStrValue )(const char *value) |
typedef void(* | rtxCharStrValue16Bit )(OSUINT32 nchars, OSUNICHAR *data) |
typedef void(* | rtxCharStrValue32Bit )(OSUINT32 nchars, OS32BITCHAR *data) |
typedef void(* | rtxNullValue )(void) |
typedef void(* | rtxOidValue )(OSUINT32 numSubIds, OSUINT32 *pSubIds) |
typedef void(* | rtxRealValue )(double value) |
typedef void(* | rtxEnumValue )(OSUINT32 value, const OSUTF8CHAR *text) |
typedef void(* | rtxOpenTypeValue )(OSUINT32 numocts, const OSOCTET *data) |
typedef int(* | rtErrorHandler )(OSCTXT *pctxt, ASN1CCB *pCCB, int stat) |
typedef struct Asn1NamedCEventHandler | Asn1NamedCEventHandler |
Functions | |
void | rtAddEventHandler (OSCTXT *pCtxt, Asn1NamedCEventHandler *pHandler) |
void | rtRemoveEventHandler (OSCTXT *pCtxt, Asn1NamedCEventHandler *pHandler) |
void | rtSetErrorHandler (OSCTXT *pctxt, rtErrorHandler pErrCB) |
void | rtRemoveErrorHandler (OSCTXT *pctxt) |
int | rtInvokeErrorHandler (OSCTXT *pctxt, ASN1CCB *pCCB, int stat) |
void | rtInvokeStartElement (OSCTXT *pCtxt, const char *name, int idx) |
void | rtInvokeEndElement (OSCTXT *pCtxt, const char *name, int idx) |
void | rtInvokeBoolValue (OSCTXT *pCtxt, OSBOOL value) |
void | rtInvokeIntValue (OSCTXT *pCtxt, OSINT32 value) |
void | rtInvokeUIntValue (OSCTXT *pCtxt, OSUINT32 value) |
void | rtInvokeInt64Value (OSCTXT *pCtxt, OSINT64 value) |
void | rtInvokeUInt64Value (OSCTXT *pCtxt, OSUINT64 value) |
void | rtInvokeBitStrValue (OSCTXT *pCtxt, OSUINT32 numbits, const OSOCTET *data) |
void | rtInvokeOctStrValue (OSCTXT *pCtxt, OSUINT32 numocts, const OSOCTET *data) |
void | rtInvokeCharStrValue (OSCTXT *pCtxt, const char *value) |
void | rtInvokeCharStr16BitValue (OSCTXT *pCtxt, OSUINT32 nchars, OSUNICHAR *data) |
void | rtInvokeCharStr32BitValue (OSCTXT *pCtxt, OSUINT32 nchars, OS32BITCHAR *data) |
void | rtInvokeNullValue (OSCTXT *pCtxt) |
void | rtInvokeOidValue (OSCTXT *pCtxt, OSUINT32 numSubIds, OSUINT32 *pSubIds) |
void | rtInvokeRealValue (OSCTXT *pCtxt, double value) |
void | rtInvokeEnumValue (OSCTXT *pCtxt, OSUINT32 value, const OSUTF8CHAR *text) |
void | rtInvokeOpenTypeValue (OSCTXT *pCtxt, OSUINT32 numocts, const OSOCTET *data) |
Detailed Description
Asn1CEventHandler is a structure typed used for user-defined event handlers.
Typedef Documentation
typedef struct Asn1NamedCEventHandler Asn1NamedCEventHandler |
This is a basic C based event handler structure, which can be used to define user-defined event handlers.
typedef int(* rtErrorHandler)(OSCTXT *pctxt, ASN1CCB *pCCB, int stat) |
This is a function pointer for a callback function which is invoked from within a decode function when an error occurs. This allows users to intercept errors in decoding and recover from them.
- Parameters:
-
pctxt Pointer to an OSCTXT data structure. pCCB Pointer to an ASN1CCB data structure; this is the context control block that contains information pertinent to parsing data in an ASN.1 message. stat The error status.
- Returns:
- The new error status.
typedef void(* rtxBitStrValue)(OSUINT32 numbits, const OSOCTET *data) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the BIT STRING ASN.1 type is parsed.
- Parameters:
-
numbits - Number of bits in the parsed value. data - Pointer to a byte array that contains the bit string data.
- Returns:
- - none
typedef void(* rtxBoolValue)(OSBOOL value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the BOOLEAN ASN.1 type is parsed.
- Parameters:
-
value Parsed value.
- Returns:
- - none
typedef void(* rtxCharStrValue)(const char *value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of one of the 8-bit ASN.1 character string types is parsed.
- Parameters:
-
value Null terminated character string value.
- Returns:
- - none
typedef void(* rtxCharStrValue16Bit)(OSUINT32 nchars, OSUNICHAR *data) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of one of the 16-bit ASN.1 character string types is parsed.
This is used for the ASN.1 BmpString type.
- Parameters:
-
nchars Number of characters in the parsed value. data Pointer to an array containing 16-bit values. These are represented using unsigned short integer values.
- Returns:
- - none
typedef void(* rtxCharStrValue32Bit)(OSUINT32 nchars, OS32BITCHAR *data) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of one of the 32-bit ASN.1 characer string types is parsed.
This is used for the ASN.1 UniversalString type.
- Parameters:
-
nchars Number of characters in the parsed value. data Pointer to an array containing 32-bit values. Each 32-bit integer value is a universal character.
- Returns:
- - none
typedef void(* rtxEndElement)(const char *name, int idx) |
This is a function pointer for a callback function which is invoked from within a decode function when parsing is complete on an element of a SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct.
- Parameters:
-
name For SEQUENCE, SET, or CHOICE, this is the name of the element as defined in the ASN.1 defination. For SEQUENCE OF or SET OF, this is set to the name "element". idx For SEQUENCE, SET, or CHOICE, this is not used and is set to the value -1. For SEQUENCE OF or SET OF, this contains the zero-based index of the element in the conceptual array associated with the construct.
- Returns:
- - none
typedef void(* rtxEnumValue)(OSUINT32 value, const OSUTF8CHAR *text) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the ENUMERATED ASN.1 type is parsed.
- Parameters:
-
value - Parsed enumerated value text - Textual value of the enumerated identifier
- Returns:
- - none
typedef void(* rtxInt64Value)(OSINT64 value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the 64-bit INTERGER ASN.1 type is parsed.
- Parameters:
-
value Parsed value.
- Returns:
- - none
typedef void(* rtxIntValue)(OSINT32 value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the INTERGER ASN.1 type is parsed.
- Parameters:
-
value Parsed value.
- Returns:
- - none
typedef void(* rtxNullValue)(void) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the NULL ASN.1 type is parsed.
- Parameters:
-
- none
- Returns:
- - none
typedef void(* rtxOctStrValue)(OSUINT32 numocts, const OSOCTET *data) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of one of the OCTET STRING ASN.1 type is parsed.
- Parameters:
-
numocts Number of octets in the parsed value. data Pointer to byte array containing the octet string data.
- Returns:
- - none
typedef void(* rtxOidValue)(OSUINT32 numSubIds, OSUINT32 *pSubIds) |
This is a function pointer for a callback function which is invoked from within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is parsed.
- Parameters:
-
numSubIds Number of subidentifiers in the object identifier. pSubIds Pointer to array containing the subidentifier values.
- Returns:
- -none
typedef void(* rtxOpenTypeValue)(OSUINT32 numocts, const OSOCTET *data) |
This is a function pointer for a callback function which is invoked from within a decode function when an ASN.1 open type is parsed.
- Parameters:
-
numocts Number of octets in the parsed value. data Pointer to byet array contain in tencoded ASN.1 value.
- Returns:
- - none
typedef void(* rtxRealValue)(double value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value the REAL ASN.1 type is parsed.
- Parameters:
-
value Parsed value.
- Returns:
- - none
typedef void(* rtxStartElement)(const char *name, int idx) |
This is a function pointer for a callback function which is invoked from within a decode function when an element of a SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct is parsed.
- Parameters:
-
name For SEQUENCE, SET, or CHOICE, this is the name of the element as defined in the ASN.1 defination. For SEQUENCE OF or SET OF, this is set to the name "element". idx For SEQUENCE, SET, or CHOICE, this is not used and is set to the value -1. For SEQUENCE OF or SET OF, this contains the zero-based index of the element in the conceptual array associated with the construct.
- Returns:
- - none
typedef void(* rtxUInt64Value)(OSUINT64 value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the 64-bit INTEGER ASN.1 type is parsed.
- Parameters:
-
value Parsed value.
- Returns:
- - none
typedef void(* rtxUIntValue)(OSUINT32 value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the INTEGER ASN.1 type is parsed. In this case, constraints on the integer value forced the use of unsigned integer C type to represent the value.
- Parameters:
-
value Parsed value.
- Returns:
- - none
Function Documentation
void rtAddEventHandler | ( | OSCTXT * | pCtxt, | |
Asn1NamedCEventHandler * | pHandler | |||
) |
This function is called to add a new event handler to the context event handler list.
- Parameters:
-
pCtxt Context to which event handler has to be added. pHandler Pointer to the event handler structure.
- Returns:
- none
This function invokes the error handler callback defined inside the context.
- Parameters:
-
pctxt A pointer to an OSCTXT data structure. pCCB A pointer to an ASN1CCB data structure. stat The error status encountered.
- Returns:
- None.
- See also:
- rtSetErrorHandler
- rtErrorHandler
void rtInvokeStartElement | ( | OSCTXT * | pCtxt, | |
const char * | name, | |||
int | idx | |||
) |
The following functions are invoked from within the generated code to call the various user-defined event handler methods ..
void rtRemoveErrorHandler | ( | OSCTXT * | pctxt | ) |
This function removes the error handler from the given context.
- Parameters:
-
pctxt A pointer to an OSCTXT data structure.
- Returns:
- None.
void rtRemoveEventHandler | ( | OSCTXT * | pCtxt, | |
Asn1NamedCEventHandler * | pHandler | |||
) |
This function is called to remove an event handler from the context event handler list. Note that it does not delete the event handler object.
- Parameters:
-
pCtxt Context from which event handler has to be removed. pHandler Pointer to event handler structure.
- Returns:
- none
void rtSetErrorHandler | ( | OSCTXT * | pctxt, | |
rtErrorHandler | pErrCB | |||
) |
This function is called to set the error handler in an OSCTXT data structure. The error handler is called within generated code if an error occurs during message parsing. Only one error handler may be used at a time.
- Parameters:
-
pctxt A pointer to an OSCTXT structure used for decoding. pErrCB A pointer to the rtErrorHandler callback function.
- Returns:
- None.