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 void addEventHandler ( OSCTXT *, Asn1NamedEventHandler *)
void bitStrValue ( OSUINT32 , const OSOCTET *)
void boolValue ( OSBOOL )
void charStrValue (const char *)
void charStrValue ( OSUINT32 , OSUNICHAR *)
void charStrValue ( OSUINT32 , OS32BITCHAR *)
void endElement (const char *, int)
void enumValue ( OSUINT32 , const OSUTF8CHAR *)
void int64Value ( OSINT64 )
void intValue ( OSINT32 )
EXTRTMETHOD void invokeBitStrValue ( OSCTXT *, OSUINT32 , const OSOCTET *)
EXTRTMETHOD void invokeBoolValue ( OSCTXT *, OSBOOL )
EXTRTMETHOD void invokeCharStrValue ( OSCTXT *, const char *)
EXTRTMETHOD void invokeCharStrValue ( OSCTXT *, OSUINT32 , OSUNICHAR *)
EXTRTMETHOD void invokeCharStrValue ( OSCTXT *, OSUINT32 , OS32BITCHAR *)
EXTRTMETHOD void invokeEndElement ( OSCTXT *, const char *, int)
EXTRTMETHOD void invokeEnumValue ( OSCTXT *, OSUINT32 , const OSUTF8CHAR *)
EXTRTMETHOD void invokeInt64Value ( OSCTXT *, OSINT64 )
EXTRTMETHOD void invokeIntValue ( OSCTXT *, OSINT32 )
EXTRTMETHOD void invokeNullValue ( OSCTXT *)
EXTRTMETHOD void invokeOctStrValue ( OSCTXT *, OSUINT32 , const OSOCTET *)
EXTRTMETHOD void invokeOidValue ( OSCTXT *, OSUINT32 , OSUINT32 *)
EXTRTMETHOD void invokeOpenTypeValue ( OSCTXT *, OSUINT32 , const OSOCTET *)
EXTRTMETHOD void invokeRealValue ( OSCTXT *, double)
EXTRTMETHOD void invokeStartElement ( OSCTXT *, const char *, int)
EXTRTMETHOD void invokeUInt64Value ( OSCTXT *, OSUINT64 )
EXTRTMETHOD void invokeUIntValue ( OSCTXT *, OSUINT32 )
void nullValue ()
void octStrValue ( OSUINT32 , const OSOCTET *)
void oidValue ( OSUINT32 , OSUINT32 *)
void openTypeValue ( OSUINT32 , const OSOCTET *)
void realValue (double)
EXTRTMETHOD void removeEventHandler ( OSCTXT *, Asn1NamedEventHandler *)
void startElement (const char *, int)
void uInt64Value ( OSUINT64 )
void uIntValue ( OSUINT32 )

Constructor & Destructor Documentation

Asn1NamedEventHandler()

Asn1NamedEventHandler ( ) [inline]

~Asn1NamedEventHandler()

~Asn1NamedEventHandler ( ) [inline, virtual]

Member Functions Documentation

addEventHandler(OSCTXT *, Asn1NamedEventHandler *)

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

Parameters

OSCTXT * pCtxt
Asn1NamedEventHandler * pHandler

bitStrValue(OSUINT32, const OSOCTET *)

void bitStrValue ( OSUINT32 numbits,
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)

void boolValue ( OSBOOL value ) [pure virtual]

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

Parameters

OSBOOL value Parsed value.

charStrValue(const char *)

