00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028 #ifndef _RTXCPPMSGBUFIF_H_
00029 #define _RTXCPPMSGBUFIF_H_
00030
00031 #include "rtxsrc/rtxCppContext.h"
00032
00038 class EXTERNRTX OSMessageBufferIF {
00039 public:
00040 enum Type {
00041 XMLEncode, XMLDecode, PEREncode, PERDecode, Stream
00042 } ;
00043
00044 protected:
00049 virtual ~OSMessageBufferIF () {}
00050
00051 public:
00052
00053 virtual OSCtxtPtr getContext () = 0;
00054 virtual OSCTXT* getCtxtPtr () = 0;
00055 virtual OSOCTET* getMsgCopy () { return 0; }
00056 virtual void* getAppInfo () = 0;
00057 virtual const OSOCTET* getMsgPtr () { return 0; }
00058 virtual void init () {}
00059 virtual void initBuffer (OSOCTET* pMsgBuf, size_t msgBufLen) {}
00060 virtual OSBOOL isA (Type bufferType) = 0;
00061 virtual void setAppInfo (void* pAppInfo) = 0;
00062 virtual void setNamespace
00063 (const OSUTF8CHAR* prefix, const OSUTF8CHAR* uri) {}
00064
00071 inline int getByteIndex () {
00072 return getCtxtPtr()->buffer.byteIndex;
00073 }
00074
00079 inline void printErrorInfo () {
00080 rtxErrPrint (getCtxtPtr());
00081 }
00082
00088 virtual void setDiag (OSBOOL value=TRUE) {
00089 rtxSetDiag (getCtxtPtr(), value);
00090 }
00091
00092 };
00093
00094 #endif