## IAnjutaFile

IAnjutaFile — Implemented by plugins that can open files.

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-file.h>

    #define             IANJUTA_FILE_ERROR
                        IAnjutaFile;
                        IAnjutaFileIface;
    GQuark              ianjuta_file_error_quark            (void);
    gchar*              ianjuta_file_get_uri                (IAnjutaFile *obj,
                                                             GError **err);
    void                ianjuta_file_open                   (IAnjutaFile *obj,
                                                             const gchar *uri,
                                                             GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaFile

## Prerequisites

IAnjutaFile requires GObject.

## Known Derived Interfaces

IAnjutaFile is required by IAnjutaFileSavable.

## Description

Any plugin that can open files should implemented this interface. Along with the 'File Loader::SupportedMimeTypes' property of the plugin in .plugin file, it will be used by the loader to open files of that type.

## Details

### IANJUTA_FILE_ERROR

    #define IANJUTA_FILE_ERROR ianjuta_file_error_quark()

### IAnjutaFile

    typedef struct _IAnjutaFile IAnjutaFile;

### IAnjutaFileIface

    typedef struct {
    	GTypeInterface g_iface;

    	gchar* (*get_uri) (IAnjutaFile *obj, GError **err);
    	void (*open) (IAnjutaFile *obj, const gchar *uri, GError **err);
    } IAnjutaFileIface;

### ianjuta_file_error_quark ()

    GQuark              ianjuta_file_error_quark            (void);

Returns : |

### ianjuta_file_get_uri ()

    gchar*              ianjuta_file_get_uri                (IAnjutaFile *obj,
                                                             GError **err);

Returns the URI that was opened with `ianjuta_file_open()`.

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | The last URI opened.

### ianjuta_file_open ()

    void                ianjuta_file_open                   (IAnjutaFile *obj,
                                                             const gchar *uri,
                                                             GError **err);

The implementor opens the given URI.

`obj` : | Self
`uri` : | URI to open.
`err` : | Error propagation and reporting

## See Also

IAnjutaFileSavable