GATE
Loading...
Searching...
No Matches
gate_stream_t Interface Reference

General stream base interface. More...

#include <streams.h>

Inheritance diagram for gate_stream_t:
gate_object_t gate_memstream_t gate_resourcestream_t gate_stringstream_t gate_console_t gate_controlstream_t gate_process_stream_t

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.
 

Detailed Description

General stream base interface.

Member Function Documentation

◆ read()

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.

Parameters
[out]bufferPointer to buffer that receives read data
[in]bufferlengthCapacity of buffer in bytes
[out]returnedPointer to variable that receives the actual amount of read bytes
Returns
GATE_RESULT_* result codes

◆ peek()

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.

Parameters
[out]bufferPointer to buffer that receives peeked data
[in]bufferlengthCapacity of buffer in bytes
[out]returnedPointer to variable that receives the actual amount of peeked bytes
Returns
GATE_RESULT_* result codes

◆ write()

gate_result_t write ( char const * buffer,
gate_size_t bufferlength,
gate_size_t * written )

Writes bytes from the given buffer into the stream.

Parameters
[in]bufferPointer to buffer with data to be written to stream
[in]bufferlengthLength of buffer in bytes
[out]writtenPointer to variable that receives the actual amount of written bytes
Returns
GATE_RESULT_* result codes

◆ flush()

gate_result_t flush ( )

Instructs the stream to flush its internal buffers and make current status persistent.

Returns
GATE_RESULT_* result codes

The documentation for this interface was generated from the following file: