GSeekable

GSeekable

Synopsis




                    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);


Object Hierarchy


  GInterface
   +----GSeekable

Prerequisites

GSeekable requires GObject.

Known Implementations

GSeekable is implemented by GFileInputStream, GMemoryOutputStream, GFileOutputStream and GMemoryInputStream.

Description

Details

GSeekable

typedef struct _GSeekable GSeekable;


GSeekableIface

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;


g_seekable_tell ()

goffset             g_seekable_tell                     (GSeekable *seekable);

seekable :

Returns :

a goffset.

g_seekable_can_seek ()

gboolean            g_seekable_can_seek                 (GSeekable *seekable);

seekable :

Returns :

TRUE if seekable can be seeked. FALSE otherwise.

g_seekable_seek ()

gboolean            g_seekable_seek                     (GSeekable *seekable,
                                                         goffset offset,
                                                         GSeekType type,
                                                         GCancellable *cancellable,
                                                         GError **error);

seekable :

offset :

type :

cancellable :

optional GCancellable object, NULL to ignore.

error :

a GError location to store the error occuring, or NULL to ignore. Returns: TRUE, FALSE otherwise.

Returns :


g_seekable_can_truncate ()

gboolean            g_seekable_can_truncate             (GSeekable *seekable);

seekable :

Returns :


g_seekable_truncate ()

gboolean            g_seekable_truncate                 (GSeekable *seekable,
                                                         goffset offset,
                                                         GCancellable *cancellable,
                                                         GError **error);

seekable :

offset :

cancellable :

optional GCancellable object, NULL to ignore.

error :

a GError location to store the error occuring, or NULL to ignore. Returns:

Returns :