## IAnjutaBuilder IAnjutaBuilder — Implemented by plugins that can build |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

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

    #define             IANJUTA_TYPE_BUILDER_ERROR
    #define             IANJUTA_BUILDER_ERROR
    #define             IANJUTA_BUILDER_ROOT_URI
                        IAnjutaBuilder;
                        IAnjutaBuilderIface;
    enum                IAnjutaBuilderError;
    typedef             IAnjutaBuilderHandle;
    void                (*IAnjutaBuilderCallback)           (GObject *sender,
                                                             IAnjutaBuilderHandle command,
                                                             GError *err,
                                                             gpointer user_data);
    GQuark              ianjuta_builder_error_quark         (void);
    GType               ianjuta_builder_get_type            (void);
    IAnjutaBuilderHandle  ianjuta_builder_build             (IAnjutaBuilder *obj,
                                                             const gchar *uri,
                                                             IAnjutaBuilderCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    void                ianjuta_builder_cancel              (IAnjutaBuilder *obj,
                                                             IAnjutaBuilderHandle handle,
                                                             GError **err);
    IAnjutaBuilderHandle  ianjuta_builder_is_built          (IAnjutaBuilder *obj,
                                                             const gchar *uri,
                                                             IAnjutaBuilderCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaBuilder

## Prerequisites

IAnjutaBuilder requires GObject.

## Description

## Details

### IANJUTA_TYPE_BUILDER_ERROR

    #define IANJUTA_TYPE_BUILDER_ERROR (ianjuta_builder_error_get_type())

### IANJUTA_BUILDER_ERROR

    #define IANJUTA_BUILDER_ERROR ianjuta_builder_error_quark()

### IANJUTA_BUILDER_ROOT_URI

    #define	IANJUTA_BUILDER_ROOT_URI	"build_root_uri"

Build directory uri. It is the same than the project_root_uri for in source build.

### IAnjutaBuilder

    typedef struct _IAnjutaBuilder IAnjutaBuilder;

### IAnjutaBuilderIface

    typedef struct {
    	GTypeInterface g_iface;

    	IAnjutaBuilderHandle (*build) (IAnjutaBuilder *obj, const gchar *uri,  IAnjutaBuilderCallback callback,  gpointer user_data, GError **err);
    	void (*cancel) (IAnjutaBuilder *obj, IAnjutaBuilderHandle handle, GError **err);
    	const gchar* (*get_uri_configuration) (IAnjutaBuilder *obj, const gchar *uri, GError **err);
    	IAnjutaBuilderHandle (*is_built) (IAnjutaBuilder *obj, const gchar *uri,  IAnjutaBuilderCallback callback,  gpointer user_data, GError **err);
    	GList* (*list_configuration) (IAnjutaBuilder *obj, GError **err);
    } IAnjutaBuilderIface;

### enum IAnjutaBuilderError

    typedef enum {
    	IANJUTA_BUILDER_SUCCEED           =  0,
    	IANJUTA_BUILDER_FAILED,
    	IANJUTA_BUILDER_CANCELED	= 256,
    	IANJUTA_BUILDER_ABORTED,
    	IANJUTA_BUILDER_INTERRUPTED,
    	IANJUTA_BUILDER_TERMINATED,
    	IANJUTA_BUILDER_UNKNOWN_TARGET,
    	IANJUTA_BUILDER_UNKNOWN_ERROR,
    	IANJUTA_BUILDER_OTHER_ERROR
    } IAnjutaBuilderError;

Possible build errors

`IANJUTA_BUILDER_SUCCEED` | Build succeeded
`IANJUTA_BUILDER_FAILED` | Build failed
`IANJUTA_BUILDER_CANCELED` | Build was canceld
`IANJUTA_BUILDER_ABORTED` | Build aborted
`IANJUTA_BUILDER_INTERRUPTED` | Build interruped
`IANJUTA_BUILDER_TERMINATED` | Build interruped
`IANJUTA_BUILDER_UNKNOWN_TARGET` | The specified target is unknown
`IANJUTA_BUILDER_UNKNOWN_ERROR` | Unknown Error
`IANJUTA_BUILDER_OTHER_ERROR` | Other Error (no unknown ;-))

### IAnjutaBuilderHandle

    typedef gpointer IAnjutaBuilderHandle;

### IAnjutaBuilderCallback ()

    void                (*IAnjutaBuilderCallback)           (GObject *sender,
                                                             IAnjutaBuilderHandle command,
                                                             GError *err,
                                                             gpointer user_data);

`sender` : |
`command` : |
`err` : |
`user_data` : |

### ianjuta_builder_error_quark ()

    GQuark              ianjuta_builder_error_quark         (void);

Returns : |

### ianjuta_builder_get_type ()

    GType               ianjuta_builder_get_type            (void);

Returns : |

### ianjuta_builder_build ()

    IAnjutaBuilderHandle  ianjuta_builder_build             (IAnjutaBuilder *obj,
                                                             const gchar *uri,
                                                             IAnjutaBuilderCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Build the specified target. When the command if finished, the callback function is called if defined.

`obj` : | Self
`uri` : | target uri
`callback` : | callback called when command is finished
`user_data` : | data passed to the callback
`err` : | Error propagation and reporting.
Returns : | non null command handle if succeed

### ianjuta_builder_cancel ()

    void                ianjuta_builder_cancel              (IAnjutaBuilder *obj,
                                                             IAnjutaBuilderHandle handle,
                                                             GError **err);

Cancel specified command. The callback function will not be called.

`obj` : | Self
`handle` : | handle of the command to cancel
`err` : | Error propagation and reporting.

### ianjuta_builder_is_built ()

    IAnjutaBuilderHandle  ianjuta_builder_is_built          (IAnjutaBuilder *obj,
                                                             const gchar *uri,
                                                             IAnjutaBuilderCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Check if the corresponding target is up to date or not. This command doesn't display anything. If this command cannot be implemented, it is possible to return always TRUE. When the command is finished, the callback function is called if defined.

`obj` : | Self
`uri` : | target uri
`callback` : | callback called when command is finished
`user_data` : | data passed to the callback
`err` : | Error propagation and reporting.
Returns : | non null command handle if succeed