Asn1NamedEventHandler Class Reference

class Asn1NamedEventHandler

Named event handler base class. This is the base class from which user-defined event handler classes are derived. These classes can be used to handle events during the parsing of an ASN.1 message. The event callback methods that can be implemented are startElement, endElement, and contents methods.

Public Member Functions
Asn1NamedEventHandler()
~Asn1NamedEventHandler()
EXTRTMETHOD voidaddEventHandler(OSCTXT *, Asn1NamedEventHandler *)
voidbitStrValue(OSUINT32, const OSOCTET *)
voidboolValue(OSBOOL)
voidcharStrValue(const char *)
voidcharStrValue(OSUINT32, OSUNICHAR *)
voidcharStrValue(OSUINT32, OS32BITCHAR *)
voidendElement(const char *, int)
voidenumValue(OSUINT32, const OSUTF8CHAR *)
voidint64Value(OSINT64)
voidintValue(OSINT32)
EXTRTMETHOD voidinvokeBitStrValue(OSCTXT *, OSUINT32, const OSOCTET *)
EXTRTMETHOD voidinvokeBoolValue(OSCTXT *, OSBOOL)
EXTRTMETHOD voidinvokeCharStrValue(OSCTXT *, const char *)
EXTRTMETHOD voidinvokeCharStrValue(OSCTXT *, OSUINT32, OSUNICHAR *)
EXTRTMETHOD voidinvokeCharStrValue(OSCTXT *, OSUINT32, OS32BITCHAR *)
EXTRTMETHOD voidinvokeEndElement(OSCTXT *, const char *, int)
EXTRTMETHOD voidinvokeEnumValue(OSCTXT *, OSUINT32, const OSUTF8CHAR *)
EXTRTMETHOD voidinvokeInt64Value(OSCTXT *, OSINT64)
EXTRTMETHOD voidinvokeIntValue(OSCTXT *, OSINT32)
EXTRTMETHOD voidinvokeNullValue(OSCTXT *)
EXTRTMETHOD voidinvokeOctStrValue(OSCTXT *, OSUINT32, const OSOCTET *)
EXTRTMETHOD voidinvokeOidValue(OSCTXT *, OSUINT32, OSUINT32 *)
EXTRTMETHOD voidinvokeOpenTypeValue(OSCTXT *, OSUINT32, const OSOCTET *)
EXTRTMETHOD voidinvokeRealValue(OSCTXT *, double)
EXTRTMETHOD voidinvokeStartElement(OSCTXT *, const char *, int)
EXTRTMETHOD voidinvokeUInt64Value(OSCTXT *, OSUINT64)
EXTRTMETHOD voidinvokeUIntValue(OSCTXT *, OSUINT32)
voidnullValue()
voidoctStrValue(OSUINT32, const OSOCTET *)
voidoidValue(OSUINT32, OSUINT32 *)
voidopenTypeValue(OSUINT32, const OSOCTET *)
voidrealValue(double)
EXTRTMETHOD voidremoveEventHandler(OSCTXT *, Asn1NamedEventHandler *)
voidstartElement(const char *, int)
voiduInt64Value(OSUINT64)
voiduIntValue(OSUINT32)

Constructor & Destructor Documentation

Asn1NamedEventHandler()

Asn1NamedEventHandler()[inline]

~Asn1NamedEventHandler()

~Asn1NamedEventHandler()[inline, virtual]

Member Functions Documentation

addEventHandler(OSCTXT *, Asn1NamedEventHandler *)

EXTRTMETHOD voidaddEventHandler(OSCTXT *pCtxt,
Asn1NamedEventHandler *pHandler
)[static]

Parameters

OSCTXT * pCtxt
Asn1NamedEventHandler * pHandler

bitStrValue(OSUINT32, const OSOCTET *)

voidbitStrValue(OSUINT32numbits,
const OSOCTET *data
)[pure virtual]

This method is invoked from within a decode function when a value of the BIT STRING ASN.1 type is parsed.

Parameters

OSUINT32 numbits- Number of bits in the parsed value.
const OSOCTET * data- Pointer to a byte array that contains the bit string data.

boolValue(OSBOOL)

voidboolValue(OSBOOLvalue)[pure virtual]

This method is invoked from within a decode function when a value of the BOOLEAN ASN.1 type is parsed.

Parameters

OSBOOL valueParsed value.

charStrValue(const char *)

voidcharStrValue(const char *value)[pure virtual]

This method is invoked from within a decode function when a value of one of the 8-bit ASN.1 character string types is parsed.

Parameters

const char * valueNull terminated character string value.

charStrValue(OSUINT32, OSUNICHAR *)

voidcharStrValue(OSUINT32nchars,
OSUNICHAR *data
)[pure virtual]

This method 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

OSUINT32 ncharsNumber of characters in the parsed value.
OSUNICHAR * dataPointer to an array containing 16-bit values. These are represented using unsigned short integer values.

charStrValue(OSUINT32, OS32BITCHAR *)

voidcharStrValue(OSUINT32nchars,
OS32BITCHAR *data
)[pure virtual]

This method 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

OSUINT32 ncharsNumber of characters in the parsed value.
OS32BITCHAR * dataPointer to an array containing 32-bit values. Each 32-bit integer value is a universal character.

endElement(const char *, int)

voidendElement(const char *name,
intindex
)[pure virtual]

This method 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

const char * nameFor 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".
int indexFor 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.

enumValue(OSUINT32, const OSUTF8CHAR *)

voidenumValue(OSUINT32value,
const OSUTF8CHAR *text
)[pure virtual]

This method is invoked from within a decode function when a value of the ENUMERATED ASN.1 type is parsed.

Parameters

OSUINT32 value- Parsed enumerated value
const OSUTF8CHAR * text- Textual value of enumerated identifier

int64Value(OSINT64)

voidint64Value(OSINT64value)[inline, virtual]

This method is invoked from within a decode function when a value of the 64-bit INTEGER ASN.1 type is parsed.

Parameters

OSINT64 valueParsed value.

intValue(OSINT32)

voidintValue(OSINT32value)[pure virtual]

This method is invoked from within a decode function when a value of the INTEGER ASN.1 type is parsed.

Parameters

OSINT32 valueParsed value.

invokeBitStrValue(OSCTXT *, OSUINT32, const OSOCTET *)

EXTRTMETHOD voidinvokeBitStrValue(OSCTXT *pCtxt,
OSUINT32numbits,
const OSOCTET *data
)[static]

Parameters

OSCTXT * pCtxt
OSUINT32 numbits
const OSOCTET * data

invokeBoolValue(OSCTXT *, OSBOOL)

EXTRTMETHOD voidinvokeBoolValue(OSCTXT *pCtxt,
OSBOOLvalue
)[static]

Parameters

OSCTXT * pCtxt
OSBOOL value

invokeCharStrValue(OSCTXT *, const char *)

EXTRTMETHOD voidinvokeCharStrValue(OSCTXT *pCtxt,
const char *value
)[static]

Parameters

OSCTXT * pCtxt
const char * value

invokeCharStrValue(OSCTXT *, OSUINT32, OSUNICHAR *)

EXTRTMETHOD voidinvokeCharStrValue(OSCTXT *pCtxt,
OSUINT32nchars,
OSUNICHAR *data
)[static]

Parameters

OSCTXT * pCtxt
OSUINT32 nchars
OSUNICHAR * data

invokeCharStrValue(OSCTXT *, OSUINT32, OS32BITCHAR *)

EXTRTMETHOD voidinvokeCharStrValue(OSCTXT *pCtxt,
OSUINT32nchars,
OS32BITCHAR *data
)[static]

Parameters

OSCTXT * pCtxt
OSUINT32 nchars
OS32BITCHAR * data

invokeEndElement(OSCTXT *, const char *, int)

EXTRTMETHOD voidinvokeEndElement(OSCTXT *pCtxt,
const char *name,
intindex
)[static]

Parameters

OSCTXT * pCtxt
const char * name
int index

invokeEnumValue(OSCTXT *, OSUINT32, const OSUTF8CHAR *)

EXTRTMETHOD voidinvokeEnumValue(OSCTXT *pCtxt,
OSUINT32value,
const OSUTF8CHAR *text
)[static]

Parameters

OSCTXT * pCtxt
OSUINT32 value
const OSUTF8CHAR * text

invokeInt64Value(OSCTXT *, OSINT64)

EXTRTMETHOD voidinvokeInt64Value(OSCTXT *pCtxt,
OSINT64value
)[static]

Parameters

OSCTXT * pCtxt
OSINT64 value

invokeIntValue(OSCTXT *, OSINT32)

EXTRTMETHOD voidinvokeIntValue(OSCTXT *pCtxt,
OSINT32value
)[static]

Parameters

OSCTXT * pCtxt
OSINT32 value

invokeNullValue(OSCTXT *)

EXTRTMETHOD voidinvokeNullValue(OSCTXT *pCtxt)[static]

