Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6circb.h
Go to the documentation of this file.
1 
9 #ifndef P6CIRCB_H__
10 #define P6CIRCB_H__ 1
11 
12 #include "p6lock.h"
13 
14 namespace P6R {
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
21 const CIRCBFLAGS CIRCB_NOFLAGS = 0x00000000;
22 
35 interface p6ICircbuf : p6ICom
36 {
55  P6COMMETHOD initialize(P6R::P6SIZE cSize,CIRCBFLAGS fFlags,P6R::p6IMonitor *pReadMonitor) PURE;
56 
70  P6COMMETHOD available(P6R::P6SIZE *pcAvailable) PURE;
71 
84  P6COMMETHOD inUse(P6R::P6SIZE *pcInUse) PURE;
85 
104  P6COMMETHOD getData(P6UINT8 *pBuffer,P6R::P6SIZE *pcBuffer) PURE;
105 
118  P6COMMETHOD putData(P6UINT8 *pBuffer,P6R::P6SIZE cBuffer) PURE;
119 
134  P6COMMETHOD resize(P6R::P6SIZE cNewSize) PURE;
135 
149  P6COMMETHOD getSize(P6R::P6SIZE *pcSize) PURE;
150 
159  P6COMMETHOD reset() PURE;
160 };
161 #define IF_p6ICircbuf {0xA7D6C8C2,0x076F,0x4219,{0xBE,0xEC,0x03,0xDE,0x0B,0x22,0x12,0xFD}}
162 #define COMP_p6Circbuf {0x25B7AA06,0xF602,0x438b,{0xA5,0x47,0x74,0x09,0x3C,0xDD,0x8F,0x4F}}
163 
164 #ifdef __cplusplus
165 }
166 #endif
167 
168 } // namespace
169 
170 #endif
171 
A intraprocess, reentrant lock/condition variable.
Definition: p6lock.h:75
virtual P6R::P6ERR available(P6R::P6SIZE *pcAvailable)=0
Returns the number of available bytes in the buffer.
size_t P6SIZE
Definition: p6types.h:62
A byte oriented circular buffer.
Definition: p6circb.h:35
virtual P6R::P6ERR putData(P6UINT8 *pBuffer, P6R::P6SIZE cBuffer)=0
The method is used to store data in the buffer.
unsigned int P6UINT32
Definition: p6types.h:40
virtual P6R::P6ERR reset()=0
Reinitializes the buffer to an empty state without having to read out the contents of the buffer...
const CIRCBFLAGS CIRCB_NOFLAGS
Definition: p6circb.h:21
unsigned char P6UINT8
Definition: p6types.h:30
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR getData(P6UINT8 *pBuffer, P6R::P6SIZE *pcBuffer)=0
This method is used to get and remove data from the buffer.
Thread syncronization interfaces and classes.
P6R::P6UINT32 CIRCBFLAGS
Definition: p6circb.h:20
virtual P6R::P6ERR getSize(P6R::P6SIZE *pcSize)=0
Returns the current size of the buffer in bytes.
virtual P6R::P6ERR resize(P6R::P6SIZE cNewSize)=0
Resize the buffer.
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR initialize(P6R::P6SIZE cSize, CIRCBFLAGS fFlags, P6R::p6IMonitor *pReadMonitor)=0
This method is used to initialize the component for use and must be called before any other method...
virtual P6R::P6ERR inUse(P6R::P6SIZE *pcInUse)=0
This method is used to determine the number of bytes that are currently used in the buffer...