GATE
|
General stream base interface. More...
#include <streams.h>
Public Member Functions | |
gate_result_t | read (char *buffer, gate_size_t bufferlength, gate_size_t *returned) |
Read bytes from stream and stores them in the given buffer. | |
gate_result_t | peek (char *buffer, gate_size_t bufferlength, gate_size_t *returned) |
Tries to read bytes from the stream, but leaves them in its input buffer to be read again. | |
gate_result_t | write (char const *buffer, gate_size_t bufferlength, gate_size_t *written) |
Writes bytes from the given buffer into the stream. | |
gate_result_t | flush () |
Instructs the stream to flush its internal buffers and make current status persistent. | |
Public Member Functions inherited from gate_object_t | |
char const * | get_interface_name () |
Returns on object's interface path name. | |
void | release () |
Decrease object's reference counter, releases the object when count reaches zero. | |
int | retain () |
Increase object's reference counter. | |
General stream base interface.
gate_result_t read | ( | char * | buffer, |
gate_size_t | bufferlength, | ||
gate_size_t * | returned ) |
Read bytes from stream and stores them in the given buffer.
[out] | buffer | Pointer to buffer that receives read data |
[in] | bufferlength | Capacity of buffer in bytes |
[out] | returned | Pointer to variable that receives the actual amount of read bytes |
gate_result_t peek | ( | char * | buffer, |
gate_size_t | bufferlength, | ||
gate_size_t * | returned ) |
Tries to read bytes from the stream, but leaves them in its input buffer to be read again.
[out] | buffer | Pointer to buffer that receives peeked data |
[in] | bufferlength | Capacity of buffer in bytes |
[out] | returned | Pointer to variable that receives the actual amount of peeked bytes |
gate_result_t write | ( | char const * | buffer, |
gate_size_t | bufferlength, | ||
gate_size_t * | written ) |
Writes bytes from the given buffer into the stream.
[in] | buffer | Pointer to buffer with data to be written to stream |
[in] | bufferlength | Length of buffer in bytes |
[out] | written | Pointer to variable that receives the actual amount of written bytes |
gate_result_t flush | ( | ) |
Instructs the stream to flush its internal buffers and make current status persistent.