28 #ifndef _RTXCONTEXT_H_ 29 #define _RTXCONTEXT_H_ 34 #define OSRTENCBUFSIZ 1024 42 #define OSRTERRSTKSIZ 8 43 #define OSRTMAXERRPRM 5 53 const OSUTF8CHAR* module;
72 OSUTF8CHAR* parms[OSRTMAXERRPRM];
103 typedef OSUINT32 OSRTFLAGS;
130 #define OSDIAG 0x80000000 131 #define OSTRACE 0x40000000 132 #define OSDISSTRM 0x20000000 133 #define OSNOSTRMBACKOFF 0x08000000 134 #define OS3GMOBORIG 0x04000000 141 #define OSCONTCLOSED 0x02000000 142 #define OSRESERVED1 0x01000000 143 #define OSBUFSYSALLOC 0x00800000 144 #define OSLICCHECKIN 0x00400000 150 #define OSNOWHITESPACE 0x00400000 181 #if !defined(OSCDECL) 182 #if defined(_MSC_VER) || defined(__BORLANDC__) 183 #define OSCDECL __cdecl 189 #define pLicInfo pli709 216 #ifndef _OS_NOPATTERN 235 OSVoidPtr pGlobalData;
236 struct OS3GPPSecParams* p3gppSec;
239 struct OSRTDiagBitFieldList* pBitFldList;
246 #define OSRT_GET_FIRST_ERROR_INFO(pctxt) \ 247 (((pctxt)->errInfo.list.head == 0) ? (OSRTErrInfo*)0 : \ 248 (OSRTErrInfo*)((pctxt)->errInfo.list.head->data)) 250 #define OSRT_GET_LAST_ERROR_INFO(pctxt) \ 251 (((pctxt)->errInfo.list.tail == 0) ? (OSRTErrInfo*)0 : \ 252 (OSRTErrInfo*)((pctxt)->errInfo.list.tail->data)) 259 #define OSRTISSTREAM(pctxt) \ 260 ((pctxt)->pStream != 0 && !((pctxt)->flags & OSDISSTRM)) 262 #define OSRTISBUFSTREAM(pctxt) \ 263 (OSRTISSTREAM(pctxt) && (0 != ((pctxt)->pStream->flags & OSRTSTRMF_BUFFERED))) 267 #define OSRTISSTREAM(pctxt) FALSE 268 #define OSRTISBUFSTREAM(pctxt) FALSE 272 #define OSRTBUFCUR(pctxt) (pctxt)->buffer.data[(pctxt)->buffer.byteIndex] 273 #define OSRTBUFPTR(pctxt) &(pctxt)->buffer.data[(pctxt)->buffer.byteIndex] 274 #define OSRTBUFFER(pctxt) (pctxt)->buffer.data 275 #define OSRTBUFSIZE(pctxt) (pctxt)->buffer.size 277 #define OSRTBUFSAVE(pctxt) { \ 278 (pctxt)->savedInfo.byteIndex = (pctxt)->buffer.byteIndex; \ 279 (pctxt)->savedInfo.flags = (pctxt)->flags; } 281 #define OSRTBUFSAVE2(pctxt,pSavedBuf) { \ 282 (pSavedBuf)->byteIndex = (pctxt)->buffer.byteIndex; \ 283 (pSavedBuf)->bitOffset = (pctxt)->buffer.bitOffset; \ 284 (pSavedBuf)->flags = (pctxt)->flags; } 286 #define OSRTBUFRESTORE(pctxt) { \ 287 (pctxt)->buffer.byteIndex = (pctxt)->savedInfo.byteIndex; \ 288 (pctxt)->flags = (pctxt)->savedInfo.flags; } 290 #define OSRTBUFRESTORE2(pctxt,pSavedBuf) { \ 291 (pctxt)->buffer.byteIndex = (pSavedBuf)->byteIndex; \ 292 (pctxt)->buffer.bitOffset = (pSavedBuf)->bitOffset; \ 293 (pctxt)->flags = (pSavedBuf)->flags; } 295 #define OSRTBYTEALIGNED(pctxt) \ 296 ((pctxt)->buffer.bitOffset == 8 || (pctxt)->buffer.bitOffset == 0) 300 typedef void *(OSCDECL *OSMallocFunc ) (OSSIZE size);
301 typedef void *(OSCDECL *OSReallocFunc) (
void *ptr, OSSIZE size);
302 typedef void (OSCDECL *OSFreeFunc ) (
void *ptr);
337 #ifndef rtxInitContext 356 OSMallocFunc malloc_func,
357 OSReallocFunc realloc_func,
358 OSFreeFunc free_func);
397 (
OSCTXT* pctxt,
const OSOCTET* key, OSSIZE keylen);
418 (
OSCTXT* pctxt, OSOCTET* bufaddr, OSSIZE bufsiz);
444 (
OSCTXT* pctxt, OSOCTET* bufaddr, OSSIZE bufsiz);
457 #define rtxCtxtGetMsgPtr(pctxt) (pctxt)->buffer.data 468 #define rtxCtxtGetMsgLen(pctxt) (pctxt)->buffer.byteIndex 553 #define rtxCtxtTestFlag(pctxt,mask) (((pctxt)->flags & mask) != 0) 570 (
OSCTXT* pctxt,
const OSUTF8CHAR* elemName, OSSIZE idx);
601 (
OSCTXT* pctxt,
const OSUTF8CHAR* elemName);
666 #define rtxCtxtPeekElemName(pctxt) \ 667 (((pctxt)->elemNameStack.count > 0) ? \ 668 (const OSUTF8CHAR*)(pctxt)->elemNameStack.tail->data : (const OSUTF8CHAR*)0) 755 EXTERNRT
int rtxPreInitContext (
OSCTXT* pctxt);
756 EXTERNRT
void rtxCtxtSetMemHeap (
OSCTXT* pctxt,
OSCTXT* pSrcCtxt);
782 #define rtxByteAlign(pctxt) \ 783 if ((pctxt)->buffer.bitOffset != 8) { \ 784 (pctxt)->buffer.byteIndex++; (pctxt)->buffer.bitOffset = 8; } 845 (
OSCTXT* pctxt,
char* buf, OSSIZE bufsiz);
860 #define rtxCtxtSetProtocolVersion(pctxt,value) (pctxt)->version = value 873 #define rtxMarkBitPos(pctxt,ppos,pbitoff) \ 874 (*(pbitoff) = (OSUINT8) (pctxt)->buffer.bitOffset, rtxMarkPos (pctxt, ppos)) 876 #define rtxResetToBitPos(pctxt,pos,bitoff) \ 877 ((pctxt)->buffer.bitOffset = (OSUINT8) bitoff, rtxResetToPos (pctxt, pos)) 880 #define RTXCTXTPUSHARRAYELEMNAME(pctxt,name,idx) \ 881 rtxCtxtPushArrayElemName(pctxt,OSUTF8(name),idx) 883 #define RTXCTXTPOPARRAYELEMNAME(pctxt) \ 884 rtxCtxtPopArrayElemName(pctxt) 886 #define RTXCTXTPUSHELEMNAME(pctxt,name) \ 887 rtxCtxtPushElemName(pctxt,OSUTF8(name)) 889 #define RTXCTXTPOPELEMNAME(pctxt) \ 890 rtxCtxtPopElemName(pctxt) 892 #define RTXCTXTPUSHTYPENAME(pctxt,name) \ 893 rtxCtxtPushTypeName(pctxt,OSUTF8(name)) 895 #define RTXCTXTPOPTYPENAME(pctxt) \ 896 rtxCtxtPopTypeName(pctxt) 898 #define RTXCTXTPUSHARRAYELEMNAME(pctxt,name,idx) 899 #define RTXCTXTPOPARRAYELEMNAME(pctxt) 900 #define RTXCTXTPUSHELEMNAME(pctxt,name) 901 #define RTXCTXTPOPELEMNAME(pctxt) 902 #define RTXCTXTPUSHTYPENAME(pctxt,name) 903 #define RTXCTXTPOPTYPENAME(pctxt) int(* OSResetCtxtAppInfoPtr)(struct OSCTXT *pctxt)
Definition: rtxContext.h:167
Definition: rtxContext.h:80
void(* OSFreeCtxtGlobalPtr)(struct OSCTXT *pctxt)
Definition: rtxContext.h:176
void rtxCtxtPopAllContainers(OSCTXT *pctxt)
int rtxCtxtPushContainerBytes(OSCTXT *pctxt, OSSIZE bytes)
void rtxFreeContext(OSCTXT *pctxt)
OSBOOL rtxCtxtPopArrayElemName(OSCTXT *pctxt)
int rtxCtxtMarkBitPos(OSCTXT *pctxt, OSSIZE *ppos)
OSRTStack containerEndIndexStack
Definition: rtxContext.h:227
void rtxCtxtPopElemNameCopy(OSCTXT *pctxt)
const OSUTF8CHAR * rtxCtxtPopElemName(OSCTXT *pctxt)
Definition: rtxDList.h:64
void rtxMemHeapClearFlags(OSCTXT *pctxt, OSUINT32 flags)
int rtxCtxtSetBufPtr(OSCTXT *pctxt, OSOCTET *bufaddr, OSSIZE bufsiz)
int rtxInitThreadContext(OSCTXT *pctxt, const OSCTXT *pSrcCtxt)
int rtxCtxtPushElemName(OSCTXT *pctxt, const OSUTF8CHAR *elemName)
int rtxInitContextUsingKey(OSCTXT *pctxt, const OSOCTET *key, OSSIZE keylen)
void rtxMemHeapSetFlags(OSCTXT *pctxt, OSUINT32 flags)
Definition: rtxContext.h:111
Definition: rtxContext.h:121
int rtxCtxtPushTypeName(OSCTXT *pctxt, const OSUTF8CHAR *typeName)
int rtxCtxtPushArrayElemName(OSCTXT *pctxt, const OSUTF8CHAR *elemName, OSSIZE idx)
int rtxCheckContext(OSCTXT *pctxt)
const OSUTF8CHAR * rtxCtxtPopTypeName(OSCTXT *pctxt)
Definition: rtxContext.h:94
const char * rtxCtxtGetExpDateStr(OSCTXT *pctxt, char *buf, OSSIZE bufsiz)
int rtxCtxtResetToBitPos(OSCTXT *pctxt, OSSIZE pos)
Definition: rtxDList.h:52
OSSIZE rtxCtxtGetIOByteCount(OSCTXT *pctxt)
Definition: rtxPrintStream.h:51
void rtxCopyContext(OSCTXT *pdest, OSCTXT *psrc)
int rtxInitContextBuffer(OSCTXT *pctxt, OSOCTET *bufaddr, OSSIZE bufsiz)
int rtxCtxtPushElemNameCopy(OSCTXT *pctxt, const OSUTF8CHAR *elemName)
OSSIZE rtxCtxtGetBitOffset(OSCTXT *pctxt)
void rtxCtxtClearFlag(OSCTXT *pctxt, OSUINT32 mask)
Definition: rtxContext.h:67
int rtxMarkPos(OSCTXT *pctxt, OSSIZE *ppos)
OSSIZE rtxCtxtGetContainerRemBits(OSCTXT *pctxt)
int rtxCtxtSetBitOffset(OSCTXT *pctxt, OSSIZE offset)
Definition: rtxContext.h:198
Definition: rtxStream.h:184
Definition: rtxStack.h:48
void rtxCtxtSetFlag(OSCTXT *pctxt, OSUINT32 mask)
int rtxCtxtPushContainerBits(OSCTXT *pctxt, OSSIZE bits)
void rtxLicenseClose(void)
OSBOOL rtxCtxtContainerEnd(OSCTXT *pctxt)
int rtxResetToPos(OSCTXT *pctxt, OSSIZE pos)
Definition: rtxContext.h:52
int rtxInitContextExt(OSCTXT *pctxt, OSMallocFunc malloc_func, OSReallocFunc realloc_func, OSFreeFunc free_func)
OSBOOL rtxCtxtContainerHasRemBits(OSCTXT *pctxt)
int(* OSFreeCtxtAppInfoPtr)(struct OSCTXT *pctxt)
Definition: rtxContext.h:159
void rtxCtxtPopContainer(OSCTXT *pctxt)
int rtxInitContext(OSCTXT *pctxt)