## IAnjutaStreamLoader IAnjutaStreamLoader — Loader to load streams |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-stream-loader.h>

    #define             IANJUTA_STREAM_LOADER_ERROR
                        IAnjutaStreamLoader;
                        IAnjutaStreamLoaderIface;
    GQuark              ianjuta_stream_loader_error_quark   (void);
    GObject*            ianjuta_stream_loader_load          (IAnjutaStreamLoader *obj,
                                                             FILE *stream,
                                                             gboolean readonly,
                                                             GError **err);
    gchar*              ianjuta_stream_loader_peek_interface
                                                            (IAnjutaStreamLoader *obj,
                                                             FILE *stream,
                                                             GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaStreamLoader

## Prerequisites

IAnjutaStreamLoader requires IAnjutaLoader and GObject.

## Description

StreamLoaders can deterime correct plugin to open a stream.

## Details

### IANJUTA_STREAM_LOADER_ERROR

    #define IANJUTA_STREAM_LOADER_ERROR ianjuta_stream_loader_error_quark()

### IAnjutaStreamLoader

    typedef struct _IAnjutaStreamLoader IAnjutaStreamLoader;

### IAnjutaStreamLoaderIface

    typedef struct {
    	IAnjutaLoaderIface g_iface;

    	GObject* (*load) (IAnjutaStreamLoader *obj, FILE *stream,  gboolean readonly, GError **err);
    	gchar* (*peek_interface) (IAnjutaStreamLoader *obj, FILE *stream, GError **err);
    } IAnjutaStreamLoaderIface;

### ianjuta_stream_loader_error_quark ()

    GQuark              ianjuta_stream_loader_error_quark   (void);

Returns : |

### ianjuta_stream_loader_load ()

    GObject*            ianjuta_stream_loader_load          (IAnjutaStreamLoader *obj,
                                                             FILE *stream,
                                                             gboolean readonly,
                                                             GError **err);

Determines a plugin which can open the given stream, activates it opening the stream and returns the interface of the plugin activated.

`obj` : | Self
`stream` : | Stream to load
`readonly` : | Open in readonly mode.
`err` : | Error propagation and reporting
Returns : | Plugin interface used to load the stream.

### ianjuta_stream_loader_peek_interface ()

    gchar*              ianjuta_stream_loader_peek_interface
                                                            (IAnjutaStreamLoader *obj,
                                                             FILE *stream,
                                                             GError **err);

Peeks the stream and determines the interface which can load this stream.

`obj` : | Self
`stream` : | Stream to load
`err` : | Error propagation and reporting
Returns : | Plugin interface name that can load the stream.