EXI decode structures and functions.


Classes

struct  OSEXIDecStringTable
 This structure defines the structure of the various string table partitions used by the decoder. More...
struct  OSEXIDecStringTables
 This structure defines the complete set of string table partitions used by the decoder. More...

Defines

#define OSEXI_NO_SUBTYPES   1
#define OSEXI_NILLABLE   2
#define OSEXI_HAS_DEFAULT   4
#define rtEXIDecSimpleTypeEvent_DS
#define rtEXIDecSimpleTypeEvent_CS
#define rtEXIDecEndEvent_DS
#define rtEXIDecEndEvent_CS
#define rtEXIDecGetStateIndex_DS
#define rtEXIDecGetStateIndex_CS

Functions

EXTERNEXI int rtEXIDecAtmAddTransition (OSCTXT *pctxt, OSEXIAutomaton *pAutomaton, OSEXIState fromState, OSEXIState toState, const OSEXIEvent *pEvent, const OSEXIEventCode *pEventCode)
 This function adds a transition between two states.
EXTERNEXI OSEXIEventrtEXIDecAutomatonAdvance (OSCTXT *pctxt, OSEXIAutomaton *pAutomaton, const OSEXIEventCode *pEventCode, OSBOOL dynamicItems)
 This function advances the decoder automaton based on event code, adding new transitions if dynamicItems is set to true and either SE(*) or AT(*) are matched instead of SE(qname) or AT(qname), respectively.
EXTERNEXI OSEXIAutomatonrtEXIDecGetDocAutomaton (OSCTXT *pctxt, size_t numGblElems, const OSXMLFullQName *gblElems)
 This functions returns an automaton that accepts the built-in document grammar.
EXTERNEXI OSEXIAutomatonrtEXIDecGetElemAutomaton (OSCTXT *pctxt, OSXMLFullQName *pqname)
 This function returns an automaton that accepts the built-in element grammar.
EXTERNEXI int rtEXIDecAttribute (OSCTXT *pctxt, OSXMLFullQName *pqname, const OSUTF8CHAR **ppvalue)
 Decodes the attribute at the current position in the decode stream.
EXTERNEXI int rtEXIDecBinary (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, OSINT32 bufsize)
 This function decodes the contents of a binary value into a static memory structure.
EXTERNEXI int rtEXIDecBoolValue (OSCTXT *pctxt, OSBOOL *pvalue)
 This function decodes a boolean value.
EXTERNEXI int rtEXIDecBoolValueWithPattern (OSCTXT *pctxt, OSBOOL *pvalue, OSUINT8 pattern)
 This function decodes a boolean value with pattern facet.
EXTERNEXI int rtEXIDec_CH_String_EE (OSCTXT *pctxt, const OSXMLFullQName *pqname, const OSUINT16 *charSet, const OSUTF8CHAR **ppvalue)
 This function decodes a CH event (assumed to be a one part code = 0 in a 1 bit field) followed by string content followed by an EE event (assumed to be a one part code = 0 in a 1 bit field).
