ASN1MessageBuffer Class Reference
[OSRT Message Buffer Classes]

#include <asn1CppTypes.h>

Inheritance diagram for ASN1MessageBuffer:
OSRTMessageBuffer

List of all members.

Public Member Functions

virtual ~ASN1MessageBuffer ()
virtual void addEventHandler (Asn1NamedEventHandler *pEventHandler)
virtual ASN1BMPStringCStringToBMPString (const char *cstring, ASN1BMPString *pBMPString, Asn116BitCharSet *pCharSet=0)
virtual void * getAppInfo ()
virtual EXTRTMETHOD int initBuffer (OSRTMEMBUF &membuf)
virtual EXTRTMETHOD int initBuffer (OSUNICHAR *unistr)
virtual int initBuffer (const OSUTF8CHAR *)
virtual OSBOOL isA (Type)
virtual void removeEventHandler (Asn1NamedEventHandler *pEventHandler)
virtual void resetErrorInfo ()
virtual void setAppInfo (void *)
virtual void setErrorHandler (Asn1ErrorHandler *pErrorHandler)
EXTRTMETHOD int setRunTimeKey (const OSOCTET *key, OSSIZE keylen)
OSOCTET * GetMsgCopy ()
const OSOCTET * GetMsgPtr ()
void PrintErrorInfo ()

Protected Member Functions

EXTRTMETHOD ASN1MessageBuffer (Type bufferType)
EXTRTMETHOD ASN1MessageBuffer (Type bufferType, OSRTContext *pContext)
virtual int setStatus (int stat)

Detailed Description

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

EXTRTMETHOD ASN1MessageBuffer::ASN1MessageBuffer ( Type  bufferType  )  [protected]

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

Parameters:
bufferType Type of message buffer that is being created (for example, BEREncode).
EXTRTMETHOD ASN1MessageBuffer::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:
bufferType Type of message buffer that is being created (for example, BEREncode).
pContext A pointer to an OSRTContext structure previously created by the user.
virtual ASN1MessageBuffer::~ASN1MessageBuffer (  )  [inline, virtual]

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


Member Function Documentation

virtual void ASN1MessageBuffer::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:
pEventHandler - Pointer to named event handler object to register.

References Asn1NamedEventHandler::addEventHandler(), and OSRTMessageBuffer::getCtxtPtr().

virtual ASN1BMPString* ASN1MessageBuffer::CStringToBMPString ( const char *  cstring,
ASN1BMPString pBMPString,
Asn116BitCharSet pCharSet = 0 
) [virtual]

The CStringToBMPString method is a utility function for converting a null-terminated Ascii string into a BMP string. A BMP string contains 16-bit Unicode characters.

Parameters:
cstring - Null-terminated character string to convert
pBMPString - Pointer to BMP string target variable
pCharSet - Pointer to permitted alphabet character set. If provided, index to character within this set is returned.
virtual void* ASN1MessageBuffer::getAppInfo (  )  [inline, virtual]

Returns a pointer to application-specific information block

Reimplemented from OSRTMessageBuffer.

virtual EXTRTMETHOD int ASN1MessageBuffer::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:
unistr Pointer to a Unicode character string.
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.
virtual EXTRTMETHOD int ASN1MessageBuffer::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:
membuf OSRTMEMBUF memory buffer class object reference.
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.
virtual OSBOOL ASN1MessageBuffer::isA ( Type   )  [inline, virtual]

This method checks the type of the message buffer.

Parameters:
bufferType Enumerated identifier specifying a derived class. Possible values are: BEREncode, BERDecode, PEREncode, PERDecode, XEREncode, XERDecode, XMLEncode, XMLDecode, Stream.
Returns:
Boolean result of the match operation. True if this is the class corresponding to the identifier argument.
virtual void ASN1MessageBuffer::removeEventHandler ( Asn1NamedEventHandler pEventHandler  )  [inline, virtual]

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

Parameters:
pEventHandler - Pointer to named event handler object to de-register.

References OSRTMessageBuffer::getCtxtPtr(), and Asn1NamedEventHandler::removeEventHandler().

virtual void ASN1MessageBuffer::resetErrorInfo (  )  [inline, virtual]

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

Reimplemented from OSRTMessageBuffer.

References OSRTMessageBuffer::resetErrorInfo().

virtual void ASN1MessageBuffer::setAppInfo ( void *   )  [inline, virtual]

Sets the application-specific information block.

Reimplemented from OSRTMessageBuffer.

virtual void ASN1MessageBuffer::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:
pErrorHandler - Pointer to error handler object to register.

References OSRTMessageBuffer::getCtxtPtr(), and Asn1ErrorHandler::setErrorHandler().

EXTRTMETHOD int ASN1MessageBuffer::setRunTimeKey ( const OSOCTET *  key,
OSSIZE  keylen 
)

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

Parameters:
key - array of octets with the key
keylen - number of octets in key array.
Returns:
Completion status of operation:
  • 0 (ASN_OK) = success,
  • negative return value is error.
virtual int ASN1MessageBuffer::setStatus ( int  stat  )  [inline, protected, virtual]

This method sets error status to the context.

Returns:
Error status value being set.

References OSRTMessageBuffer::getContext().


The documentation for this class was generated from the following file: