MirageFileStream

MirageFileStream — File I/O stream object.

Synopsis

#include <mirage-file-stream.h>

struct              MirageFileStream;
struct              MirageFileStreamClass;
gboolean            mirage_file_stream_open             (MirageFileStream *self,
                                                         const gchar *filename,
                                                         gboolean writable,
                                                         GError **error);

Object Hierarchy

  GObject
   +----MirageObject
         +----MirageFileStream

Implemented Interfaces

MirageFileStream implements MirageContextual and MirageStream.

Description

MirageFileStream is a basic unit of file access abstraction used in libMirage. It implements MirageStream interface to perform I/O operations.

A MirageFileStream is found at the bottom of all filter chains used by libMirage's image parsers and writers.

Details

struct MirageFileStream

struct MirageFileStream;

All the fields in the MirageFileStream structure are private to the MirageFileStream implementation and should never be accessed directly.


struct MirageFileStreamClass

struct MirageFileStreamClass {
    MirageObjectClass parent_class;
};

The class structure for the MirageFileStream type.

MirageObjectClass parent_class;

the parent class

mirage_file_stream_open ()

gboolean            mirage_file_stream_open             (MirageFileStream *self,
                                                         const gchar *filename,
                                                         gboolean writable,
                                                         GError **error);

Opens the stream on the file pointed to by filename. If writable is FALSE, the stream is opened in read-only mode; if writable is TRUE, the stream is opened in read-write mode.

self :

a MirageFileStream

filename :

name of file on which the stream is to be opened. [in]

writable :

a boolean indicating whether stream should be opened for read/write access. [in]

error :

location to store error, or NULL. [out][allow-none]

Returns :

TRUE on success, FALSE on failure.

See Also

MirageStream, MirageFilterStream