console stream interface
More...
#include <console.h>
|
gate_result_t | await_char (gate_char32_t *ptr_char, gate_uint32_t timeout_ms) |
| Awaits the availabilty of a character to be read from the input stream or until a timeout is reached.
|
|
gate_result_t | read_char (gate_char32_t *ptr_char) |
| Reads a single input character from the console in a given time range.
|
|
gate_result_t | write_err (char const *buffer, gate_size_t bufferlength, gate_size_t *written) |
| Writes the contents of the given buffer to the error ouput side of the stream.
|
|
gate_result_t | flush_err () |
| Flushes the error output side of the stream.
|
|
gate_result_t | get_resource (gate_int32_t resource_type, gate_uintptr_t *resource_handle) |
| Returns a resouce handle to the requested resource type (GATE_STREAM_RESOURCE_*)
|
|
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.
|
|
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.
|
|
◆ await_char()
Awaits the availabilty of a character to be read from the input stream or until a timeout is reached.
- Parameters
-
[out] | ptr_char | Pointer to UTF-32 character that is filled with retrieved input |
[in] | timeout_ms | Timeout in milliseconds to wait for and to return GATE_RESULT_TIMEOUT |
- Returns
- GATE_RESULT_* result code (OK = character ready to be read, TIMEOUT = no character available)
◆ read_char()
Reads a single input character from the console in a given time range.
- Parameters
-
[out] | ptr_char | Pointer to UTF-32 character that is filled with retrieved input |
- Returns
- GATE_RESULT_* result code
◆ write_err()
Writes the contents of the given buffer to the error ouput side of the stream.
- Parameters
-
[in] | buffer | Pointer to buffer thats content is written to error-side of console stream |
[in] | bufferlength | Length of buffer in bytes |
[out] | written | Pointer to variable the amount of bytes that could be written |
- Returns
- GATE_RESULT_* result code
◆ flush_err()
Flushes the error output side of the stream.
- Returns
- GATE_RESULT_* result code
The documentation for this interface was generated from the following file: