ASN1C C/C++ Common Runtime  ASN1C v7.4.x
OSRTMsgBuf.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2020 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 
156  virtual size_t getMsgLen() { return 0; }
157 
167  inline int getStatus () const {
168  return mCtxtHolder.getStatus();
169  }
170 
178  virtual int init () { return 0; }
179 
191  virtual EXTRTMETHOD int initBuffer (OSOCTET* pMsgBuf, size_t msgBufLen);
192 
197  virtual void printErrorInfo () {
198  mCtxtHolder.printErrorInfo ();
199  }
200 
205  virtual void resetErrorInfo () {
206  mCtxtHolder.resetErrorInfo ();
207  }
208 
212  virtual void setAppInfo (void*) {}
213 
219  virtual EXTRTMETHOD void setDiag (OSBOOL value=TRUE);
220 
221 } ;
222 
225 #endif
virtual void resetErrorInfo()
Definition: OSRTMsgBuf.h:205
virtual void printErrorInfo()
Definition: OSRTMsgBuf.h:197
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:167
Type mBufferType
Definition: OSRTMsgBuf.h:55
virtual void * getAppInfo()
Definition: OSRTMsgBuf.h:78
virtual void setAppInfo(void *)
Definition: OSRTMsgBuf.h:212
Definition: OSRTContext.h:310
virtual size_t getMsgLen()
Definition: OSRTMsgBuf.h:156
virtual const OSOCTET * getMsgPtr()
Definition: OSRTMsgBuf.h:149
virtual ~OSRTMessageBuffer()
Definition: OSRTMsgBuf.h:73
virtual char * getErrorInfo()
Definition: OSRTMsgBuf.h:113
Definition: OSRTContext.h:64
Definition: OSRTMsgBuf.h:46
virtual OSOCTET * getMsgCopy()
Definition: OSRTMsgBuf.h:141
virtual size_t getByteIndex()
Definition: OSRTMsgBuf.h:86
Definition: rtxContext.h:189
virtual int init()
Definition: OSRTMsgBuf.h:178
virtual OSCTXT * getCtxtPtr()
Definition: OSRTMsgBuf.h:102