/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;
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, size_t len, sbyte * data);
29
30
/*
31
 * Default read method.
32
 *
33
 * Implemented in Stream.c
34
 */
35
sbyte *
36
s_stream_internal_read (SStream * self, size_t len);
37
38
#endif /* __H_STREAM_PRIVATE__ */
76 by Gustav Hartvigsson
* Started working on this thing...
39
#else /* #ifdef __H_STREAM__ */
40
#pragma message ("Trying to include file StreamPrivate.h without includeing Stream.h");
77 by Gustav Hartvigsson
* More work on SStream... Requiers Mutex suppert :-)
41
#endif /* #ifdef __H_STREAM__ */
76 by Gustav Hartvigsson
* Started working on this thing...
42