rtxContext.h File Reference

Common run-time context definitions. More...

#include "rtxsrc/rtxDList.h"
#include "rtxsrc/rtxStack.h"

Go to the source code of this file.

Classes

struct  OSRTErrLocn
 Run-time error location structure. More...
struct  OSRTErrInfo
 Run-time error information structure. More...
struct  OSRTBuffer
 Run-time message buffer structure. More...
struct  OSRTBufSave
 Structure to save the current message buffer state. More...
struct  OSBufferIndex
 This structure can be used as an index into the buffer. More...
struct  OSCTXT
 Run-time context structure. More...

Defines

#define rtxCtxtGetMsgPtr(pctxt)   (pctxt)->buffer.data
 This macro returns the start address of an encoded message.
#define rtxCtxtGetMsgLen(pctxt)   (pctxt)->buffer.byteIndex
 This macro returns the length of an encoded message.
#define rtxCtxtTestFlag(pctxt, mask)   (((pctxt)->flags & mask) != 0)
 This macro tests if the given bit flag is set in the context.
#define rtxCtxtPeekElemName(pctxt)
 This macro returns the last element name from the context stack.
#define rtxByteAlign(pctxt)
 This macro will byte-align the context buffer.
#define rtxCtxtSetProtocolVersion(pctxt, value)   (pctxt)->version = value
 This macro sets the protocol version in the context.

Typedefs

typedef int(* OSFreeCtxtAppInfoPtr )(struct OSCTXT *pctxt)
 OSRTFreeCtxtAppInfoPtr is a pointer to pctxt->pAppInfo free function, The pctxt->pAppInfo (pXMLInfo and pASN1Info) should contain the pointer to a structure and its first member should be a pointer to an appInfo free function.
typedef int(* OSResetCtxtAppInfoPtr )(struct OSCTXT *pctxt)
 OSRTResetCtxtAppInfoPtr is a pointer to pctxt->pAppInfo reset function, The pctxt->pAppInfo (pXMLInfo and pASN1Info) should contain the pointer to a structure and its second member should be a pointer to appInfo reset function.
typedef void(* OSFreeCtxtGlobalPtr )(struct OSCTXT *pctxt)
 OSRTFreeCtxtGlobalPtr is a pointer to a memory free function.

Functions

EXTERNRT int rtxInitContext (OSCTXT *pctxt)
 This function initializes an OSCTXT block.
EXTERNRT int rtxInitContextExt (OSCTXT *pctxt, OSMallocFunc malloc_func, OSReallocFunc realloc_func, OSFreeFunc free_func)
 This function initializes an OSCTXT block.
EXTERNRT int rtxInitThreadContext (OSCTXT *pctxt, const OSCTXT *pSrcCtxt)
 This function initializes a context for use in a thread.
EXTERNRT int rtxInitContextUsingKey (OSCTXT *pctxt, const OSOCTET *key, OSSIZE keylen)
 This function initializes a context using a run-time key.
EXTERNRT int rtxInitContextBuffer (OSCTXT *pctxt, OSOCTET *bufaddr, OSSIZE bufsiz)
 This function assigns a message buffer to a context block.
EXTERNRT int rtxCtxtSetBufPtr (OSCTXT *pctxt, OSOCTET *bufaddr, OSSIZE bufsiz)
 This function is used to set the internal buffer pointer for in-memory encoding or decoding.
EXTERNRT OSSIZE rtxCtxtGetBitOffset (OSCTXT *pctxt)
 This function returns the total bit offset to the current element in the context buffer.
EXTERNRT int rtxCtxtSetBitOffset (OSCTXT *pctxt, OSSIZE offset)
 This function sets the bit offset in the context to the given value.
EXTERNRT OSSIZE rtxCtxtGetIOByteCount (OSCTXT *pctxt)
 This function returns the count of bytes either written to a stream or memory buffer.
EXTERNRT int rtxCheckContext (OSCTXT *pctxt)
 This function verifies that the given context structure is initialized and ready for use.
EXTERNRT void rtxFreeContext (OSCTXT *pctxt)
 This function frees all dynamic memory associated with a context.
EXTERNRT void rtxCopyContext (OSCTXT *pdest, OSCTXT *psrc)
 This function creates a copy of a context structure.
EXTERNRT void rtxCtxtSetFlag (OSCTXT *pctxt, OSUINT32 mask)
 This function is used to set a processing flag within the context structure.
EXTERNRT void rtxCtxtClearFlag (OSCTXT *pctxt, OSUINT32 mask)
 This function is used to clear a processing flag within the context structure.
EXTERNRT int rtxCtxtPushArrayElemName (OSCTXT *pctxt, const OSUTF8CHAR *elemName, OSSIZE idx)
 This function is used to push an array element name onto the context element name stack.
EXTERNRT int rtxCtxtPushElemName (OSCTXT *pctxt, const OSUTF8CHAR *elemName)
 This function is used to push an element name onto the context element name stack.
EXTERNRT int rtxCtxtPushTypeName (OSCTXT *pctxt, const OSUTF8CHAR *typeName)
 This function is used to push a type name onto the context element name stack.
EXTERNRT OSBOOL rtxCtxtPopArrayElemName (OSCTXT *pctxt)
 This function pops the last element name from the context stack.
EXTERNRT const OSUTF8CHAR * rtxCtxtPopElemName (OSCTXT *pctxt)
 This function pops the last element name from the context stack.
EXTERNRT const OSUTF8CHAR * rtxCtxtPopTypeName (OSCTXT *pctxt)
 This function pops the type name from the context stack.
EXTERNRT OSBOOL rtxCtxtContainerHasRemBits (OSCTXT *pctxt)
 Return true iff there are bits remaining to be decoded in the current length-constrained container, which is possibly the outer PDU.
EXTERNRT OSSIZE rtxCtxtGetContainerRemBits (OSCTXT *pctxt)
 Return the number of bits remaining to be decoded in the current length-constrained container, which is possibly the outer PDU.
EXTERNRT int rtxCtxtPushContainerBytes (OSCTXT *pctxt, OSSIZE bytes)
 Notify the runtime layer of the start of decoding of a length-constrained container of a given length.
EXTERNRT int rtxCtxtPushContainerBits (OSCTXT *pctxt, OSSIZE bits)
 Notify the runtime layer of the start of decoding of a length-constrained container of a given length.
EXTERNRT void rtxCtxtPopContainer (OSCTXT *pctxt)
 Notify the runtime layer of the end of decoding of a length-constrained container of the given length.
EXTERNRT void rtxCtxtPopAllContainers (OSCTXT *pctxt)
 Pop all containers from the container stack.
EXTERNRT void rtxMemHeapSetFlags (OSCTXT *pctxt, OSUINT32 flags)
 This function sets flags to a heap.
EXTERNRT void rtxMemHeapClearFlags (OSCTXT *pctxt, OSUINT32 flags)
 This function clears memory heap flags.
EXTERNRT int rtxMarkPos (OSCTXT *pctxt, OSSIZE *ppos)
 This function saves the current position in a message buffer or stream.
EXTERNRT int rtxResetToPos (OSCTXT *pctxt, OSSIZE pos)
 This function resets a message buffer or stream back to the given position.

Detailed Description

Common run-time context definitions.

Definition in file rtxContext.h.