amiro-os / include / amiro / util / stringstream.h @ eef47799
History | View | Annotate | Download (721 Bytes)
1 |
#ifndef STRINGSTREAM_H_
|
---|---|
2 |
#define STRINGSTREAM_H_
|
3 |
|
4 |
#ifdef __cplusplus
|
5 |
extern "C" { |
6 |
#endif
|
7 |
|
8 |
struct BaseSequentialStreamVMT;
|
9 |
|
10 |
struct stringstream_t {
|
11 |
const struct BaseSequentialStreamVMT *vmt; |
12 |
uint8_t string[256];
|
13 |
uint8_t ins_ix; |
14 |
uint8_t out_ix; |
15 |
}; |
16 |
|
17 |
void StringStreamInit(void *instance); |
18 |
size_t StringStreamWrite(void *instance, const uint8_t *bp, size_t n); |
19 |
size_t StringStreamRead(void *instance, uint8_t *bp, size_t n);
|
20 |
msg_t StringStreamPut(void *instance, uint8_t b);
|
21 |
msg_t StringStreamGet(void *instance);
|
22 |
size_t StringStreamTellp(void *instance);
|
23 |
uint8_t *StringStreamStrGet(void *instance);
|
24 |
void StringStreamStrSet(void *instance, const char *str); |
25 |
|
26 |
#ifdef __cplusplus
|
27 |
} |
28 |
#endif
|
29 |
|
30 |
#endif /* STRINGSTREAM_H_ */ |