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];
99 typedef OSUINT32 OSRTFLAGS;
126 #define OSDIAG 0x80000000 127 #define OSTRACE 0x40000000 128 #define OSDISSTRM 0x20000000 129 #define OSNOSTRMBACKOFF 0x08000000 130 #define OS3GMOBORIG 0x04000000 137 #define OSCONTCLOSED 0x02000000 138 #define OSRESERVED1 0x01000000 139 #define OSBUFSYSALLOC 0x00800000 170 #if !defined(OSCDECL) 171 #if defined(_MSC_VER) || defined(__BORLANDC__) 172 #define OSCDECL __cdecl 203 #ifndef _OS_NOPATTERN 222 OSVoidPtr pGlobalData;
223 struct OS3GPPSecParams* p3gppSec;
226 struct OSRTDiagBitFieldList* pBitFldList;
231 #define OSRT_GET_FIRST_ERROR_INFO(pctxt) \ 232 (((pctxt)->errInfo.list.head == 0) ? (OSRTErrInfo*)0 : \ 233 (OSRTErrInfo*)((pctxt)->errInfo.list.head->data)) 235 #define OSRT_GET_LAST_ERROR_INFO(pctxt) \ 236 (((pctxt)->errInfo.list.tail == 0) ? (OSRTErrInfo*)0 : \ 237 (OSRTErrInfo*)((pctxt)->errInfo.list.tail->data)) 244 #define OSRTISSTREAM(pctxt) \ 245 ((pctxt)->pStream != 0 && !((pctxt)->flags & OSDISSTRM)) 247 #define OSRTISBUFSTREAM(pctxt) \ 248 (OSRTISSTREAM(pctxt) && (0 != ((pctxt)->pStream->flags & OSRTSTRMF_BUFFERED))) 252 #define OSRTISSTREAM(pctxt) FALSE 253 #define OSRTISBUFSTREAM(pctxt) FALSE 257 #define OSRTBUFCUR(pctxt) (pctxt)->buffer.data[(pctxt)->buffer.byteIndex] 258 #define OSRTBUFPTR(pctxt) &(pctxt)->buffer.data[(pctxt)->buffer.byteIndex] 259 #define OSRTBUFFER(pctxt) (pctxt)->buffer.data 260 #define OSRTBUFSIZE(pctxt) (pctxt)->buffer.size 262 #define OSRTBUFSAVE(pctxt) { \ 263 (pctxt)->savedInfo.byteIndex = (pctxt)->buffer.byteIndex; \ 264 (pctxt)->savedInfo.flags = (pctxt)->flags; } 266 #define OSRTBUFSAVE2(pctxt,pSavedBuf) { \ 267 (pSavedBuf)->byteIndex = (pctxt)->buffer.byteIndex; \ 268 (pSavedBuf)->bitOffset = (pctxt)->buffer.bitOffset; \ 269 (pSavedBuf)->flags = (pctxt)->flags; } 271 #define OSRTBUFRESTORE(pctxt) { \ 272 (pctxt)->buffer.byteIndex = (pctxt)->savedInfo.byteIndex; \ 273 (pctxt)->flags = (pctxt)->savedInfo.flags; } 275 #define OSRTBUFRESTORE2(pctxt,pSavedBuf) { \ 276 (pctxt)->buffer.byteIndex = (pSavedBuf)->byteIndex; \ 277 (pctxt)->buffer.bitOffset = (pSavedBuf)->bitOffset; \ 278 (pctxt)->flags = (pSavedBuf)->flags; } 280 #define OSRTBYTEALIGNED(pctxt) \ 281 ((pctxt)->buffer.bitOffset == 8 || (pctxt)->buffer.bitOffset == 0) 285 typedef void *(OSCDECL *OSMallocFunc ) (OSSIZE size);
286 typedef void *(OSCDECL *OSReallocFunc) (
void *ptr, OSSIZE size);
287 typedef void (OSCDECL *OSFreeFunc ) (
void *ptr);
317 #ifndef rtxInitContext 336 OSMallocFunc malloc_func,
337 OSReallocFunc realloc_func,
338 OSFreeFunc free_func);
377 (
OSCTXT* pctxt,
const OSOCTET* key, OSSIZE keylen);
398 (
OSCTXT* pctxt, OSOCTET* bufaddr, OSSIZE bufsiz);
424 (
OSCTXT* pctxt, OSOCTET* bufaddr, OSSIZE bufsiz);
437 #define rtxCtxtGetMsgPtr(pctxt) (pctxt)->buffer.data 448 #define rtxCtxtGetMsgLen(pctxt) (pctxt)->buffer.byteIndex 533 #define rtxCtxtTestFlag(pctxt,mask) (((pctxt)->flags & mask) != 0) 550 (
OSCTXT* pctxt,
const OSUTF8CHAR* elemName, OSSIZE idx);
620 #define rtxCtxtPeekElemName(pctxt) \ 621 (((pctxt)->elemNameStack.count > 0) ? \ 622 (const OSUTF8CHAR*)(pctxt)->elemNameStack.tail->data : (const OSUTF8CHAR*)0) 696 EXTERNRT
int rtxPreInitContext (
OSCTXT* pctxt);
697 EXTERNRT
void rtxCtxtSetMemHeap (
OSCTXT* pctxt,
OSCTXT* pSrcCtxt);
723 #define rtxByteAlign(pctxt) \ 724 if ((pctxt)->buffer.bitOffset != 8) { \ 725 (pctxt)->buffer.byteIndex++; (pctxt)->buffer.bitOffset = 8; } 761 (
OSCTXT* pctxt,
char* buf, OSSIZE bufsiz);
776 #define rtxCtxtSetProtocolVersion(pctxt,value) (pctxt)->version = value 789 #define rtxMarkBitPos(pctxt,ppos,pbitoff) \ 790 (*(pbitoff) = (OSUINT8) (pctxt)->buffer.bitOffset, rtxMarkPos (pctxt, ppos)) 792 #define rtxResetToBitPos(pctxt,pos,bitoff) \ 793 ((pctxt)->buffer.bitOffset = (OSUINT8) bitoff, rtxResetToPos (pctxt, pos)) 796 #define RTXCTXTPUSHARRAYELEMNAME(pctxt,name,idx) \ 797 rtxCtxtPushArrayElemName(pctxt,OSUTF8(name),idx) 799 #define RTXCTXTPOPARRAYELEMNAME(pctxt) \ 800 rtxCtxtPopArrayElemName(pctxt) 802 #define RTXCTXTPUSHELEMNAME(pctxt,name) \ 803 rtxCtxtPushElemName(pctxt,OSUTF8(name)) 805 #define RTXCTXTPOPELEMNAME(pctxt) \ 806 rtxCtxtPopElemName(pctxt) 808 #define RTXCTXTPUSHTYPENAME(pctxt,name) \ 809 rtxCtxtPushTypeName(pctxt,OSUTF8(name)) 811 #define RTXCTXTPOPTYPENAME(pctxt) \ 812 rtxCtxtPopTypeName(pctxt) 814 #define RTXCTXTPUSHARRAYELEMNAME(pctxt,name,idx) 815 #define RTXCTXTPOPARRAYELEMNAME(pctxt) 816 #define RTXCTXTPUSHELEMNAME(pctxt,name) 817 #define RTXCTXTPOPELEMNAME(pctxt) 818 #define RTXCTXTPUSHTYPENAME(pctxt,name) 819 #define RTXCTXTPOPTYPENAME(pctxt) int(* OSResetCtxtAppInfoPtr)(struct OSCTXT *pctxt)
Definition: rtxContext.h:156
Definition: rtxContext.h:76
void(* OSFreeCtxtGlobalPtr)(struct OSCTXT *pctxt)
Definition: rtxContext.h:165
void rtxCtxtPopAllContainers(OSCTXT *pctxt)
int rtxCtxtPushContainerBytes(OSCTXT *pctxt, OSSIZE bytes)
void rtxFreeContext(OSCTXT *pctxt)
OSBOOL rtxCtxtPopArrayElemName(OSCTXT *pctxt)
OSRTStack containerEndIndexStack
Definition: rtxContext.h:214
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:107
Definition: rtxContext.h:117
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:90
const char * rtxCtxtGetExpDateStr(OSCTXT *pctxt, char *buf, OSSIZE bufsiz)
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)
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:185
Definition: rtxStream.h:176
Definition: rtxStack.h:48
void rtxCtxtSetFlag(OSCTXT *pctxt, OSUINT32 mask)
int rtxCtxtPushContainerBits(OSCTXT *pctxt, OSSIZE bits)
void rtxLicenseClose(void)
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:148
void rtxCtxtPopContainer(OSCTXT *pctxt)
int rtxInitContext(OSCTXT *pctxt)