| GPS04 Reference Manual | ||||
|---|---|---|---|---|
#include <PS04-stream.h>
PS04Stream;
gboolean ps04_stream_end_of (const PS04Stream *self);
long ps04_stream_get_file_position (const PS04Stream *self);
gboolean ps04_stream_is_readable (const PS04Stream *self);
gboolean ps04_stream_is_writable (const PS04Stream *self);
void ps04_stream_read (PS04Stream *self,
gpointer buffer,
size_t size,
GError **error);
void ps04_stream_write (PS04Stream *self,
gconstpointer buffer,
size_t size,
GError **error);
gboolean ps04_stream_end_of (const PS04Stream *self);
Tests the "end of stream" condition.
self : |
A PS04Stream. |
| Returns : | TRUE if the end of the stream is reached, otherwise FALSE.
|
long ps04_stream_get_file_position (const PS04Stream *self);
Gets the current file position, like the libc ftell() function.
self : |
A PS04Stream. |
| Returns : | the byte position from the start of the stream. |
gboolean ps04_stream_is_readable (const PS04Stream *self);
self : |
|
| Returns : |
gboolean ps04_stream_is_writable (const PS04Stream *self);
self : |
|
| Returns : |
void ps04_stream_read (PS04Stream *self, gpointer buffer, size_t size, GError **error);
Reads size bytes from the stream into buffer.
self : |
A PS04Stream. |
buffer : |
The buffer to receive the data. |
size : |
No. of bytes to read. |
error : |
A placeholder for a GError, or NULL.
|
void ps04_stream_write (PS04Stream *self, gconstpointer buffer, size_t size, GError **error);
Writes size bytes of data from buffer to the stream.
self : |
A PS04Stream. |
buffer : |
Source data to be written. |
size : |
No. of bytes to be written. |
error : |
A placeholder for a GError, or NULL.
|