ASN1MessageBuffer Class Reference

class ASN1MessageBuffer : public OSRTMessageBuffer

Abstract ASN.1 message buffer base class. This class is used to manage a message buffer containing an ASN.1 message. For encoding, this is the buffer the message is being built in. For decoding, it is a message that was read into memory to be decoded. Further classes are derived from this to handle encoding and decoding of messages for different encoding rules types.

Constructor & Destructor Documentation

ASN1MessageBuffer(Type)

EXTRTMETHOD ASN1MessageBuffer ( Type bufferType ) [protected]

The protected constructor creates a new context and sets the buffer class type.

Parameters

Type bufferType Type of message buffer that is being created (for example, BEREncode).

ASN1MessageBuffer(Type, OSRTContext *)

EXTRTMETHOD ASN1MessageBuffer ( Type bufferType,
OSRTContext * pContext
) [protected]

This constructor sets the buffer class type and also a pointer to a context created by the user.

Parameters

Type bufferType Type of message buffer that is being created (for example, BEREncode).
OSRTContext * pContext A pointer to an OSRTContext structure previously created by the user.

~ASN1MessageBuffer()

~ASN1MessageBuffer ( ) [inline, virtual]

The virtual destructor does nothing. It is overridden by derived versions of this class.

Member Functions Documentation

GetMsgCopy()

OSOCTET * GetMsgCopy ( ) [inline]

GetMsgPtr()

const OSOCTET * GetMsgPtr ( ) [inline]

PrintErrorInfo()

void PrintErrorInfo ( ) [inline]

addEventHandler(Asn1NamedEventHandler *)

void addEventHandler ( Asn1NamedEventHandler * pEventHandler ) [inline, virtual]

The addEventHandler method is used to register a used-defined named event handler. Methods from within this handler will be invoked when this message buffer is used in the decoding of a message.

Parameters

Asn1NamedEventHandler * pEventHandler - Pointer to named event handler object to register.

getAppInfo()

void * getAppInfo ( ) [inline, virtual]

Returns a pointer to application-specific information block

initBuffer(OSRTMEMBUF &)

EXTRTMETHOD int initBuffer ( OSRTMEMBUF & membuf ) [virtual]

This version of the overloaded initBuffer method initializes the message buffer to point at the memory contained within the referenced OSRTMEMBUF object.

Parameters

OSRTMEMBUF & membuf OSRTMEMBUF memory buffer class object reference.

initBuffer(OSUNICHAR *)

EXTRTMETHOD int initBuffer ( OSUNICHAR * unistr ) [virtual]

This version of the overloaded initBuffer method initializes the message buffer to point at the given Unicode string. This is used mainly for XER (XML) message decoding.

Parameters

OSUNICHAR * unistr Pointer to a Unicode character string.

initBuffer(const OSUTF8CHAR *)

int initBuffer ( const OSUTF8CHAR * ) [inline, virtual]

This version of the overloaded initBuffer method initializes the message buffer to point at the given null-terminated UTF-8 character string.

Parameters

const OSUTF8CHAR *

isA(Type)

OSBOOL isA ( Type ) [inline, virtual]

This method checks the type of the message buffer.

Parameters

Type

removeEventHandler(Asn1NamedEventHandler *)

void removeEventHandler ( Asn1NamedEventHandler * pEventHandler ) [inline, virtual]

The removeEventHandler method is used to de-register a used-defined named event handler.

Parameters

Asn1NamedEventHandler * pEventHandler - Pointer to named event handler object to de-register.

resetErrorInfo()

void resetErrorInfo ( ) [inline, virtual]

The resetErrorInfo method resets information on errors contained within the context.

setAppInfo(void *)

void setAppInfo ( void * ) [inline, virtual]

Sets the application-specific information block.

Parameters

void *

setErrorHandler(Asn1ErrorHandler *)

void setErrorHandler ( Asn1ErrorHandler * pErrorHandler ) [inline, virtual]

The setErrorHandler method is used to register a used-defined error handler. Methods from within this handler will be invoked when an error occurs in decoding a message using this message buffer object.

Parameters

Asn1ErrorHandler * pErrorHandler - Pointer to error handler object to register.

setRunTimeKey(const OSOCTET *, size_t)

EXTRTMETHOD int setRunTimeKey ( const OSOCTET * key,
size_t keylen
)

This method sets run-time key to the context. This method does nothing for unlimited redistribution libraries.

Parameters

const OSOCTET * key - array of octets with the key
size_t keylen - number of octets in key array.

setStatus(int)

int setStatus ( int stat ) [protected, inline, virtual]

This method sets error status to the context.

Parameters

int stat