openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
buffer.h
Go to the documentation of this file.
1 #ifndef __src_lib_base_buffer_h
2 #define __src_lib_base_buffer_h
3 
4 #include <asm/types.h>
5 #include <list>
6 
10 class eIOBuffer
11 {
12  int allocationsize;
13  struct eIOBufferData
14  {
15  uint8_t *data;
16  int len;
17  };
18  std::list<eIOBufferData> buffer;
19  void removeblock();
20  eIOBufferData &addblock();
21  int ptr;
22 public:
23  eIOBuffer(int allocationsize): allocationsize(allocationsize), ptr(0)
24  {
25  }
26  ~eIOBuffer();
27  int size() const;
28  int empty() const;
29  void clear();
30  int peek(void *dest, int len) const;
31  void skip(int len);
32  int read(void *dest, int len);
33  void write(const void *source, int len);
34  int fromfile(int fd, int len);
35  int tofile(int fd, int len);
36 
37  int searchchr(char ch) const;
38 };
39 
40 #endif
Definition: buffer.h:11
eIOBuffer(int allocationsize)
Definition: buffer.h:23
int empty() const
Definition: buffer.cpp:46
int searchchr(char ch) const
Definition: buffer.cpp:177
int size() const
Definition: buffer.cpp:37
int tofile(int fd, int len)
Definition: buffer.cpp:147
void write(const void *source, int len)
Definition: buffer.cpp:101
void skip(int len)
Definition: buffer.cpp:77
void clear()
Definition: buffer.cpp:31
~eIOBuffer()
Definition: buffer.cpp:26
int read(void *dest, int len)
Definition: buffer.cpp:93
int fromfile(int fd, int len)
Definition: buffer.cpp:118
int peek(void *dest, int len) const
Definition: buffer.cpp:51
unsigned char data[256]
Definition: hdmi_cec.h:2
dest
Definition: enigma_py_patcher.py:10
source
Definition: enigma_py_patcher.py:9