ASN1C C/C++ Common Runtime  ASN1C v7.3.x
OSRTMsgBuf.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2019 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
28 #ifndef _OSRTMSGBUF_H_
29 #define _OSRTMSGBUF_H_
30 
31 #include "rtxsrc/OSRTCtxtHolder.h"
32 #include "rtxsrc/OSRTMsgBufIF.h"
33 
46 class EXTRTCLASS OSRTMessageBuffer : public OSRTMessageBufferIF
47 {
48  protected:
49  OSRTCtxtHolder mCtxtHolder;
50 
56 
66  EXTRTMETHOD OSRTMessageBuffer (Type bufferType, OSRTContext* pContext = 0);
67 
68  public:
73  virtual ~OSRTMessageBuffer () {}
74 
78  virtual void* getAppInfo () { return 0; }
79 
86  virtual size_t getByteIndex () {
87  return getCtxtPtr()->buffer.byteIndex;
88  }
89 
94  virtual OSRTCtxtPtr getContext () {
95  return mCtxtHolder.getContext ();
96  }
97 
102  virtual OSCTXT* getCtxtPtr () {
103  return mCtxtHolder.getCtxtPtr ();
104  }
105 
113  virtual char* getErrorInfo () {
114  return mCtxtHolder.getErrorInfo ();
115  }
116 
133  virtual char* getErrorInfo (char* pBuf, size_t& bufSize) {
134  return mCtxtHolder.getErrorInfo (pBuf, bufSize);
135  }
136 
141  virtual OSOCTET* getMsgCopy () {
142  return 0;
143  }
144 
149  virtual const OSOCTET* getMsgPtr () {
150  return getCtxtPtr()->buffer.data;
151  }
152 
162  inline int getStatus () const {
163  return mCtxtHolder.getStatus();
164  }
165 
173  virtual int init () { return 0; }
174 
186  virtual EXTRTMETHOD int initBuffer (OSOCTET* pMsgBuf, size_t msgBufLen);
187 
192  virtual void printErrorInfo () {
193  mCtxtHolder.printErrorInfo ();
194  }
195 
200  virtual void resetErrorInfo () {
201  mCtxtHolder.resetErrorInfo ();
202  }
203 
207  virtual void setAppInfo (void*) {}
208 
214  virtual EXTRTMETHOD void setDiag (OSBOOL value=TRUE);
215 
216 } ;
217 
220 #endif
virtual void resetErrorInfo()
Definition: OSRTMsgBuf.h:200
virtual void printErrorInfo()
Definition: OSRTMsgBuf.h:192
virtual char * getErrorInfo(char *pBuf, size_t &bufSize)
Definition: OSRTMsgBuf.h:133
virtual OSRTCtxtPtr getContext()
Definition: OSRTMsgBuf.h:94
int getStatus() const
Definition: OSRTMsgBuf.h:162
Type mBufferType
Definition: OSRTMsgBuf.h:55
virtual void * getAppInfo()
Definition: OSRTMsgBuf.h:78
virtual void setAppInfo(void *)
Definition: OSRTMsgBuf.h:207
Definition: OSRTContext.h:310
virtual const OSOCTET * getMsgPtr()
Definition: OSRTMsgBuf.h:149
virtual ~OSRTMessageBuffer()
Definition: OSRTMsgBuf.h:73
virtual char * getErrorInfo()
Definition: OSRTMsgBuf.h:113
Definition: OSRTContext.h:65
Definition: OSRTMsgBuf.h:46
virtual OSOCTET * getMsgCopy()
Definition: OSRTMsgBuf.h:141
virtual size_t getByteIndex()
Definition: OSRTMsgBuf.h:86
Definition: rtxContext.h:185
virtual int init()
Definition: OSRTMsgBuf.h:173
virtual OSCTXT * getCtxtPtr()
Definition: OSRTMsgBuf.h:102