bzr branch
http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
76
by Gustav Hartvigsson
* Started working on this thing... |
1 |
#pragma once
|
126.1.1
by Gustav Hartvigsson
* Using |
2 |
|
3 |
#ifdef __H_STREAM__
|
|
76
by Gustav Hartvigsson
* Started working on this thing... |
4 |
|
126.1.1
by Gustav Hartvigsson
* Using |
5 |
|
76
by Gustav Hartvigsson
* Started working on this thing... |
6 |
#include "Thread.h" |
98
by Gustav Hartvigsson
* Started work on SRingBuffer to be used in SStream. |
7 |
|
8 |
struct SStreamPrivate { |
|
76
by Gustav Hartvigsson
* Started working on this thing... |
9 |
sbyte * data; |
98
by Gustav Hartvigsson
* Started work on SRingBuffer to be used in SStream. |
10 |
size_t len; |
11 |
|
|
12 |
|
|
13 |
size_t buffered; /* < The number of buffered items. */ |
|
14 |
|
|
15 |
SMutex * mutex; |
|
99
by Gustav Hartvigsson
* Working on RingBuffer and Stream. |
16 |
};
|
76
by Gustav Hartvigsson
* Started working on this thing... |
17 |
|
18 |
/*
|
|
98
by Gustav Hartvigsson
* Started work on SRingBuffer to be used in SStream. |
19 |
* Initialise a stream with the default method.
|
20 |
*/
|
|
21 |
void
|
|
22 |
s_stream_internal_initialize (SStreamClass * klass); |
|
23 |
||
24 |
/*
|
|
25 |
* Default write method.
|
|
26 |
*
|
|
27 |
* Implemented in Stream.c
|
|
28 |
*/
|
|
29 |
void
|
|
30 |
s_stream_internal_write (SStream * self, |
|
99
by Gustav Hartvigsson
* Working on RingBuffer and Stream. |
31 |
size_t len, |
32 |
sbyte * data); |
|
33 |
||
98
by Gustav Hartvigsson
* Started work on SRingBuffer to be used in SStream. |
34 |
/*
|
35 |
* Default read method.
|
|
36 |
*
|
|
37 |
* Implemented in Stream.c
|
|
38 |
*/
|
|
39 |
sbyte * |
|
40 |
s_stream_internal_read (SStream * self, |
|
99
by Gustav Hartvigsson
* Working on RingBuffer and Stream. |
41 |
size_t len); |
42 |
||
98
by Gustav Hartvigsson
* Started work on SRingBuffer to be used in SStream. |
43 |
#else /* #ifdef __H_STREAM__ */ |
76
by Gustav Hartvigsson
* Started working on this thing... |
44 |
#pragma message ("Trying to include file StreamPrivate.h without includeing Stream.h");
|
77
by Gustav Hartvigsson
* More work on SStream... Requiers Mutex suppert :-) |
45 |
#endif /* #ifdef __H_STREAM__ */ |
76
by Gustav Hartvigsson
* Started working on this thing... |
46 |