|
|
 |
 |
|
Detailed Description
The XER utility functions are common routines used by both XER encode and decode functions.
|
Functions |
| ASN1BOOL | xerCmpText (ASN1Const XMLCHAR *text1, ASN1ConstCharPtr text2) |
|
int | xerCopyText (ASN1CTXT *pctxt, ASN1ConstCharPtr text) |
| int | xerTextLength (ASN1Const XMLCHAR *text) |
| ASN1ConstCharPtr | xerTextToCStr (ASN1CTXT *pctxt, ASN1Const XMLCHAR *text) |
| size_t | xerGetMsgLen (ASN1CTXT *pctxt) |
| ASN1OCTET * | xerGetMsgPtr (ASN1CTXT *pctxt) |
|
int | xerGetElemIdx (ASN1Const XMLCHAR *elemName, XerElemInfo *pElemInfo, int numElems) |
|
int | xerGetSeqElemIdx (ASN1Const XMLCHAR *elemName, XerElemInfo *pElemInfo, int numElems, int startIndex) |
|
int | xerFinalizeMemBuf (ASN1MemBuf *pMemBuf) |
Function Documentation
| ASN1BOOL xerCmpText |
( |
ASN1Const XMLCHAR * |
text1, |
|
|
ASN1ConstCharPtr |
text2 |
|
) |
|
|
|
|
This function is used to compare two strings: the first is represented as a 16-bit character null-terminated string and the second is represented as an 8-bit standard null-terminated string.
- Parameters:
-
| text1 | A pointer to a 16-bit character null-terminated string. |
| text2 | A pointer to an 8-bit character null-terminated string. |
- Returns:
- The result of the comparison: TRUE, if strings match, otherwise FALSE.
|
| size_t xerGetMsgLen |
( |
ASN1CTXT * |
pctxt |
) |
|
|
|
|
This function is used to get the encoded message length.
- Parameters:
-
| pctxt | A pointer to a context structure. |
- Returns:
- The length of a message in the buffer.
|
| ASN1OCTET* xerGetMsgPtr |
( |
ASN1CTXT * |
pctxt |
) |
|
|
|
|
This function is used to obtain a pointer to the start of an encoded message. This function is called after a complier generated encode function to get the pointer to the start of the encoded message. It is normally used when dynamic encoding is specified because the message pointer is not known until the encoding is complete. If static encoding is used, the message starts at the beginning of the specified buffer and the xerGetMsgLen function can be used to obtain the length of the message.
- Parameters:
-
| pctxt | A pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
- Returns:
- A pointer to the beginning of the encoded message.
|
| int xerTextLength |
( |
ASN1Const XMLCHAR * |
text |
) |
|
|
|
|
This function returns the length of a 16-bit character null-terminated string.
- Parameters:
-
| text | A pointer to a 16-bit character null-terminated string. |
|
| ASN1ConstCharPtr xerTextToCStr |
( |
ASN1CTXT * |
pctxt, |
|
|
ASN1Const XMLCHAR * |
text |
|
) |
|
|
|
|
This function converts a 16-bit character string to a standard null-terminated C-string. This function will allocate dynamic memory to store the decoded result.
- Parameters:
-
| pctxt | A pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
| text | A pointer to a 16-bit character null-terminated string. |
- Returns:
- The resulting C string. The memory is allocated by using rtMemAlloc function.
|
|
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.
|
This file was last modified on
8 Sep 2005. ASN1C XER Runtime, ASN1C v5.8x |
|