void charStrValue ( 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 * value Null terminated character string value.

charStrValue(OSUINT32, OSUNICHAR *)

void charStrValue ( OSUINT32 nchars,
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 nchars Number of characters in the parsed value.
OSUNICHAR * data Pointer to an array containing 16-bit values. These are represented using unsigned short integer values.

charStrValue(OSUINT32, OS32BITCHAR *)

void charStrValue ( OSUINT32 nchars,
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 nchars Number of characters in the parsed value.
OS32BITCHAR * data Pointer to an array containing 32-bit values. Each 32-bit integer value is a universal character.

endElement(const char *, int)

void endElement ( const char * name,
int index
) [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 * 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".
int index 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.

enumValue(OSUINT32, const OSUTF8CHAR *)

void enumValue ( OSUINT32 value,
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)

void int64Value ( OSINT64 value ) [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 value Parsed value.

intValue(OSINT32)

void intValue ( OSINT32 value ) [pure virtual]

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

Parameters

OSINT32 value Parsed value.

invokeBitStrValue(OSCTXT *, OSUINT32, const OSOCTET *)

EXTRTMETHOD void invokeBitStrValue ( OSCTXT * pCtxt,
OSUINT32 numbits,
const OSOCTET * data
) [static]

Parameters

OSCTXT * pCtxt
OSUINT32 numbits
const OSOCTET * data

invokeBoolValue(OSCTXT *, OSBOOL)

EXTRTMETHOD void invokeBoolValue ( OSCTXT * pCtxt,
OSBOOL value
) [static]

Parameters

OSCTXT * pCtxt
OSBOOL value

invokeCharStrValue(OSCTXT *, const char *)

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

Parameters

OSCTXT * pCtxt
const char * value

invokeCharStrValue(OSCTXT *, OSUINT32, OSUNICHAR *)

EXTRTMETHOD void invokeCharStrValue ( OSCTXT * pCtxt,
OSUINT32 nchars,
OSUNICHAR * data
) [static]

Parameters

OSCTXT * pCtxt
OSUINT32 nchars
OSUNICHAR * data

invokeCharStrValue(OSCTXT *, OSUINT32, OS32BITCHAR *)

EXTRTMETHOD void invokeCharStrValue ( OSCTXT * pCtxt,
OSUINT32 nchars,
OS32BITCHAR * data
) [static]

Parameters

OSCTXT * pCtxt
OSUINT32 nchars
OS32BITCHAR * data

invokeEndElement(OSCTXT *, const char *, int)

EXTRTMETHOD void invokeEndElement ( OSCTXT * pCtxt,
const char * name,
int index
) [static]

Parameters

OSCTXT * pCtxt
const char * name
int index

invokeEnumValue(OSCTXT *, OSUINT32, const OSUTF8CHAR *)

EXTRTMETHOD void invokeEnumValue ( OSCTXT * pCtxt,
OSUINT32 value,
const OSUTF8CHAR * text
) [static]

Parameters

OSCTXT * pCtxt
OSUINT32 value
const OSUTF8CHAR * text

invokeInt64Value(OSCTXT *, OSINT64)

EXTRTMETHOD void invokeInt64Value ( OSCTXT * pCtxt,
OSINT64 value
) [static]

Parameters

OSCTXT * pCtxt
OSINT64 value

invokeIntValue(OSCTXT *, OSINT32)

EXTRTMETHOD void invokeIntValue ( OSCTXT * pCtxt,
OSINT32 value
) [static]

Parameters

OSCTXT * pCtxt
OSINT32 value

invokeNullValue(OSCTXT *)

EXTRTMETHOD void invokeNullValue ( OSCTXT * pCtxt ) [static]

Parameters

OSCTXT * pCtxt

invokeOctStrValue(OSCTXT *, OSUINT32, const OSOCTET *)

EXTRTMETHOD void invokeOctStrValue ( OSCTXT * pCtxt,
OSUINT32 numocts,
const OSOCTET * data
) [static]

Parameters

OSCTXT * pCtxt
OSUINT32 numocts
const OSOCTET * data

invokeOidValue(OSCTXT *, OSUINT32, OSUINT32 *)

EXTRTMETHOD void invokeOidValue ( OSCTXT * pCtxt,
OSUINT32 numSubIds,
OSUINT32 * pSubIds
) [static]

Parameters

OSCTXT * pCtxt
OSUINT32 numSubIds
OSUINT32 * pSubIds

invokeOpenTypeValue(OSCTXT *, OSUINT32, const OSOCTET *)

EXTRTMETHOD void invokeOpenTypeValue ( OSCTXT * pCtxt,
OSUINT32 numocts,
const OSOCTET * data
) [static]

Parameters

OSCTXT * pCtxt
OSUINT32 numocts
const OSOCTET * data

invokeRealValue(OSCTXT *, double)

EXTRTMETHOD void invokeRealValue ( OSCTXT * pCtxt,
double value
) [static]

Parameters

OSCTXT * pCtxt
double value

invokeStartElement(OSCTXT *, const char *, int)

EXTRTMETHOD void invokeStartElement ( OSCTXT * pCtxt,
const char * name,
int index
) [static]

Parameters

OSCTXT * pCtxt
const char * name
int index

invokeUInt64Value(OSCTXT *, OSUINT64)

EXTRTMETHOD void invokeUInt64Value ( OSCTXT * pCtxt,
OSUINT64 value
) [static]

Parameters

OSCTXT * pCtxt
OSUINT64 value

invokeUIntValue(OSCTXT *, OSUINT32)

EXTRTMETHOD void invokeUIntValue ( OSCTXT * pCtxt,
OSUINT32 value
) [static]

Parameters

OSCTXT * pCtxt
OSUINT32 value

nullValue()

void nullValue ( ) [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 *)

void octStrValue ( OSUINT32 numocts,
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 numocts Number of octets in the parsed value.
const OSOCTET * data Pointer to byte array containing the octet string data.

oidValue(OSUINT32, OSUINT32 *)

void oidValue ( OSUINT32 numSubIds,
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 numSubIds Number of subidentifiers in the object identifier.
OSUINT32 * pSubIds Pointer to array containing the subidentifier values.

openTypeValue(OSUINT32, const OSOCTET *)

void openTypeValue ( OSUINT32 numocts,
const OSOCTET * data
) [pure virtual]

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

Parameters

OSUINT32 numocts Number of octets in the parsed value.
const OSOCTET * data Pointer to byet array contain in tencoded ASN.1 value.

realValue(double)

void realValue ( double value ) [pure virtual]

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

Parameters

double value Parsed value.

removeEventHandler(OSCTXT *, Asn1NamedEventHandler *)

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

Parameters

OSCTXT * pCtxt
Asn1NamedEventHandler * pHandler

startElement(const char *, int)

void startElement ( const char * name,
int index
) [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 * 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".
int index 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.

uInt64Value(OSUINT64)

void uInt64Value ( OSUINT64 value ) [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 value Parsed value.

uIntValue(OSUINT32)

void uIntValue ( OSUINT32 value ) [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 value Parsed value.