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 174 #if !defined(OSCDECL) 175 #if defined(_MSC_VER) || defined(__BORLANDC__) 176 #define OSCDECL __cdecl 207 #ifndef _OS_NOPATTERN 226 OSVoidPtr pGlobalData;
227 struct OS3GPPSecParams* p3gppSec;
230 struct OSRTDiagBitFieldList* pBitFldList;
237 #define OSRT_GET_FIRST_ERROR_INFO(pctxt) \ 238 (((pctxt)->errInfo.list.head == 0) ? (OSRTErrInfo*)0 : \ 239 (OSRTErrInfo*)((pctxt)->errInfo.list.head->data)) 241 #define OSRT_GET_LAST_ERROR_INFO(pctxt) \ 242 (((pctxt)->errInfo.list.tail == 0) ? (OSRTErrInfo*)0 : \ 243 (OSRTErrInfo*)((pctxt)->errInfo.list.tail->data)) 250 #define OSRTISSTREAM(pctxt) \ 251 ((pctxt)->pStream != 0 && !((pctxt)->flags & OSDISSTRM)) 253 #define OSRTISBUFSTREAM(pctxt) \ 254 (OSRTISSTREAM(pctxt) && (0 != ((pctxt)->pStream->flags & OSRTSTRMF_BUFFERED))) 258 #define OSRTISSTREAM(pctxt) FALSE 259 #define OSRTISBUFSTREAM(pctxt) FALSE 263 #define OSRTBUFCUR(pctxt) (pctxt)->buffer.data[(pctxt)->buffer.byteIndex] 264 #define OSRTBUFPTR(pctxt) &(pctxt)->buffer.data[(pctxt)->buffer.byteIndex] 265 #define OSRTBUFFER(pctxt) (pctxt)->buffer.data 266 #define OSRTBUFSIZE(pctxt) (pctxt)->buffer.size 268 #define OSRTBUFSAVE(pctxt) { \ 269 (pctxt)->savedInfo.byteIndex = (pctxt)->buffer.byteIndex; \ 270 (pctxt)->savedInfo.flags = (pctxt)->flags; } 272 #define OSRTBUFSAVE2(pctxt,pSavedBuf) { \ 273 (pSavedBuf)->byteIndex = (pctxt)->buffer.byteIndex; \ 274 (pSavedBuf)->bitOffset = (pctxt)->buffer.bitOffset; \ 275 (pSavedBuf)->flags = (pctxt)->flags; } 277 #define OSRTBUFRESTORE(pctxt) { \ 278 (pctxt)->buffer.byteIndex = (pctxt)->savedInfo.byteIndex; \ 279 (pctxt)->flags = (pctxt)->savedInfo.flags; } 281 #define OSRTBUFRESTORE2(pctxt,pSavedBuf) { \ 282 (pctxt)->buffer.byteIndex = (pSavedBuf)->byteIndex; \ 283 (pctxt)->buffer.bitOffset = (pSavedBuf)->bitOffset; \ 284 (pctxt)->flags = (pSavedBuf)->flags; } 286 #define OSRTBYTEALIGNED(pctxt) \ 287 ((pctxt)->buffer.bitOffset == 8 || (pctxt)->buffer.bitOffset == 0) 291 typedef void *(OSCDECL *OSMallocFunc ) (OSSIZE size);
292 typedef void *(OSCDECL *OSReallocFunc) (
void *ptr, OSSIZE size);
293 typedef void (OSCDECL *OSFreeFunc ) (
void *ptr);
323 #ifndef rtxInitContext 342 OSMallocFunc malloc_func,
343 OSReallocFunc realloc_func,
344 OSFreeFunc free_func);
383 (
OSCTXT* pctxt,
const OSOCTET* key, OSSIZE keylen);
404 (
OSCTXT* pctxt, OSOCTET* bufaddr, OSSIZE bufsiz);
430 (
OSCTXT* pctxt, OSOCTET* bufaddr, OSSIZE bufsiz);
443 #define rtxCtxtGetMsgPtr(pctxt) (pctxt)->buffer.data 454 #define rtxCtxtGetMsgLen(pctxt) (pctxt)->buffer.byteIndex 539 #define rtxCtxtTestFlag(pctxt,mask) (((pctxt)->flags & mask) != 0) 556 (
OSCTXT* pctxt,
const OSUTF8CHAR* elemName, OSSIZE idx);
587 (
OSCTXT* pctxt,
const OSUTF8CHAR* elemName);
652 #define rtxCtxtPeekElemName(pctxt) \ 653 (((pctxt)->elemNameStack.count > 0) ? \ 654 (const OSUTF8CHAR*)(pctxt)->elemNameStack.tail->data : (const OSUTF8CHAR*)0) 741 EXTERNRT
int rtxPreInitContext (
OSCTXT* pctxt);
742 EXTERNRT
void rtxCtxtSetMemHeap (
OSCTXT* pctxt,
OSCTXT* pSrcCtxt);
768 #define rtxByteAlign(pctxt) \ 769 if ((pctxt)->buffer.bitOffset != 8) { \ 770 (pctxt)->buffer.byteIndex++; (pctxt)->buffer.bitOffset = 8; } 806 (
OSCTXT* pctxt,
char* buf, OSSIZE bufsiz);
821 #define rtxCtxtSetProtocolVersion(pctxt,value) (pctxt)->version = value 834 #define rtxMarkBitPos(pctxt,ppos,pbitoff) \ 835 (*(pbitoff) = (OSUINT8) (pctxt)->buffer.bitOffset, rtxMarkPos (pctxt, ppos)) 837 #define rtxResetToBitPos(pctxt,pos,bitoff) \ 838 ((pctxt)->buffer.bitOffset = (OSUINT8) bitoff, rtxResetToPos (pctxt, pos)) 841 #define RTXCTXTPUSHARRAYELEMNAME(pctxt,name,idx) \ 842 rtxCtxtPushArrayElemName(pctxt,OSUTF8(name),idx) 844 #define RTXCTXTPOPARRAYELEMNAME(pctxt) \ 845 rtxCtxtPopArrayElemName(pctxt) 847 #define RTXCTXTPUSHELEMNAME(pctxt,name) \ 848 rtxCtxtPushElemName(pctxt,OSUTF8(name)) 850 #define RTXCTXTPOPELEMNAME(pctxt) \ 851 rtxCtxtPopElemName(pctxt) 853 #define RTXCTXTPUSHTYPENAME(pctxt,name) \ 854 rtxCtxtPushTypeName(pctxt,OSUTF8(name)) 856 #define RTXCTXTPOPTYPENAME(pctxt) \ 857 rtxCtxtPopTypeName(pctxt) 859 #define RTXCTXTPUSHARRAYELEMNAME(pctxt,name,idx) 860 #define RTXCTXTPOPARRAYELEMNAME(pctxt) 861 #define RTXCTXTPUSHELEMNAME(pctxt,name) 862 #define RTXCTXTPOPELEMNAME(pctxt) 863 #define RTXCTXTPUSHTYPENAME(pctxt,name) 864 #define RTXCTXTPOPTYPENAME(pctxt) int(* OSResetCtxtAppInfoPtr)(struct OSCTXT *pctxt)
Definition: rtxContext.h:160
Definition: rtxContext.h:80
void(* OSFreeCtxtGlobalPtr)(struct OSCTXT *pctxt)
Definition: rtxContext.h:169
void rtxCtxtPopAllContainers(OSCTXT *pctxt)
int rtxCtxtPushContainerBytes(OSCTXT *pctxt, OSSIZE bytes)
void rtxFreeContext(OSCTXT *pctxt)
OSBOOL rtxCtxtPopArrayElemName(OSCTXT *pctxt)
OSRTStack containerEndIndexStack
Definition: rtxContext.h:218
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)
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:189
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:152
void rtxCtxtPopContainer(OSCTXT *pctxt)
int rtxInitContext(OSCTXT *pctxt)