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)

EXTRTMETHODASN1MessageBuffer(TypebufferType)[protected]

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

Parameters

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

ASN1MessageBuffer(Type, OSRTContext *)

EXTRTMETHODASN1MessageBuffer(TypebufferType,
OSRTContext *pContext
)[protected]

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

Parameters

Type bufferTypeType of message buffer that is being created (for example, BEREncode).
OSRTContext * pContextA 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()

voidPrintErrorInfo()[inline]

addEventHandler(Asn1NamedEventHandler *)

voidaddEventHandler(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 intinitBuffer(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 & membufOSRTMEMBUF memory buffer class object reference.

initBuffer(OSUNICHAR *)

EXTRTMETHOD intinitBuffer(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 * unistrPointer to a Unicode character string.

initBuffer(const OSUTF8CHAR *)

intinitBuffer(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 *)

voidremoveEventHandler(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()

voidresetErrorInfo()[inline, virtual]

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

setAppInfo(void *)

voidsetAppInfo(void *)[inline, virtual]

Sets the application-specific information block.

Parameters

void *

setErrorHandler(Asn1ErrorHandler *)

voidsetErrorHandler(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 intsetRunTimeKey(const OSOCTET *key,
size_tkeylen
)

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)

intsetStatus(intstat)[protected, inline, virtual]

This method sets error status to the context.

Parameters

int stat