EXTERNEXI int rtEXIDecDate (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a date value into a structured variable.
EXTERNEXI int rtEXIDecDateString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a date value into a string.
EXTERNEXI int rtEXIDecDateTime (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a date/time value into a structured variable.
EXTERNEXI int rtEXIDecDateTimeString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a date/time value into a string.
EXTERNEXI int rtEXIDecDecimalValue (OSCTXT *pctxt, OSREAL *pvalue)
 This function decodes a decimal value.
EXTERNEXI int rtEXIDecDocumentType (OSCTXT *pctxt, const OSUTF8CHAR **ppName, const OSUTF8CHAR **ppPublic, const OSUTF8CHAR **ppSystem, const OSUTF8CHAR **ppText)
 This function decodes an XML document type declaration (DTD).
EXTERNEXI int rtEXIDecDoubleValue (OSCTXT *pctxt, OSREAL *pvalue)
 This function decodes a double value.
EXTERNEXI int rtEXIDecDynBinary (OSCTXT *pctxt, OSDynOctStr *pvalue)
 This function decodes a binary value into a structured variable.
EXTERNEXI int rtEXIDecEndDocument (OSCTXT *pctxt)
 This function ends decoding of EXI stream.
EXTERNEXI int rtEXIDecEndEvent (OSCTXT *pctxt)
 This function decodes of event codes of element end grammar.
EXTERNEXI int rtEXIDecEndEventCompact (OSCTXT *pctxt)
 This function decodes of event codes of element end grammar.
EXTERNEXI int rtEXIDecEndEventStrict (OSCTXT *pctxt)
 This function decodes of event codes of element end grammar.
EXTERNEXI int rtEXIDecEventCodePart1 (OSCTXT *pctxt, OSINT32 *ppart, OSUINT32 nbits, OSUINT32 maxval)
 This function decodes part 1 of an event code.
EXTERNEXI int rtEXIDecGetStateIndex (OSCTXT *pctxt, OSUINT32 flags)
 This function decodes an event code as specified in the currently indexed state table record and then determine the index of the state corresponding to the decoded value.
EXTERNEXI int rtEXIDecGetStateIndexCompact (OSCTXT *pctxt, OSUINT16 stx, const OSEXIStateTableRecord statetab[], size_t nrows, OSUINT32 flags, OSUINT32 *prepcnt)
 This function decodes an event code as specified in the currently indexed state table record and then determine the index of the state corresponding to the decoded value.
EXTERNEXI int rtEXIDecGetStateIndexStrict (OSCTXT *pctxt, OSUINT16 stx, const OSEXIStateTableRecord statetab[], size_t nrows, OSUINT32 flags, OSUINT32 *prepcnt)
 This function decodes an event code as specified in the currently indexed state table record and then determine the index of the state corresponding to the decoded value.
EXTERNEXI int rtEXIDecFloatValue (OSCTXT *pctxt, OSFLOAT *pvalue)
 This function decodes a float value.
EXTERNEXI int rtEXIDecGDay (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a gDay value into a structured variable.
EXTERNEXI int rtEXIDecGDayString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a gDay value into a string.
EXTERNEXI int rtEXIDecGMonth (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a gMonth value into a structured variable.
EXTERNEXI int rtEXIDecGMonthDay (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a gMonthDay value into a structured variable.
EXTERNEXI int rtEXIDecGMonthDayString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a gMonthDay value into a string.
EXTERNEXI int rtEXIDecGMonthString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a gMonth value into a string.
EXTERNEXI int rtEXIDecGYear (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a gYear value into a structured variable.
EXTERNEXI int rtEXIDecGYearMonth (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a gYearMonth value into a structured variable.
EXTERNEXI int rtEXIDecGYearMonthString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a gYearMonth value into a string.
EXTERNEXI int rtEXIDecGYearString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a gYear value into a string.
EXTERNEXI OSBOOL rtEXIDecHasNext (OSCTXT *pctxt)
 This function checks for additonal events in the decode stream.
EXTERNEXI int rtEXIDecHeader (OSCTXT *pctxt)
 This function decodes the EXI header at the start of a message and uses the results to set internal flags within the context structure.
EXTERNEXI int rtEXIDecInitCompression (OSCTXT *pctxt, OSUINT32 nmChannelIds)
 This function initialize decoder to use compressed or precompressed EXI stream.
EXTERNEXI int rtEXIDecInt16Value (OSCTXT *pctxt, OSINT16 *pvalue)
 This function decodes a 16-bit signed integer value.
EXTERNEXI int rtEXIDecInt64Value (OSCTXT *pctxt, OSINT64 *pvalue)
 This function decodes a 64-bit signed integer value.
EXTERNEXI int rtEXIDecInt8Value (OSCTXT *pctxt, OSINT8 *pvalue)
 This function decodes a 8-bit signed integer value.
EXTERNEXI int rtEXIDecIntValue (OSCTXT *pctxt, OSINT32 *pvalue)
 This function decodes a signed integer value.
EXTERNEXI int rtEXIDecLocalName (OSCTXT *pctxt, const OSUTF8CHAR **ppname)
 Returns the local name associated with the current event.
EXTERNEXI int rtEXIDecNamespaceURI (OSCTXT *pctxt, const OSUTF8CHAR **ppNSURI)
 Returns the namespace associated with the current event.
EXTERNEXI int rtEXIDecNBitUIntValue (OSCTXT *pctxt, OSUINT32 *pvalue, OSUINT32 nbits)
 This function decodes an unsigned integer value from a bit field of the given width.
EXTERNEXI int rtEXIDecNextEventType (OSCTXT *pctxt, OSEXIEventType *pEventType)
 Returns the next OSEXIEventType read by this decoder.
EXTERNEXI int rtEXIDecoderInit (OSCTXT *pctxt)
 This function initializes the decoder.
EXTERNEXI int rtEXIDecPrefix (OSCTXT *pctxt, const OSUTF8CHAR *uri, const OSUTF8CHAR **ppPrefix)
 Returns the namespace associated with the current event.
EXTERNEXI int rtEXIDecProcessingInstruction (OSCTXT *pctxt, const OSUTF8CHAR **ppTarget, const OSUTF8CHAR **ppData)
 This function decodes an XML processing instruction (PI).
EXTERNEXI int rtEXIDecQName (OSCTXT *pctxt, OSXMLFullQName *pqname)
 Returns the qname associated with the current event.
EXTERNEXI int rtEXIDecQNameValue (OSCTXT *pctxt, OSXMLFullQName *pvalue, const OSXMLFullQName *pqname)
 Decode the qname value for AT and CH events.
EXTERNEXI int rtEXIDecReset (OSCTXT *pctxt)
 Resets the decoder for decoding a new message instance.
EXTERNEXI int rtEXIDecSimpleTypeEvent (OSCTXT *pctxt, OSINT32 *ppart, OSUINT32 flags)
 This function decodes of event codes of simple type grammar.
EXTERNEXI int rtEXIDecSimpleTypeEventCompact (OSCTXT *pctxt, OSINT32 *ppart, OSUINT32 flags)
 This function decodes of event codes of simple type grammar.
EXTERNEXI int rtEXIDecSimpleTypeEventStrict (OSCTXT *pctxt, OSINT32 *ppart, OSUINT32 flags)
 This function decodes of event codes of simple type grammar.
EXTERNEXI int rtEXIDecString (OSCTXT *pctxt, const OSXMLFullQName *pqname, const OSUINT16 *charSet, const OSUTF8CHAR **ppvalue)
 Returns the value associated with the current event.
EXTERNEXI int rtEXIDecStringToCharArray (OSCTXT *pctxt, const OSUTF8CHAR *target, size_t start, size_t length)
 Similar to rtEXIDecString but the characters are copied into a fixed-size character array.
EXTERNEXI int rtEXIDecStringLength (OSCTXT *pctxt)
 Returns the length of the string returned by rtEXIDecString.
EXTERNEXI int rtEXIDecTime (OSCTXT *pctxt, OSNumDateTime *pvalue)
 This function decodes a time value into a structured variable.
EXTERNEXI int rtEXIDecTimeString (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function decodes a time value into a string.
EXTERNEXI int rtEXIDecUInt16Value (OSCTXT *pctxt, OSUINT16 *pvalue)
 This function decodes an 16-bit unsigned integer value.
EXTERNEXI int rtEXIDecUInt64Value (OSCTXT *pctxt, OSUINT64 *pvalue)
 This function decodes an 64-bit unsigned integer value.
EXTERNEXI int rtEXIDecUInt8Value (OSCTXT *pctxt, OSUINT8 *pvalue)
 This function decodes an 8-bit unsigned integer value.
EXTERNEXI int rtEXIDecUIntValue (OSCTXT *pctxt, OSUINT32 *pvalue)
 This function decodes an unsigned integer value.
EXTERNEXI int rtEXIDecUTF8Str (OSCTXT *pctxt, OSUTF8CHAR **ppvalue, const OSUINT16 *charSet)
 This function decodes a UTF-8 string value.
EXTERNEXI int rtEXIDecUTF8Chars (OSCTXT *pctxt, OSUTF8CHAR **ppvalue, OSUINT32 nchars, const OSUINT16 *charSet)
 This function reads the given number of characters from the decode stream and creates a UTF-8 string.
EXTERNEXI void rtEXIDecStringTableInit (OSCTXT *pctxt, OSEXIDecStringTable *pstrtab, size_t capacity)
 This function initializes the given string table structure.
EXTERNEXI OSEXIDecStringTablertEXIDecNewStringTable (OSCTXT *pctxt, size_t capacity)
 This function allocates and initializes a new string table structure.
EXTERNEXI void rtEXIDecStringTableClear (OSCTXT *pctxt, OSEXIDecStringTable *pstrtab)
 This function clears all strings out of the existing table.
EXTERNEXI OSUINT32 rtEXIDecStringTableAdd (OSCTXT *pctxt, OSEXIDecStringTable *pstrtab, const OSUTF8CHAR *str)
 This function adds a string to the given string table.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStringTableGetString (OSEXIDecStringTable *pstrtab, OSUINT32 index)
 This function gets the string at the given index (i.e.
EXTERNEXI void rtEXIDecStrTabsInit (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs)
 This function initializes all EXI string table partitions.
EXTERNEXI void rtEXIDecStrTabsClear (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs)
 This function clears all EXI string table partitions.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddURI (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri)
 This function will add a URI to the URI string table partition.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetURI (OSEXIDecStringTables *pstrtabs, OSUINT32 index)
 This function will get the compact identifier of the given URI from the URI string table partition.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetURITableSize (OSEXIDecStringTables *pstrtabs)
 This function returns the current number of entries in the URI string table partition.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddPrefix (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri, const OSUTF8CHAR *prefix)
 This function adds the given prefix to the prefix table partition identified by the given URI.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetPrefix (OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri, OSUINT32 index)
 This function will get the compact identifier of the given prefix from the prefix string table partition identified by the given URI.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetPrefixTableSize (OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri)
 This function returns the current number of entries in the prefix string table partition identified by the given URI.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddLocalName (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri, const OSUTF8CHAR *name)
 This function adds the given local name to the local name table partition identified by the given URI.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetLocalName (OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri, OSUINT32 index)
 This function will get the compact identifier of the given localName from the localName string table partition identified by the given URI.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetLocalNameTableSize (OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *uri)
 This function returns the current number of entries in the localName string table partition identified by the given URI.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddLocalValue (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSXMLFullQName *qname, const OSUTF8CHAR *value)
 This function adds the given local value to the local value table partition identified by the given QName.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetLocalValue (OSEXIDecStringTables *pstrtabs, const OSXMLFullQName *qname, OSUINT32 index)
 This function will get the compact identifier of the given local value from the local value string table partition identified by the given QName.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetLocalValueTableSize (OSEXIDecStringTables *pstrtabs, const OSXMLFullQName *qname)
 This function returns the current number of entries in the local value string table partition identified by the given QName.
EXTERNEXI OSUINT32 rtEXIDecStrTabsAddGlobalValue (OSCTXT *pctxt, OSEXIDecStringTables *pstrtabs, const OSUTF8CHAR *value)
 This function will add a string value to the global value string table partition.
EXTERNEXI const OSUTF8CHAR * rtEXIDecStrTabsGetGlobalValue (OSEXIDecStringTables *pstrtabs, OSUINT32 index)
 This function will get the compact identifier of the given string value from the global value string table partition.
EXTERNEXI OSUINT32 rtEXIDecStrTabsGetGlobalValueTableSize (OSEXIDecStringTables *pstrtabs)
 This function returns the current number of entries in the global value string table partition.

Function Documentation

EXTERNEXI int rtEXIDec_CH_String_EE ( OSCTXT *  pctxt,
const OSXMLFullQName *  pqname,
const OSUINT16 *  charSet,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a CH event (assumed to be a one part code = 0 in a 1 bit field) followed by string content followed by an EE event (assumed to be a one part code = 0 in a 1 bit field).

Parameters:
pctxt Pointer to a context structure.
pqname QName the value is associated with. This should be the QName that was decoded from the stream prior to calling this function.
charSet Pointer to restricted character set to be used for decoding the string or NULL if not restricted.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecAtmAddTransition ( OSCTXT *  pctxt,
OSEXIAutomaton pAutomaton,
OSEXIState  fromState,
OSEXIState  toState,
const OSEXIEvent pEvent,
const OSEXIEventCode pEventCode 
)

This function adds a transition between two states.

The transition is defined by a pair of states, and event and event code.

Parameters:
pctxt Pointer to context block structure.
pAutomaton Pointer to automaton structure.
fromState The origin state for this transition.
toState The destination state for this transition.
pEvent The event on which this transition occurs.
pEventCode The event code returned after the transition.
Returns:
Zero if operation was successful; a negative status code otherwise.

EXTERNEXI int rtEXIDecAttribute ( OSCTXT *  pctxt,
OSXMLFullQName *  pqname,
const OSUTF8CHAR **  ppvalue 
)

Decodes the attribute at the current position in the decode stream.

This function is called when the application receives an AT event to get the attribute data.

Parameters:
pctxt Pointer to a context structure.
pqname Pointer to variable to receive decoded attribute QName. Memory for the decoded name components is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI OSEXIEvent* rtEXIDecAutomatonAdvance ( OSCTXT *  pctxt,
OSEXIAutomaton pAutomaton,
const OSEXIEventCode pEventCode,
OSBOOL  dynamicItems 
)

This function advances the decoder automaton based on event code, adding new transitions if dynamicItems is set to true and either SE(*) or AT(*) are matched instead of SE(qname) or AT(qname), respectively.

Dynamic transitions for CH are also added according to the spec.

Parameters:
pctxt Pointer to context block structure.
pAutomaton Pointer to automaton structure.
pEventCode Event code on which to advance the automaton.
dynamicItems Flag to add dynamic transitions to the automaton.
Returns:
The event code returned as a result of this transition.

EXTERNEXI int rtEXIDecBinary ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSUINT32 *  pnocts,
OSINT32  bufsize 
)

This function decodes the contents of a binary value into a static memory structure.

Parameters:
pctxt Pointer to context block structure.
pvalue A pointer to a variable to receive the decoded bit string. This is assumed to be a static array large enough to hold the number of octets specified in the bufsize input parameter.
pnocts A pointer to an integer value to receive the decoded number of octets.
bufsize The size (in octets) of the sized octet string. An error will occur if the number of octets in the decoded string is larger than this value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecBoolValue ( OSCTXT *  pctxt,
OSBOOL *  pvalue 
)

This function decodes a boolean value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to boolean to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecBoolValueWithPattern ( OSCTXT *  pctxt,
OSBOOL *  pvalue,
OSUINT8  pattern 
)

This function decodes a boolean value with pattern facet.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to boolean to receive decoded value.
pattern Mask of enabled values:
  • 0 - "false"
  • 1 - "0"
  • 2 - "true"
  • 3 - "1"
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDate ( OSCTXT *  pctxt,
OSNumDateTime *  pvalue 
)

This function decodes a date value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDateString ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a date value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDateTime ( OSCTXT *  pctxt,
OSNumDateTime *  pvalue 
)

This function decodes a date/time value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDateTimeString ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a date/time value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDecimalValue ( OSCTXT *  pctxt,
OSREAL *  pvalue 
)

This function decodes a decimal value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to variable to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDocumentType ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppName,
const OSUTF8CHAR **  ppPublic,
const OSUTF8CHAR **  ppSystem,
const OSUTF8CHAR **  ppText 
)

This function decodes an XML document type declaration (DTD).

Parameters:
pctxt Pointer to a context structure.
ppName Pointer to variable to receive decoded DTD name. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppPublic Pointer to variable to receive decoded DT public data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppSystem Pointer to variable to receive decoded DT system data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppText Pointer to variable to receive decoded DT text. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecDoubleValue ( OSCTXT *  pctxt,
OSREAL *  pvalue 
)

This function decodes a double value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to variable to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecDynBinary ( OSCTXT *  pctxt,
OSDynOctStr *  pvalue 
)

This function decodes a binary value into a structured variable.

This function will allocate dynamic memory to store the decoded result.

Parameters:
pctxt Pointer to OSCTXT structure
pvalue A pointer to a dynamic octet string structure to receive the decoded octet string. Dynamic memory is allocated to hold the string using the rtxMemAlloc function.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecEndDocument ( OSCTXT *  pctxt  ) 

This function ends decoding of EXI stream.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecEndEvent ( OSCTXT *  pctxt  ) 

This function decodes of event codes of element end grammar.

It will decode and skip undeclared items until a EE event code is received. Funcion use "default" mode encoding.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecEndEventCompact ( OSCTXT *  pctxt  ) 

This function decodes of event codes of element end grammar.

It will decode and skip undeclared items until a EE event code is received. Funcion use "default" mode encoding, but it is break on undeclared event.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecEndEventStrict ( OSCTXT *  pctxt  ) 

This function decodes of event codes of element end grammar.

It will decode and skip undeclared items until a EE event code is received. Funcion use "strict" mode encoding.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecEventCodePart1 ( OSCTXT *  pctxt,
OSINT32 *  ppart,
OSUINT32  nbits,
OSUINT32  maxval 
)

This function decodes part 1 of an event code.

It will decode and skip undeclared items until a schema-valid event code is received.

Parameters:
pctxt Pointer to a context structure.
ppart Pointer to event code part to receive decoded value.
nbits Number of bits in the part.
maxval Maximum allowed value for this code. If the decoded value is equal to this value, it indicates that undeclared content was encountered.
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecFloatValue ( OSCTXT *  pctxt,
OSFLOAT *  pvalue 
)

This function decodes a float value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to variable to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGDay ( OSCTXT *  pctxt,
OSNumDateTime *  pvalue 
)

This function decodes a gDay value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGDayString ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a gDay value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI OSEXIAutomaton* rtEXIDecGetDocAutomaton ( OSCTXT *  pctxt,
size_t  numGblElems,
const OSXMLFullQName *  gblElems 
)

This functions returns an automaton that accepts the built-in document grammar.

This grammar is not extensible, so all the event codes created are immutable.

Parameters:
pctxt Pointer to context block structure.
numGblElems Number of global elements.
gblElems Array of global element QNames.
Returns:
Pointer to document automaton.

EXTERNEXI OSEXIAutomaton* rtEXIDecGetElemAutomaton ( OSCTXT *  pctxt,
OSXMLFullQName *  pqname 
)

This function returns an automaton that accepts the built-in element grammar.

The elementName is associated with the automaton.

Parameters:
pctxt Pointer to context block structure.
pqname Pointer to element QName.
Returns:
Pointer to element automaton.

EXTERNEXI int rtEXIDecGetStateIndex ( OSCTXT *  pctxt,
OSUINT32  flags 
)

This function decodes an event code as specified in the currently indexed state table record and then determine the index of the state corresponding to the decoded value.

Funcion use "default" mode encoding.

Parameters:
pctxt Pointer to OSCTXT structure
flags Element flags:
  • OSEXI_NO_SUBTYPES - type has no named subtypes
  • OSEXI_NILLABLE - nillable element
Returns:
Index of state record matching decoded event. Negative value is an error, RTERR_IDNOTFOU is returned if no matching record is found.

EXTERNEXI int rtEXIDecGetStateIndexCompact ( OSCTXT *  pctxt,
OSUINT16  stx,
const OSEXIStateTableRecord  statetab[],
size_t  nrows,
OSUINT32  flags,
OSUINT32 *  prepcnt 
)

This function decodes an event code as specified in the currently indexed state table record and then determine the index of the state corresponding to the decoded value.

Funcion use "default" mode encoding, but it is break on undeclared event.

Parameters:
pctxt Pointer to OSCTXT structure
stx Index of first record describing the state.
statetab Array of state records.
nrows Number of rows in the state table.
flags Element flags:
  • OSEXI_NO_SUBTYPES - type has no named subtypes
  • OSEXI_NILLABLE - nillable element
prepcnt Pointer to repeating element count variable.
Returns:
Index of state record matching decoded event. Negative value is an error, RTERR_IDNOTFOU is returned if no matching record is found.

EXTERNEXI int rtEXIDecGetStateIndexStrict ( OSCTXT *  pctxt,
OSUINT16  stx,
const OSEXIStateTableRecord  statetab[],
size_t  nrows,
OSUINT32  flags,
OSUINT32 *  prepcnt 
)

This function decodes an event code as specified in the currently indexed state table record and then determine the index of the state corresponding to the decoded value.

Funcion use "strict" mode encoding.

Parameters:
pctxt Pointer to OSCTXT structure
stx Index of first record describing the state.
statetab Array of state records.
nrows Number of rows in the state table.
flags Element flags:
  • OSEXI_NO_SUBTYPES - type has no named subtypes
  • OSEXI_NILLABLE - nillable element
prepcnt Pointer to repeating element count variable.
Returns:
Index of state record matching decoded event. Negative value is an error, RTERR_IDNOTFOU is returned if no matching record is found.

EXTERNEXI int rtEXIDecGMonth ( OSCTXT *  pctxt,
OSNumDateTime *  pvalue 
)

This function decodes a gMonth value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGMonthDay ( OSCTXT *  pctxt,
OSNumDateTime *  pvalue 
)

This function decodes a gMonthDay value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGMonthDayString ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a gMonthDay value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGMonthString ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a gMonth value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGYear ( OSCTXT *  pctxt,
OSNumDateTime *  pvalue 
)

This function decodes a gYear value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGYearMonth ( OSCTXT *  pctxt,
OSNumDateTime *  pvalue 
)

This function decodes a gYearMonth value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGYearMonthString ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a gYearMonth value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecGYearString ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a gYear value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI OSBOOL rtEXIDecHasNext ( OSCTXT *  pctxt  ) 

This function checks for additonal events in the decode stream.

Parameters:
pctxt Pointer to a context structure.
Returns:
True if there are more decoding events or false otherwise.

EXTERNEXI int rtEXIDecHeader ( OSCTXT *  pctxt  ) 

This function decodes the EXI header at the start of a message and uses the results to set internal flags within the context structure.

Parameters:
pctxt Pointer to a context structure.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecInitCompression ( OSCTXT *  pctxt,
OSUINT32  nmChannelIds 
)

This function initialize decoder to use compressed or precompressed EXI stream.

Parameters:
pctxt Pointer to context block structure.
nmChannelIds Number of preallocated value channels.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecInt16Value ( OSCTXT *  pctxt,
OSINT16 *  pvalue 
)

This function decodes a 16-bit signed integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecInt64Value ( OSCTXT *  pctxt,
OSINT64 *  pvalue 
)

This function decodes a 64-bit signed integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecInt8Value ( OSCTXT *  pctxt,
OSINT8 *  pvalue 
)

This function decodes a 8-bit signed integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecIntValue ( OSCTXT *  pctxt,
OSINT32 *  pvalue 
)

This function decodes a signed integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecLocalName ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppname 
)

Returns the local name associated with the current event.

For event type SE and AT, it returns the local name of the element and attribute, respectively. For all other event types, the value returned by this method is undefined.

Parameters:
pctxt Pointer to a context structure.
ppname Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecNamespaceURI ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppNSURI 
)

Returns the namespace associated with the current event.

For event type SE and AT, it returns the namespace URI of the element and attribute, respectively. For NS, it returns the URI bound to the prefix in the declaration. For all other event types, the value returned by this function is undefined.

Parameters:
pctxt Pointer to a context structure.
ppNSURI Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecNBitUIntValue ( OSCTXT *  pctxt,
OSUINT32 *  pvalue,
OSUINT32  nbits 
)

This function decodes an unsigned integer value from a bit field of the given width.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned integer to receive decoded value.
nbits Size of bit field.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI OSEXIDecStringTable* rtEXIDecNewStringTable ( OSCTXT *  pctxt,
size_t  capacity 
)

This function allocates and initializes a new string table structure.

Parameters:
pctxt Pointer to context block structure.
capacity Capacity of the array list or zero to use default.
Returns:
Allocated string table structure.

EXTERNEXI int rtEXIDecNextEventType ( OSCTXT *  pctxt,
OSEXIEventType pEventType 
)

Returns the next OSEXIEventType read by this decoder.

Attributes and namespaces are reported as separate events.

Parameters:
pctxt Pointer to a context structure.
pEventType Pointer to variable to receive decoded data.
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecoderInit ( OSCTXT *  pctxt  ) 

This function initializes the decoder.

It must be called before any other decode functions when decoding a document or fragment.

Parameters:
pctxt Pointer to a context structure.
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecPrefix ( OSCTXT *  pctxt,
const OSUTF8CHAR *  uri,
const OSUTF8CHAR **  ppPrefix 
)

Returns the namespace associated with the current event.

For event type SE and AT, it returns the namespace URI of the element and attribute, respectively. For NS, it returns the URI bound to the prefix in the declaration. For all other event types, the value returned by this function is undefined.

Parameters:
pctxt Pointer to a context structure.
uri Namespace URI that prefix is associated with.
ppPrefix Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecProcessingInstruction ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppTarget,
const OSUTF8CHAR **  ppData 
)

This function decodes an XML processing instruction (PI).

Parameters:
pctxt Pointer to a context structure.
ppTarget Pointer to variable to receive decoded PI target. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
ppData Pointer to variable to receive decoded PI data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecQName ( OSCTXT *  pctxt,
OSXMLFullQName *  pqname 
)

Returns the qname associated with the current event.

For SE and AT it returns the name of the element and attribute, respectively. For all other event types, the value returned by this method is undefined.

Parameters:
pctxt Pointer to a context structure.
pqname Pointer to variable to receive decoded data. Memory for the decoded name components is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecQNameValue ( OSCTXT *  pctxt,
OSXMLFullQName *  pvalue,
const OSXMLFullQName *  pqname 
)

Decode the qname value for AT and CH events.

Parameters:
pctxt Pointer to a context structure.
pvalue Pointer to variable to receive decoded data. Memory for the decoded name components is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
pqname QName the value is associated with. This should be the QName that was decoded from the stream prior to calling this function. 0 - decode xsi:type value
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecReset ( OSCTXT *  pctxt  ) 

Resets the decoder for decoding a new message instance.

The decoder's state after calling this method is identical to that of a newly created instance.

Parameters:
pctxt Pointer to a context structure.
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecSimpleTypeEvent ( OSCTXT *  pctxt,
OSINT32 *  ppart,
OSUINT32  flags 
)

This function decodes of event codes of simple type grammar.

It will decode and skip undeclared items until a schema-valid event code is received. Funcion use "default" mode encoding.

Parameters:
pctxt Pointer to a context structure.
ppart Pointer to event code part to receive decoded value:
  • 0 - CH event
  • 1 - EE event (empty element)
  • 2 - EE event after AT(xsi:nil) event
flags Element flags:
  • OSEXI_NO_SUBTYPES - type has no named subtypes
  • OSEXI_NILLABLE - nillable element
  • OSEXI_HAS_DEFAULT - element has no fixed or default value
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecSimpleTypeEventCompact ( OSCTXT *  pctxt,
OSINT32 *  ppart,
OSUINT32  flags 
)

This function decodes of event codes of simple type grammar.

It will decode and skip undeclared items until a schema-valid event code is received. Funcion use "default" mode encoding, but it is break on undeclared event.

Parameters:
pctxt Pointer to a context structure.
ppart Pointer to event code part to receive decoded value:
  • 0 - CH event
  • 1 - EE event (empty element)
  • 2 - EE event after AT(xsi:nil) event
flags Element flags:
  • OSEXI_NO_SUBTYPES - type has no named subtypes
  • OSEXI_NILLABLE - nillable element
  • OSEXI_HAS_DEFAULT - element has no fixed or default value
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecSimpleTypeEventStrict ( OSCTXT *  pctxt,
OSINT32 *  ppart,
OSUINT32  flags 
)

This function decodes of event codes of simple type grammar.

It will decode and skip undeclared items until a schema-valid event code is received. Funcion use "strict" mode encoding.

Parameters:
pctxt Pointer to a context structure.
ppart Pointer to event code part to receive decoded value:
  • 0 - CH event
  • 1 - EE event (empty element)
  • 2 - EE event after AT(xsi:nil) event
flags Element flags:
  • OSEXI_NO_SUBTYPES - type has no named subtypes
  • OSEXI_NILLABLE - nillable element
  • OSEXI_HAS_DEFAULT - element has no fixed or default value
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecString ( OSCTXT *  pctxt,
const OSXMLFullQName *  pqname,
const OSUINT16 *  charSet,
const OSUTF8CHAR **  ppvalue 
)

Returns the value associated with the current event.

For character (CH) and comment (CM), it returns the corresponding characters. For attribute (AT) it returns the attribute value. For entity reference (ER), it returns the entity's name. For all other event types, the value returned by this method is undefined.

Parameters:
pctxt Pointer to a context structure.
pqname QName the value is associated with. This should be the QName that was decoded from the stream prior to calling this function.
charSet Pointer to restricted character set to be used for decoding the string or NULL if not restricted.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Status of the operation:
  • 0 if success
  • a negative status code if failure

EXTERNEXI int rtEXIDecStringLength ( OSCTXT *  pctxt  ) 

Returns the length of the string returned by rtEXIDecString.

Parameters:
pctxt Pointer to a context structure.
Returns:
The length of the string or a negative status code if decoding failed.

EXTERNEXI OSUINT32 rtEXIDecStringTableAdd ( OSCTXT *  pctxt,
OSEXIDecStringTable pstrtab,
const OSUTF8CHAR *  str 
)

This function adds a string to the given string table.

The string is not added if it already exists in the table. Its compact identifier is returned in either case.

Parameters:
pctxt Pointer to context block structure.
pstrtab Pointer to string table structure.
str Pointer to string to be added to table. Memory for the string is assumed to have been allocated by the user using rtxMemAlloc. It will be freed when the table is cleared.
Returns:
Index of string in table. Note that this is an unsigned value and therefore a negative value cannot be used to signal an error condition as in other functions. In this case, the user must check the status value within the error information in the context to determine if an error occurred.

EXTERNEXI void rtEXIDecStringTableClear ( OSCTXT *  pctxt,
OSEXIDecStringTable pstrtab 
)

This function clears all strings out of the existing table.

Memory for all strings is freed using rtxMemFreePtr.

Parameters:
pctxt Pointer to context block structure.
pstrtab Pointer to string table structure.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStringTableGetString ( OSEXIDecStringTable pstrtab,
OSUINT32  index 
)

This function gets the string at the given index (i.e.

compact identifier) in the given string table.

Parameters:
pstrtab Pointer to string table structure.
index Index to string in table.
Returns:
Pointer to string in table.

EXTERNEXI void rtEXIDecStringTableInit ( OSCTXT *  pctxt,
OSEXIDecStringTable pstrtab,
size_t  capacity 
)

This function initializes the given string table structure.

Parameters:
pctxt Pointer to context block structure.
pstrtab Pointer to string table structure.
capacity Capacity of the array list or zero to use default.

EXTERNEXI int rtEXIDecStringToCharArray ( OSCTXT *  pctxt,
const OSUTF8CHAR *  target,
size_t  start,
size_t  length 
)

Similar to rtEXIDecString but the characters are copied into a fixed-size character array.

Parameters:
pctxt Pointer to a context structure.
target Destination array in which to copy the chars.
start Start index in target where the chars are copied.
length Maximum number of chars to copy.
Returns:
The actual number of chars copied into target or a negative error code if decoding failed.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddGlobalValue ( OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  value 
)

This function will add a string value to the global value string table partition.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
value Value to be added.
Returns:
Index (compact identifier) of the added value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddLocalName ( OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri,
const OSUTF8CHAR *  name 
)

This function adds the given local name to the local name table partition identified by the given URI.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
uri URI identifier of local name table partition.
name Name to be added.
Returns:
Index (compact identifier) of the added value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddLocalValue ( OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSXMLFullQName *  qname,
const OSUTF8CHAR *  value 
)

This function adds the given local value to the local value table partition identified by the given QName.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
qname QName identifier of local value table partition.
value Value to be added.
Returns:
Index (compact identifier) of the added value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddPrefix ( OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri,
const OSUTF8CHAR *  prefix 
)

This function adds the given prefix to the prefix table partition identified by the given URI.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
uri URI identifier of prefix table partition.
prefix Prefix to be added.
Returns:
Index (compact identifier) of the added value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsAddURI ( OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri 
)

This function will add a URI to the URI string table partition.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to full string table set structure.
uri URI to be added.
Returns:
Index (compact identifier) of the added URI.

EXTERNEXI void rtEXIDecStrTabsClear ( OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs 
)

This function clears all EXI string table partitions.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to string table set structure.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetGlobalValue ( OSEXIDecStringTables pstrtabs,
OSUINT32  index 
)

This function will get the compact identifier of the given string value from the global value string table partition.

Parameters:
pstrtabs Pointer to full string table set structure.
index Global value table compact identifier.
Returns:
Index (compact identifier) or the null index identifier (OSEXINULLINDEX) if not found.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetGlobalValueTableSize ( OSEXIDecStringTables pstrtabs  ) 

This function returns the current number of entries in the global value string table partition.

Parameters:
pstrtabs Pointer to full string table set structure.
Returns:
Current number of entries in the partition.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetLocalName ( OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri,
OSUINT32  index 
)

This function will get the compact identifier of the given localName from the localName string table partition identified by the given URI.

Parameters:
pstrtabs Pointer to full string table set structure.
uri URI identifier of localName table partition.
index Name table compact identifier.
Returns:
Index (compact identifier) of the value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetLocalNameTableSize ( OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri 
)

This function returns the current number of entries in the localName string table partition identified by the given URI.

Parameters:
pstrtabs Pointer to full string table set structure.
uri URI identifier of localName table partition.
Returns:
Current number of entries in the partition.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetLocalValue ( OSEXIDecStringTables pstrtabs,
const OSXMLFullQName *  qname,
OSUINT32  index 
)

This function will get the compact identifier of the given local value from the local value string table partition identified by the given QName.

Parameters:
pstrtabs Pointer to full string table set structure.
qname Identifier of table partition.
index Local value table compact identifier.
Returns:
Index (compact identifier) of the value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetLocalValueTableSize ( OSEXIDecStringTables pstrtabs,
const OSXMLFullQName *  qname 
)

This function returns the current number of entries in the local value string table partition identified by the given QName.

Parameters:
pstrtabs Pointer to full string table set structure.
qname Identifier of table partition.
Returns:
Current number of entries in the partition.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetPrefix ( OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri,
OSUINT32  index 
)

This function will get the compact identifier of the given prefix from the prefix string table partition identified by the given URI.

Parameters:
pstrtabs Pointer to full string table set structure.
uri URI identifier of prefix table partition.
index Prefix table compact identifier.
Returns:
Index (compact identifier) of the value.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetPrefixTableSize ( OSEXIDecStringTables pstrtabs,
const OSUTF8CHAR *  uri 
)

This function returns the current number of entries in the prefix string table partition identified by the given URI.

Parameters:
pstrtabs Pointer to full string table set structure.
uri URI identifier of prefix table partition.
Returns:
Current number of entries in the partition.

EXTERNEXI const OSUTF8CHAR* rtEXIDecStrTabsGetURI ( OSEXIDecStringTables pstrtabs,
OSUINT32  index 
)

This function will get the compact identifier of the given URI from the URI string table partition.

Parameters:
pstrtabs Pointer to full string table set structure.
index URI table compact identifier.
Returns:
Index (compact identifier) or the null index identifier (OSEXINULLINDEX) if not found.

EXTERNEXI OSUINT32 rtEXIDecStrTabsGetURITableSize ( OSEXIDecStringTables pstrtabs  ) 

This function returns the current number of entries in the URI string table partition.

Parameters:
pstrtabs Pointer to full string table set structure.
Returns:
Current number of entries in the partition.

EXTERNEXI void rtEXIDecStrTabsInit ( OSCTXT *  pctxt,
OSEXIDecStringTables pstrtabs 
)

This function initializes all EXI string table partitions.

Parameters:
pctxt Pointer to context block structure.
pstrtabs Pointer to string table set structure.

EXTERNEXI int rtEXIDecTime ( OSCTXT *  pctxt,
OSNumDateTime *  pvalue 
)

This function decodes a time value into a structured variable.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to structured variable to receive decoded data.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecTimeString ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppvalue 
)

This function decodes a time value into a string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to variable to receive decoded data. Memory for the decoded name is allocated with rtxMemAlloc. It must be freed with rtxMemFreePtr or it will be freed when all memory in the context is freed (rtxMemFreeAll or rtxFreeContext).
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecUInt16Value ( OSCTXT *  pctxt,
OSUINT16 *  pvalue 
)

This function decodes an 16-bit unsigned integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecUInt64Value ( OSCTXT *  pctxt,
OSUINT64 *  pvalue 
)

This function decodes an 64-bit unsigned integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecUInt8Value ( OSCTXT *  pctxt,
OSUINT8 *  pvalue 
)

This function decodes an 8-bit unsigned integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecUIntValue ( OSCTXT *  pctxt,
OSUINT32 *  pvalue 
)

This function decodes an unsigned integer value.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned integer to receive decoded value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecUTF8Chars ( OSCTXT *  pctxt,
OSUTF8CHAR **  ppvalue,
OSUINT32  nchars,
const OSUINT16 *  charSet 
)

This function reads the given number of characters from the decode stream and creates a UTF-8 string.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to character string pointer to recive decoded string value. Memory for the string is allocated using rtxMemAlloc. It is freed using rtxMemFreePtr or when the context is freed.
nchars Number of characters to read from stream.
charSet Pointer to restricted character set to be used for decoding the string or NULL if not restricted.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

EXTERNEXI int rtEXIDecUTF8Str ( OSCTXT *  pctxt,
OSUTF8CHAR **  ppvalue,
const OSUINT16 *  charSet 
)

This function decodes a UTF-8 string value.

Parameters:
pctxt Pointer to context block structure.
ppvalue Pointer to character string pointer to recive decoded string value. Memory for the string is allocated using rtxMemAlloc. It is freed using rtxMemFreePtr or when the context is freed.
charSet Pointer to restricted character set to be used for decoding the string or NULL if not restricted.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.