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

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

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

    #define             IANJUTA_BUILDER_CONFIGURATION_DEBUG
    #define             IANJUTA_BUILDER_CONFIGURATION_OPTIMIZED
    #define             IANJUTA_BUILDER_CONFIGURATION_PROFILING
    #define             IANJUTA_BUILDER_ROOT_URI
    void                (*IAnjutaBuilderCallback)           (GObject *sender,
                                                             IAnjutaBuilderHandle command,
                                                             GError *err,
                                                             gpointer user_data);
    enum                IAnjutaBuilderError;
    typedef             IAnjutaBuilderHandle;
    struct              IAnjutaBuilderIface;
    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);
    GQuark              ianjuta_builder_error_quark         (void);
    const gchar *       ianjuta_builder_get_uri_configuration
                                                            (IAnjutaBuilder *obj,
                                                             const gchar *uri,
                                                             GError **err);
    IAnjutaBuilderHandle ianjuta_builder_is_built           (IAnjutaBuilder *obj,
                                                             const gchar *uri,
                                                             IAnjutaBuilderCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    GList *             ianjuta_builder_list_configuration  (IAnjutaBuilder *obj,
                                                             GError **err);

## Object Hierarchy

      GEnum
       +----IAnjutaBuilderError

## Description

## Details

### IANJUTA_BUILDER_CONFIGURATION_DEBUG

    #define IANJUTA_BUILDER_CONFIGURATION_DEBUG "Debug"

Name of debugging configutation.

### IANJUTA_BUILDER_CONFIGURATION_OPTIMIZED

    #define IANJUTA_BUILDER_CONFIGURATION_OPTIMIZED "Optimized"

Name of optimized configutation.

### IANJUTA_BUILDER_CONFIGURATION_PROFILING

    #define IANJUTA_BUILDER_CONFIGURATION_PROFILING "Profiling"

Name of profiling configutation.

### 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.

### IAnjutaBuilderCallback ()

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

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

### struct IAnjutaBuilderIface

    struct IAnjutaBuilderIface {
    	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);
    };

### 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_error_quark ()

    GQuark              ianjuta_builder_error_quark         (void);

### ianjuta_builder_get_uri_configuration ()

    const gchar *       ianjuta_builder_get_uri_configuration
                                                            (IAnjutaBuilder *obj,
                                                             const gchar *uri,
                                                             GError **err);

Get the configuration corresponding to the target uri.

`obj` : | Self
`uri` : | target uri
`err` : | Error propagation and reporting.
Returns : | The configuration name or NULL if the corresponding configuration cannot be found.

### 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

### ianjuta_builder_list_configuration ()

    GList *             ianjuta_builder_list_configuration  (IAnjutaBuilder *obj,
                                                             GError **err);

List all defined configuration. These names returned are the internal non localized names for the following predefined configuration: Debug, Profiling, Optimized. The default configuration has no name and is not returned.

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : | a list configuration name. The names are owned by the plugin, so only the list has to be free using g_list_free. [element-type utf8][transfer container]