## IAnjutaProjectManager

IAnjutaProjectManager — Interface for project managers

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-project-manager.h>

    #define             IANJUTA_TYPE_PROJECT_MANAGER_CAPABILITIES
    #define             IANJUTA_TYPE_PROJECT_MANAGER_ELEMENT_TYPE
    #define             IANJUTA_TYPE_PROJECT_MANAGER_TARGET_TYPE
    #define             IANJUTA_PROJECT_MANAGER_ERROR
    #define             IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI
    #define             IANJUTA_PROJECT_MANAGER_CURRENT_URI
                        IAnjutaProjectManager;
                        IAnjutaProjectManagerIface;
    enum                IAnjutaProjectManagerCapabilities;
    enum                IAnjutaProjectManagerElementType;
    enum                IAnjutaProjectManagerTargetType;
    GType               ianjuta_project_manager_element_type_get_type
                                                            (void);
    GType               ianjuta_project_manager_target_type_get_type
                                                            (void);
    GQuark              ianjuta_project_manager_error_quark (void);
    GType               ianjuta_project_manager_get_type    (void);
    gchar*              ianjuta_project_manager_add_group   (IAnjutaProjectManager *obj,
                                                             const gchar *group_name_to_add,
                                                             const gchar *default_location_uri,
                                                             GError **err);
    gchar*              ianjuta_project_manager_add_source  (IAnjutaProjectManager *obj,
                                                             const gchar *source_uri_to_add,
                                                             const gchar *default_location_uri,
                                                             GError **err);
    GList*              ianjuta_project_manager_add_sources (IAnjutaProjectManager *obj,
                                                             GList *source_uris_to_add,
                                                             const gchar *default_location_uri,
                                                             GError **err);
    gchar*              ianjuta_project_manager_add_target  (IAnjutaProjectManager *obj,
                                                             const gchar *target_name_to_add,
                                                             const gchar *default_location_uri,
                                                             GError **err);
    IAnjutaProjectManagerCapabilities  ianjuta_project_manager_get_capabilities
                                                            (IAnjutaProjectManager *obj,
                                                             GError **err);
    GList*              ianjuta_project_manager_get_children
                                                            (IAnjutaProjectManager *obj,
                                                             const gchar *element_uri,
                                                             GError **err);
    IAnjutaProjectManagerElementType  ianjuta_project_manager_get_element_type
                                                            (IAnjutaProjectManager *obj,
                                                             const gchar *element_uri,
                                                             GError **err);
    GList*              ianjuta_project_manager_get_elements
                                                            (IAnjutaProjectManager *obj,
                                                             IAnjutaProjectManagerElementType element_type,
                                                             GError **err);
    GList*              ianjuta_project_manager_get_packages
                                                            (IAnjutaProjectManager *obj,
                                                             GError **err);
    gchar*              ianjuta_project_manager_get_parent  (IAnjutaProjectManager *obj,
                                                             const gchar *element_uri,
                                                             GError **err);
    gchar*              ianjuta_project_manager_get_selected
                                                            (IAnjutaProjectManager *obj,
                                                             GError **err);
    IAnjutaProjectManagerTargetType  ianjuta_project_manager_get_target_type
                                                            (IAnjutaProjectManager *obj,
                                                             const gchar *target_uri,
                                                             GError **err);
    GList*              ianjuta_project_manager_get_targets (IAnjutaProjectManager *obj,
                                                             IAnjutaProjectManagerTargetType target_type,
                                                             GError **err);
    gboolean            ianjuta_project_manager_is_open     (IAnjutaProjectManager *obj,
                                                             GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaProjectManager

## Prerequisites

IAnjutaProjectManager requires GObject.

## Signals

      "element-added"                                  : Run Last
      "element-removed"                                : Run Last
      "element-selected"                               : Run Last

## Description

## Details

### IANJUTA_TYPE_PROJECT_MANAGER_CAPABILITIES

    #define IANJUTA_TYPE_PROJECT_MANAGER_CAPABILITIES (ianjuta_project_manager_capabilities_get_type())

### IANJUTA_TYPE_PROJECT_MANAGER_ELEMENT_TYPE

    #define IANJUTA_TYPE_PROJECT_MANAGER_ELEMENT_TYPE (ianjuta_project_manager_element_type_get_type())

### IANJUTA_TYPE_PROJECT_MANAGER_TARGET_TYPE

    #define IANJUTA_TYPE_PROJECT_MANAGER_TARGET_TYPE (ianjuta_project_manager_target_type_get_type())

### IANJUTA_PROJECT_MANAGER_ERROR

    #define IANJUTA_PROJECT_MANAGER_ERROR ianjuta_project_manager_error_quark()

### IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI

    #define	IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI	"project_root_uri"

Anjuta shell value set by project manager to the project root uri.

### IANJUTA_PROJECT_MANAGER_CURRENT_URI

    #define	IANJUTA_PROJECT_MANAGER_CURRENT_URI	"project_manager_current_uri"

Anjuta shell value set by project manager to the current uri.

### IAnjutaProjectManager

    typedef struct _IAnjutaProjectManager IAnjutaProjectManager;

### IAnjutaProjectManagerIface

    typedef struct {
    	GTypeInterface g_iface;

    	/* Signal */
    	void (*element_added) (IAnjutaProjectManager *obj, const gchar *element_uri);
    	/* Signal */
    	void (*element_removed) (IAnjutaProjectManager *obj, const gchar *element_uri);
    	/* Signal */
    	void (*element_selected) (IAnjutaProjectManager *obj, const gchar *element_uri);

    	gchar* (*add_group) (IAnjutaProjectManager *obj, const gchar *group_name_to_add,  const gchar *default_location_uri, GError **err);
    	gchar* (*add_source) (IAnjutaProjectManager *obj, const gchar *source_uri_to_add,  const gchar *default_location_uri, GError **err);
    	gchar* (*add_source_quiet) (IAnjutaProjectManager *obj, const gchar *source_uri_to_add,  const gchar *target_id, GError **err);
    	GList* (*add_sources) (IAnjutaProjectManager *obj, GList* source_uris_to_add,  const gchar *default_location_uri, GError **err);
    	gchar* (*add_target) (IAnjutaProjectManager *obj, const gchar *target_name_to_add,  const gchar *default_location_uri, GError **err);
    	IAnjutaProjectManagerCapabilities (*get_capabilities) (IAnjutaProjectManager *obj, GError **err);
    	GList* (*get_children) (IAnjutaProjectManager *obj, const gchar *element_uri, GError **err);
    	IAnjutaProjectManagerElementType (*get_element_type) (IAnjutaProjectManager *obj, const gchar *element_uri, GError **err);
    	GList* (*get_elements) (IAnjutaProjectManager *obj, IAnjutaProjectManagerElementType element_type, GError **err);
    	GList* (*get_packages) (IAnjutaProjectManager *obj, GError **err);
    	gchar* (*get_parent) (IAnjutaProjectManager *obj, const gchar *element_uri, GError **err);
    	gchar* (*get_selected) (IAnjutaProjectManager *obj, GError **err);
    	gchar* (*get_selected_id) (IAnjutaProjectManager *obj, IAnjutaProjectManagerElementType element_type, GError **err);
    	IAnjutaProjectManagerTargetType (*get_target_type) (IAnjutaProjectManager *obj, const gchar *target_uri, GError **err);
    	GList* (*get_targets) (IAnjutaProjectManager *obj, IAnjutaProjectManagerTargetType target_type, GError **err);
    	gboolean (*is_open) (IAnjutaProjectManager *obj, GError **err);
    } IAnjutaProjectManagerIface;

### enum IAnjutaProjectManagerCapabilities

    typedef enum {
    	IANJUTA_PROJECT_MANAGER_CAN_ADD_NONE     = 0,
    	IANJUTA_PROJECT_MANAGER_CAN_ADD_GROUP    = 1 << 0,
    	IANJUTA_PROJECT_MANAGER_CAN_ADD_TARGET   = 1 << 1,
    	IANJUTA_PROJECT_MANAGER_CAN_ADD_SOURCE   = 1 << 2
    } IAnjutaProjectManagerCapabilities;

### enum IAnjutaProjectManagerElementType

    typedef enum {
    	IANJUTA_PROJECT_MANAGER_UNKNOWN,
    	IANJUTA_PROJECT_MANAGER_SOURCE,
    	IANJUTA_PROJECT_MANAGER_TARGET,
    	IANJUTA_PROJECT_MANAGER_GROUP
    } IAnjutaProjectManagerElementType;

### enum IAnjutaProjectManagerTargetType

    typedef enum {
    	IANJUTA_PROJECT_MANAGER_TARGET_UNKNOWN,
    	IANJUTA_PROJECT_MANAGER_TARGET_SHAREDLIB,
    	IANJUTA_PROJECT_MANAGER_TARGET_STATICLIB,
    	IANJUTA_PROJECT_MANAGER_TARGET_EXECUTABLE
    } IAnjutaProjectManagerTargetType;

### ianjuta_project_manager_element_type_get_type ()

    GType               ianjuta_project_manager_element_type_get_type
                                                            (void);

Returns : |

### ianjuta_project_manager_target_type_get_type ()

    GType               ianjuta_project_manager_target_type_get_type
                                                            (void);

Returns : |

### ianjuta_project_manager_error_quark ()

    GQuark              ianjuta_project_manager_error_quark (void);

Returns : |

### ianjuta_project_manager_get_type ()

    GType               ianjuta_project_manager_get_type    (void);

Returns : |

### ianjuta_project_manager_add_group ()

    gchar*              ianjuta_project_manager_add_group   (IAnjutaProjectManager *obj,
                                                             const gchar *group_name_to_add,
                                                             const gchar *default_location_uri,
                                                             GError **err);

fixme

`obj` : | Self
`group_name_to_add` : | fixme
`default_location_uri` : | fixme
`err` : | Error propagation and reporting.
Returns : | fixme

### ianjuta_project_manager_add_source ()

    gchar*              ianjuta_project_manager_add_source  (IAnjutaProjectManager *obj,
                                                             const gchar *source_uri_to_add,
                                                             const gchar *default_location_uri,
                                                             GError **err);

Prompt the user to add a file to the project. If the user selects multiple files only the first uri is returned.

`obj` : | Self
`source_uri_to_add` : | Target name or uri
`default_location_uri` : | Default source location or NULL if don't care
`err` : | Error propagation and reporting.
Returns : | element URIs. Must be freed when no longer required.

### ianjuta_project_manager_add_sources ()

    GList*              ianjuta_project_manager_add_sources (IAnjutaProjectManager *obj,
                                                             GList *source_uris_to_add,
                                                             const gchar *default_location_uri,
                                                             GError **err);

Prompt the user to add a file to the project. If the user selects multiple files only the first uri is returned.

`obj` : | Self
`source_uris_to_add` : | fixme
`default_location_uri` : | fixme
`err` : | Error propagation and reporting.
Returns : | element URIs. Must be freed when no longer required.

### ianjuta_project_manager_add_target ()

    gchar*              ianjuta_project_manager_add_target  (IAnjutaProjectManager *obj,
                                                             const gchar *target_name_to_add,
                                                             const gchar *default_location_uri,
                                                             GError **err);

fixme

`obj` : | Self
`target_name_to_add` : | fixme
`default_location_uri` : | fixme
`err` : | Error propagation and reporting.
Returns : |

### ianjuta_project_manager_get_capabilities ()

    IAnjutaProjectManagerCapabilities  ianjuta_project_manager_get_capabilities
                                                            (IAnjutaProjectManager *obj,
                                                             GError **err);

Returns the capabilites of project whether it can add group, target sources etc.

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : | Supported capabilites.

### ianjuta_project_manager_get_children ()

    GList*              ianjuta_project_manager_get_children
                                                            (IAnjutaProjectManager *obj,
                                                             const gchar *element_uri,
                                                             GError **err);

fixme

`obj` : | Self
`element_uri` : | fixme
`err` : | Error propagation and reporting.
Returns : | fixme

### ianjuta_project_manager_get_element_type ()

    IAnjutaProjectManagerElementType  ianjuta_project_manager_get_element_type
                                                            (IAnjutaProjectManager *obj,
                                                             const gchar *element_uri,
                                                             GError **err);

fixme

`obj` : | Self
`element_uri` : | fixme
`err` : | Error propagation and reporting.
Returns : | fixme

### ianjuta_project_manager_get_elements ()

    GList*              ianjuta_project_manager_get_elements
                                                            (IAnjutaProjectManager *obj,
                                                             IAnjutaProjectManagerElementType element_type,
                                                             GError **err);

fixme

`obj` : | Self
`element_type` : | fixme
`err` : | Error propagation and reporting.
Returns : | fixme

### ianjuta_project_manager_get_packages ()

    GList*              ianjuta_project_manager_get_packages
                                                            (IAnjutaProjectManager *obj,
                                                             GError **err);

`obj` : |
`err` : |
Returns : |

### ianjuta_project_manager_get_parent ()

    gchar*              ianjuta_project_manager_get_parent  (IAnjutaProjectManager *obj,
                                                             const gchar *element_uri,
                                                             GError **err);

fixme

`obj` : | Self
`element_uri` : | fixme
`err` : | Error propagation and reporting.
Returns : | fixme

### ianjuta_project_manager_get_selected ()

    gchar*              ianjuta_project_manager_get_selected
                                                            (IAnjutaProjectManager *obj,
                                                             GError **err);

fixme

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : |

### ianjuta_project_manager_get_target_type ()

    IAnjutaProjectManagerTargetType  ianjuta_project_manager_get_target_type
                                                            (IAnjutaProjectManager *obj,
                                                             const gchar *target_uri,
                                                             GError **err);

fixme

`obj` : | Self
`target_uri` : | fixme
`err` : | Error propagation and reporting.
Returns : | fixme

### ianjuta_project_manager_get_targets ()

    GList*              ianjuta_project_manager_get_targets (IAnjutaProjectManager *obj,
                                                             IAnjutaProjectManagerTargetType target_type,
                                                             GError **err);

fixme

`obj` : | Self
`target_type` : | fixme
`err` : | Error propagation and reporting.
Returns : | fixme

### ianjuta_project_manager_is_open ()

    gboolean            ianjuta_project_manager_is_open     (IAnjutaProjectManager *obj,
                                                             GError **err);

fixme

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : |

## Signal Details

### The `"element-added"` signal

    void                user_function                      (IAnjutaProjectManager *ianjutaprojectmanager,
                                                            gchar                 *arg1,
                                                            gpointer               user_data)                  : Run Last

`ianjutaprojectmanager` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"element-removed"` signal

    void                user_function                      (IAnjutaProjectManager *ianjutaprojectmanager,
                                                            gchar                 *arg1,
                                                            gpointer               user_data)                  : Run Last

`ianjutaprojectmanager` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"element-selected"` signal

    void                user_function                      (IAnjutaProjectManager *ianjutaprojectmanager,
                                                            gchar                 *arg1,
                                                            gpointer               user_data)                  : Run Last

`ianjutaprojectmanager` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.