| GIO Reference Manual | ||||
|---|---|---|---|---|
GSeekable;
GSeekableIface;
goffset g_seekable_tell (GSeekable *seekable);
gboolean g_seekable_can_seek (GSeekable *seekable);
gboolean g_seekable_seek (GSeekable *seekable,
goffset offset,
GSeekType type,
GCancellable *cancellable,
GError **error);
gboolean g_seekable_can_truncate (GSeekable *seekable);
gboolean g_seekable_truncate (GSeekable *seekable,
goffset offset,
GCancellable *cancellable,
GError **error);
GSeekable is implemented by GFileInputStream, GMemoryOutputStream, GFileOutputStream and GMemoryInputStream.
typedef struct {
GTypeInterface g_iface;
/* Virtual Table */
goffset (* tell) (GSeekable *seekable);
gboolean (* can_seek) (GSeekable *seekable);
gboolean (* seek) (GSeekable *seekable,
goffset offset,
GSeekType type,
GCancellable *cancellable,
GError **error);
gboolean (* can_truncate) (GSeekable *seekable);
gboolean (* truncate) (GSeekable *seekable,
goffset offset,
GCancellable *cancellable,
GError **error);
/* TODO: Async seek/truncate */
} GSeekableIface;
gboolean g_seekable_can_seek (GSeekable *seekable);
|
|
Returns : |
TRUE if seekable can be seeked. FALSE otherwise.
|
gboolean g_seekable_seek (GSeekable *seekable, goffset offset, GSeekType type, GCancellable *cancellable, GError **error);
|
|
|
|
|
|
|
optional GCancellable object, NULL to ignore.
|
|
a GError location to store the error occuring, or NULL to
ignore.
Returns: TRUE, FALSE otherwise.
|
Returns : |
gboolean g_seekable_can_truncate (GSeekable *seekable);
|
|
Returns : |
gboolean g_seekable_truncate (GSeekable *seekable, goffset offset, GCancellable *cancellable, GError **error);
|
|
|
|
|
optional GCancellable object, NULL to ignore.
|
|
a GError location to store the error occuring, or NULL to
ignore.
Returns:
|
Returns : |