/simpletypesystem/trunk

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