ASN1C C/C++ Common Runtime  ASN1C v7.5.x
OSRTInputStream.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2021 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 _OSRTINPUTSTREAM_H_
29 #define _OSRTINPUTSTREAM_H_
30 
31 #include "rtxsrc/OSRTInputStreamIF.h"
32 #include "rtxsrc/OSRTStream.h"
33 
41 class EXTRTCLASS OSRTInputStream : public OSRTStream, public OSRTInputStreamIF {
42  public:
51  EXTRTMETHOD OSRTInputStream ();
52 
53  EXTRTMETHOD OSRTInputStream
54  (OSRTContext* mpContext, OSBOOL attachStream = FALSE);
55 
59  virtual EXTRTMETHOD ~OSRTInputStream ();
60 
71  virtual EXTRTMETHOD int close ();
72 
78  virtual EXTRTMETHOD size_t currentPos ();
79 
88  virtual EXTRTMETHOD int flush ();
89 
97  virtual OSBOOL isA (StreamID id) const {
98  return id == Unknown;
99  }
100 
110  virtual OSRTCtxtPtr getContext () {
111  return OSRTStream::getContext ();
112  }
113 
120  virtual OSCTXT* getCtxtPtr () {
121  return OSRTStream::getCtxtPtr ();
122  }
123 
131  virtual char* getErrorInfo () {
132  return OSRTStream::getErrorInfo ();
133  }
134 
151  virtual char* getErrorInfo (char* pBuf, size_t& bufSize) {
152  return OSRTStream::getErrorInfo (pBuf, bufSize);
153  }
154 
164  virtual int getPosition (size_t* ppos);
165 
175  virtual int getStatus () const {
176  return OSRTStream::getStatus ();
177  }
178 
185  virtual EXTRTMETHOD OSBOOL isOpened ();
186 
196  virtual EXTRTMETHOD OSBOOL markSupported ();
197 
213  virtual EXTRTMETHOD int mark (size_t readAheadLimit);
214 
220 
226 
236  virtual EXTRTMETHOD long read (OSOCTET* pDestBuf, size_t maxToRead);
237 
247  virtual EXTRTMETHOD long readBlocking
248  (OSOCTET* pDestBuf, size_t toReadBytes);
249 
259  virtual EXTRTMETHOD int reset ();
260 
271  virtual int setPosition (size_t pos);
272 
283  virtual EXTRTMETHOD int skip (size_t n);
284 
285 } ;
286 
287 #endif /* _OSRTINPUTSTREAM_H_ */
Definition: OSRTStream.h:44
void resetErrorInfo()
Definition: OSRTInputStream.h:225
virtual char * getErrorInfo()
Definition: OSRTInputStream.h:131
virtual char * getErrorInfo(char *pBuf, size_t &bufSize)
Definition: OSRTInputStream.h:151
virtual EXTRTMETHOD int close()
void resetErrorInfo()
Definition: OSRTStream.h:180
virtual char * getErrorInfo()
Definition: OSRTStream.h:122
virtual int getStatus() const
Definition: OSRTInputStream.h:175
int getStatus() const
Definition: OSRTStream.h:155
void printErrorInfo()
Definition: OSRTStream.h:172
virtual OSCTXT * getCtxtPtr()
Definition: OSRTInputStream.h:120
virtual EXTRTMETHOD int flush()
Definition: OSRTContext.h:310
Definition: OSRTContext.h:64
void printErrorInfo()
Definition: OSRTInputStream.h:219
virtual OSBOOL isA(StreamID id) const
Definition: OSRTInputStream.h:97
virtual EXTRTMETHOD OSBOOL isOpened()
Definition: rtxContext.h:197
virtual OSRTCtxtPtr getContext()
Definition: OSRTInputStream.h:110
Definition: OSRTInputStream.h:41
virtual OSCTXT * getCtxtPtr()
Definition: OSRTStream.h:111
virtual OSRTCtxtPtr getContext()
Definition: OSRTStream.h:101