![]() |
![]() |
![]() |
GSF Reference Manual | ![]() |
---|---|---|---|---|
GsfOutput; GsfOutfile* gsf_output_container (GsfOutput const *output); gsf_off_t gsf_output_size (GsfOutput *output); gboolean gsf_output_close (GsfOutput *output); gsf_off_t gsf_output_tell (GsfOutput *output); gboolean gsf_output_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence); gboolean gsf_output_write (GsfOutput *output, size_t num_bytes, guint8 const *data); gboolean gsf_output_puts (GsfOutput *output, char const *line); gboolean gsf_output_printf (GsfOutput *output, char const *format, ...); gsf_off_t gsf_output_vprintf (GsfOutput *output, char const *format, va_list args); charconst * gsf_output_name (GsfOutput const *output); gboolean gsf_output_set_name_from_filename (GsfOutput *output, char const *filename); GQuark gsf_output_error_id (void); gboolean gsf_output_set_error (GsfOutput *output, gint code, char const *format, ...); GErrorconst * gsf_output_error (GsfOutput const *output); gboolean gsf_output_is_closed (GsfOutput const *output); gboolean gsf_output_wrap (GObject *wrapper, GsfOutput *wrapee); gboolean gsf_output_unwrap (GObject *wrapper, GsfOutput *wrapee);
GObject +----GsfOutput +----GsfOutfile +----GsfOutputBzip +----GsfOutputCsv +----GsfOutputGZip +----GsfOutputIconv +----GsfOutputIOChannel +----GsfOutputMemory +----GsfOutputStdio
"is-closed" gboolean : Read "name" gchararray : Read "position" gint64 : Read "size" gint64 : Read
GsfOutfile* gsf_output_container (GsfOutput const *output);
output : | |
Returns : | , but does not add a reference to output's container. Potentially NULL |
gsf_off_t gsf_output_size (GsfOutput *output);
output : | |
Returns : | the size of the output, or -1 if it does not have a size. |
gboolean gsf_output_close (GsfOutput *output);
Close a stream.
output : | |
Returns : | FALSE on error |
gsf_off_t gsf_output_tell (GsfOutput *output);
output : | |
Returns : | the current position in the file |
gboolean gsf_output_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence);
output : | |
offset : | |
whence : | |
Returns : | FALSE on error. |
gboolean gsf_output_write (GsfOutput *output, size_t num_bytes, guint8 const *data);
output : | |
num_bytes : | |
data : | |
Returns : | FALSE on error. |
gboolean gsf_output_puts (GsfOutput *output, char const *line);
Like fputs, this assumes that the line already ends with a newline
output : | A GsfOutput |
line : | null terminated string to write |
Returns : | TRUE if successful, FALSE if not |
gboolean gsf_output_printf (GsfOutput *output, char const *format, ...);
output : | A GsfOutput |
format : | The printf-style format string |
... : | the arguments for format |
Returns : | TRUE if successful, FALSE if not |
gsf_off_t gsf_output_vprintf (GsfOutput *output, char const *format, va_list args);
output : | A GsfOutput |
format : | The printf-style format string |
args : | the arguments for format |
Returns : | number of bytes printed, a negative value if not successful |
charconst * gsf_output_name (GsfOutput const *output);
output : | |
Returns : | output's name in utf8 form, DO NOT FREE THIS STRING |
gboolean gsf_output_set_name_from_filename (GsfOutput *output, char const *filename);
output : | the output stream |
filename : | the (fs-sys encoded) filename |
Returns : | TRUE if the assignment was ok. |
gboolean gsf_output_set_error (GsfOutput *output, gint code, char const *format, ...);
output : | |
code : | |
format : | |
... : | |
Returns : | Always returns FALSE to facilitate its use. |
GErrorconst * gsf_output_error (GsfOutput const *output);
output : | |
Returns : | the last error logged on the output, or NULL. |
gboolean gsf_output_is_closed (GsfOutput const *output);
output : | |
Returns : | TRUE if output has already been closed. |
gboolean gsf_output_wrap (GObject *wrapper, GsfOutput *wrapee);
wrapper : | |
wrapee : | |
Returns : | TRUE if the wrapping succeeded. |
gboolean gsf_output_unwrap (GObject *wrapper, GsfOutput *wrapee);
wrapper : | |
wrapee : | |
Returns : | TRUE if the unwrapping succeeded. |