Parameters

OSCTXT * pCtxt

invokeOctStrValue(OSCTXT *, OSUINT32, const OSOCTET *)

EXTRTMETHOD voidinvokeOctStrValue(OSCTXT *pCtxt,
OSUINT32numocts,
const OSOCTET *data
)[static]

Parameters

OSCTXT * pCtxt
OSUINT32 numocts
const OSOCTET * data

invokeOidValue(OSCTXT *, OSUINT32, OSUINT32 *)

EXTRTMETHOD voidinvokeOidValue(OSCTXT *pCtxt,
OSUINT32numSubIds,
OSUINT32 *pSubIds
)[static]

Parameters

OSCTXT * pCtxt
OSUINT32 numSubIds
OSUINT32 * pSubIds

invokeOpenTypeValue(OSCTXT *, OSUINT32, const OSOCTET *)

EXTRTMETHOD voidinvokeOpenTypeValue(OSCTXT *pCtxt,
OSUINT32numocts,
const OSOCTET *data
)[static]

Parameters

OSCTXT * pCtxt
OSUINT32 numocts
const OSOCTET * data

invokeRealValue(OSCTXT *, double)

EXTRTMETHOD voidinvokeRealValue(OSCTXT *pCtxt,
doublevalue
)[static]

Parameters

OSCTXT * pCtxt
double value

invokeStartElement(OSCTXT *, const char *, int)

EXTRTMETHOD voidinvokeStartElement(OSCTXT *pCtxt,
const char *name,
intindex
)[static]

Parameters

OSCTXT * pCtxt
const char * name
int index

invokeUInt64Value(OSCTXT *, OSUINT64)

EXTRTMETHOD voidinvokeUInt64Value(OSCTXT *pCtxt,
OSUINT64value
)[static]

Parameters

OSCTXT * pCtxt
OSUINT64 value

invokeUIntValue(OSCTXT *, OSUINT32)

EXTRTMETHOD voidinvokeUIntValue(OSCTXT *pCtxt,
OSUINT32value
)[static]

Parameters

OSCTXT * pCtxt
OSUINT32 value

nullValue()

voidnullValue()[pure virtual]

This method is invoked from within a decode function when a value of the NULL ASN.1 type is parsed.

octStrValue(OSUINT32, const OSOCTET *)

voidoctStrValue(OSUINT32numocts,
const OSOCTET *data
)[pure virtual]

This method is invoked from within a decode function when a value of one of the OCTET STRING ASN.1 type is parsed.

Parameters

OSUINT32 numoctsNumber of octets in the parsed value.
const OSOCTET * dataPointer to byte array containing the octet string data.

oidValue(OSUINT32, OSUINT32 *)

voidoidValue(OSUINT32numSubIds,
OSUINT32 *pSubIds
)[pure virtual]

This method is invoked from within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is parsed.

Parameters

OSUINT32 numSubIdsNumber of subidentifiers in the object identifier.
OSUINT32 * pSubIdsPointer to array containing the subidentifier values.

openTypeValue(OSUINT32, const OSOCTET *)

voidopenTypeValue(OSUINT32numocts,
const OSOCTET *data
)[pure virtual]

This value is invoked from within a decode function when an ASN.1 open type is parsed.

Parameters

OSUINT32 numoctsNumber of octets in the parsed value.
const OSOCTET * dataPointer to byet array contain in tencoded ASN.1 value.

realValue(double)

voidrealValue(doublevalue)[pure virtual]

This method is invoked from within a decode function when a value the REAL ASN.1 type is parsed.

Parameters

double valueParsed value.

removeEventHandler(OSCTXT *, Asn1NamedEventHandler *)

EXTRTMETHOD voidremoveEventHandler(OSCTXT *pCtxt,
Asn1NamedEventHandler *pHandler
)[static]

Parameters

OSCTXT * pCtxt
Asn1NamedEventHandler * pHandler

startElement(const char *, int)

voidstartElement(const char *name,
intindex
)[pure virtual]

This method is invoked from within a decode function when an element of a SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct is parsed.

Parameters

const char * nameFor 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".
int indexFor 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.

uInt64Value(OSUINT64)

voiduInt64Value(OSUINT64value)[inline, virtual]

This method is invoked from within a decode function when a value of the 64-bit INTEGER ASN.1 type is parsed.

Parameters

OSUINT64 valueParsed value.

uIntValue(OSUINT32)

voiduIntValue(OSUINT32value)[pure virtual]

This method 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

OSUINT32 valueParsed value.