XBinder  Version 2.6.x
rtxStreamMemory.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2018 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  *****************************************************************************/
27 #ifndef _RTXSTREAMMEMORY_H_
28 #define _RTXSTREAMMEMORY_H_
29 
30 #ifndef _NO_STREAM
31 
32 #include "rtxsrc/rtxStream.h"
33 
34 typedef struct DirBufDesc {
35  OSCTXT* pctxt;
36  OSRTSTREAM* pUnderStream; /* underlying stream object */
37  size_t savedIndex;
38 } DirBufDesc;
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
61 EXTERNRT int rtxStreamMemoryCreate (OSCTXT* pctxt, OSUINT16 flags);
62 
77 EXTERNRT int rtxStreamMemoryAttach (OSCTXT* pctxt, OSOCTET* pMemBuf,
78  size_t bufSize, OSUINT16 flags);
79 
89 EXTERNRT OSOCTET* rtxStreamMemoryGetBuffer (OSCTXT* pctxt, size_t* pSize);
90 
101 EXTERNRT int rtxStreamMemoryCreateReader
102  (OSCTXT* pctxt, OSOCTET* pMemBuf, size_t bufSize);
103 
117 EXTERNRT int rtxStreamMemoryCreateWriter
118  (OSCTXT* pctxt, OSOCTET* pMemBuf, size_t bufSize);
119 
129 EXTERNRT int rtxStreamMemoryResetWriter (OSCTXT* pctxt);
130 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif /* _NO_STREAM */
140 #endif /* _RTXSTREAMMEMORY_H_ */
141 
EXTERNRT int rtxStreamMemoryCreateWriter(OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize)
This function creates an output memory stream using the specified buffer.
EXTERNRT OSOCTET * rtxStreamMemoryGetBuffer(OSCTXT *pctxt, size_t *pSize)
This function returns the memory buffer and its size for the given memory stream. ...
EXTERNRT int rtxStreamMemoryCreate(OSCTXT *pctxt, OSUINT16 flags)
Opens a memory stream.
EXTERNRT int rtxStreamMemoryAttach(OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize, OSUINT16 flags)
Opens a memory stream using the specified memory buffer.
EXTERNRT int rtxStreamMemoryResetWriter(OSCTXT *pctxt)
This function resets the output memory stream internal buffer to allow it to be overwritten with new ...
Input/output data stream type definitions and function prototypes.
Run-time context structure.
Definition: rtxContext.h:185
The stream control block.
Definition: rtxStream.h:176
EXTERNRT int rtxStreamMemoryCreateReader(OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize)
This function creates an input memory stream using the specified buffer.