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;
233 #define OSRT_GET_FIRST_ERROR_INFO(pctxt) \ 234 (((pctxt)->errInfo.list.head == 0) ? (OSRTErrInfo*)0 : \ 235 (OSRTErrInfo*)((pctxt)->errInfo.list.head->data)) 237 #define OSRT_GET_LAST_ERROR_INFO(pctxt) \ 238 (((pctxt)->errInfo.list.tail == 0) ? (OSRTErrInfo*)0 : \ 239 (OSRTErrInfo*)((pctxt)->errInfo.list.tail->data)) 246 #define OSRTISSTREAM(pctxt) \ 247 ((pctxt)->pStream != 0 && !((pctxt)->flags & OSDISSTRM)) 249 #define OSRTISBUFSTREAM(pctxt) \ 250 (OSRTISSTREAM(pctxt) && (0 != ((pctxt)->pStream->flags & OSRTSTRMF_BUFFERED))) 254 #define OSRTISSTREAM(pctxt) FALSE 255 #define OSRTISBUFSTREAM(pctxt) FALSE 259 #define OSRTBUFCUR(pctxt) (pctxt)->buffer.data[(pctxt)->buffer.byteIndex] 260 #define OSRTBUFPTR(pctxt) &(pctxt)->buffer.data[(pctxt)->buffer.byteIndex] 261 #define OSRTBUFFER(pctxt) (pctxt)->buffer.data 262 #define OSRTBUFSIZE(pctxt) (pctxt)->buffer.size 264 #define OSRTBUFSAVE(pctxt) { \ 265 (pctxt)->savedInfo.byteIndex = (pctxt)->buffer.byteIndex; \ 266 (pctxt)->savedInfo.flags = (pctxt)->flags; } 268 #define OSRTBUFSAVE2(pctxt,pSavedBuf) { \ 269 (pSavedBuf)->byteIndex = (pctxt)->buffer.byteIndex; \ 270 (pSavedBuf)->bitOffset = (pctxt)->buffer.bitOffset; \ 271 (pSavedBuf)->flags = (pctxt)->flags; } 273 #define OSRTBUFRESTORE(pctxt) { \ 274 (pctxt)->buffer.byteIndex = (pctxt)->savedInfo.byteIndex; \ 275 (pctxt)->flags = (pctxt)->savedInfo.flags; } 277 #define OSRTBUFRESTORE2(pctxt,pSavedBuf) { \ 278 (pctxt)->buffer.byteIndex = (pSavedBuf)->byteIndex; \ 279 (pctxt)->buffer.bitOffset = (pSavedBuf)->bitOffset; \ 280 (pctxt)->flags = (pSavedBuf)->flags; } 282 #define OSRTBYTEALIGNED(pctxt) \ 283 ((pctxt)->buffer.bitOffset == 8 || (pctxt)->buffer.bitOffset == 0) 287 typedef void *(OSCDECL *OSMallocFunc ) (OSSIZE size);
288 typedef void *(OSCDECL *OSReallocFunc) (
void *ptr, OSSIZE size);
289 typedef void (OSCDECL *OSFreeFunc ) (
void *ptr);
319 #ifndef rtxInitContext 338 OSMallocFunc malloc_func,
339 OSReallocFunc realloc_func,
340 OSFreeFunc free_func);
379 (
OSCTXT* pctxt,
const OSOCTET* key, OSSIZE keylen);
400 (
OSCTXT* pctxt, OSOCTET* bufaddr, OSSIZE bufsiz);
426 (
OSCTXT* pctxt, OSOCTET* bufaddr, OSSIZE bufsiz);
439 #define rtxCtxtGetMsgPtr(pctxt) (pctxt)->buffer.data 450 #define rtxCtxtGetMsgLen(pctxt) (pctxt)->buffer.byteIndex 535 #define rtxCtxtTestFlag(pctxt,mask) (((pctxt)->flags & mask) != 0) 552 (
OSCTXT* pctxt,
const OSUTF8CHAR* elemName, OSSIZE idx);
583 (
OSCTXT* pctxt,
const OSUTF8CHAR* elemName);
648 #define rtxCtxtPeekElemName(pctxt) \ 649 (((pctxt)->elemNameStack.count > 0) ? \ 650 (const OSUTF8CHAR*)(pctxt)->elemNameStack.tail->data : (const OSUTF8CHAR*)0) 737 EXTERNRT
int rtxPreInitContext (
OSCTXT* pctxt);
738 EXTERNRT
void rtxCtxtSetMemHeap (
OSCTXT* pctxt,
OSCTXT* pSrcCtxt);
764 #define rtxByteAlign(pctxt) \ 765 if ((pctxt)->buffer.bitOffset != 8) { \ 766 (pctxt)->buffer.byteIndex++; (pctxt)->buffer.bitOffset = 8; } 802 (
OSCTXT* pctxt,
char* buf, OSSIZE bufsiz);
817 #define rtxCtxtSetProtocolVersion(pctxt,value) (pctxt)->version = value 830 #define rtxMarkBitPos(pctxt,ppos,pbitoff) \ 831 (*(pbitoff) = (OSUINT8) (pctxt)->buffer.bitOffset, rtxMarkPos (pctxt, ppos)) 833 #define rtxResetToBitPos(pctxt,pos,bitoff) \ 834 ((pctxt)->buffer.bitOffset = (OSUINT8) bitoff, rtxResetToPos (pctxt, pos)) 837 #define RTXCTXTPUSHARRAYELEMNAME(pctxt,name,idx) \ 838 rtxCtxtPushArrayElemName(pctxt,OSUTF8(name),idx) 840 #define RTXCTXTPOPARRAYELEMNAME(pctxt) \ 841 rtxCtxtPopArrayElemName(pctxt) 843 #define RTXCTXTPUSHELEMNAME(pctxt,name) \ 844 rtxCtxtPushElemName(pctxt,OSUTF8(name)) 846 #define RTXCTXTPOPELEMNAME(pctxt) \ 847 rtxCtxtPopElemName(pctxt) 849 #define RTXCTXTPUSHTYPENAME(pctxt,name) \ 850 rtxCtxtPushTypeName(pctxt,OSUTF8(name)) 852 #define RTXCTXTPOPTYPENAME(pctxt) \ 853 rtxCtxtPopTypeName(pctxt) 855 #define RTXCTXTPUSHARRAYELEMNAME(pctxt,name,idx) 856 #define RTXCTXTPOPARRAYELEMNAME(pctxt) 857 #define RTXCTXTPUSHELEMNAME(pctxt,name) 858 #define RTXCTXTPOPELEMNAME(pctxt) 859 #define RTXCTXTPUSHTYPENAME(pctxt,name) 860 #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
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: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)
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:185
Definition: rtxStream.h:176
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:148
void rtxCtxtPopContainer(OSCTXT *pctxt)
int rtxInitContext(OSCTXT *pctxt)