ASN1C C/C++ Common Runtime
ASN1C v7.3.x
|
#include <asn1CppTypes.h>
Public Member Functions | |
virtual | ~ASN1MessageBuffer () |
virtual void | addEventHandler (Asn1NamedEventHandler *pEventHandler) |
ASN1BMPString * | CStringToBMPString (const char *cstring, ASN1BMPString *pBMPString, Asn116BitCharSet *pCharSet=0) |
virtual void * | getAppInfo () |
virtual size_t | getMsgLen () |
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) |
size_t | getBitOffset () |
OSOCTET * | GetMsgCopy () |
const OSOCTET * | GetMsgPtr () |
void | PrintErrorInfo () |
Public Member Functions inherited from OSRTMessageBuffer | |
virtual | ~OSRTMessageBuffer () |
virtual size_t | getByteIndex () |
virtual OSRTCtxtPtr | getContext () |
virtual OSCTXT * | getCtxtPtr () |
virtual char * | getErrorInfo () |
virtual char * | getErrorInfo (char *pBuf, size_t &bufSize) |
virtual OSOCTET * | getMsgCopy () |
virtual const OSOCTET * | getMsgPtr () |
int | getStatus () const |
virtual int | init () |
virtual EXTRTMETHOD int | initBuffer (OSOCTET *pMsgBuf, size_t msgBufLen) |
virtual void | printErrorInfo () |
virtual EXTRTMETHOD void | setDiag (OSBOOL value=TRUE) |
Protected Member Functions | |
EXTRTMETHOD | ASN1MessageBuffer (Type bufferType) |
EXTRTMETHOD | ASN1MessageBuffer (Type bufferType, OSRTContext *pContext) |
virtual int | setStatus (int stat) |
Protected Member Functions inherited from OSRTMessageBuffer | |
EXTRTMETHOD | OSRTMessageBuffer (Type bufferType, OSRTContext *pContext=0) |
Additional Inherited Members | |
Protected Attributes inherited from OSRTMessageBuffer | |
OSRTCtxtHolder | mCtxtHolder |
Type | mBufferType |
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.
|
protected |
The protected constructor creates a new context and sets the buffer class type.
bufferType | Type of message buffer that is being created (for example, BEREncode). |
|
protected |
This constructor sets the buffer class type and also a pointer to a context created by the user.
bufferType | Type of message buffer that is being created (for example, BEREncode). |
pContext | A pointer to an OSRTContext structure previously created by the user. |
|
inlinevirtual |
The virtual destructor does nothing. It is overridden by derived versions of this class.
|
inlinevirtual |
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.
pEventHandler | - Pointer to named event handler object to register. |
References Asn1NamedEventHandler::addEventHandler(), and OSRTMessageBuffer::getCtxtPtr().
ASN1BMPString* ASN1MessageBuffer::CStringToBMPString | ( | const char * | cstring, |
ASN1BMPString * | pBMPString, | ||
Asn116BitCharSet * | pCharSet = 0 |
||
) |
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.
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. |
|
inlinevirtual |
Returns a pointer to application-specific information block
Reimplemented from OSRTMessageBuffer.
|
inline |
This method returns the current bit offset in the message buffer.
- | none |
References OSRTMessageBuffer::getCtxtPtr(), OSRTMessageBuffer::getMsgCopy(), OSRTMessageBuffer::getMsgPtr(), OSRTMessageBuffer::printErrorInfo(), and rtxCtxtGetBitOffset().
|
inlinevirtual |
This method returns the length in bytes of an encoded message.
References OSRTMessageBuffer::initBuffer(), and RTERR_NOTSUPP.
|
virtual |
This version of the overloaded initBuffer method initializes the message buffer to point at the memory contained within the referenced OSRTMEMBUF object.
membuf | OSRTMEMBUF memory buffer class object reference. |
|
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.
unistr | Pointer to a Unicode character string. |
|
inlinevirtual |
This method checks the type of the message buffer.
bufferType | Enumerated identifier specifying a derived class. Possible values are: BEREncode, BERDecode, PEREncode, PERDecode, XMLEncode, XMLDecode, Stream. |
|
inlinevirtual |
The removeEventHandler method is used to de-register a used-defined named event handler.
pEventHandler | - Pointer to named event handler object to de-register. |
References OSRTMessageBuffer::getCtxtPtr(), and Asn1NamedEventHandler::removeEventHandler().
|
inlinevirtual |
The resetErrorInfo method resets information on errors contained within the context.
Reimplemented from OSRTMessageBuffer.
References OSRTMessageBuffer::resetErrorInfo().
|
inlinevirtual |
Sets the application-specific information block.
Reimplemented from OSRTMessageBuffer.
|
inlinevirtual |
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.
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.
key | - array of octets with the key |
keylen | - number of octets in key array. |
|
inlineprotectedvirtual |
This method sets error status to the context.
References OSRTMessageBuffer::getContext(), and OSRTContext::setStatus().