IAnjutaProject

IAnjutaProject — Interface implemented by project backend

Stability Level

Unstable, unless otherwise indicated

Synopsis

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

enum                IAnjutaProjectError;
enum                IAnjutaProjectProbe;
struct              IAnjutaProjectIface;
GQuark              ianjuta_project_error_quark         (void);
AnjutaProjectNode * ianjuta_project_add_node_after      (IAnjutaProject *obj,
                                                         AnjutaProjectNode *parent,
                                                         AnjutaProjectNode *sibling,
                                                         AnjutaProjectNodeType type,
                                                         GFile *file,
                                                         const gchar *name,
                                                         GError **err);
AnjutaProjectNode * ianjuta_project_add_node_before     (IAnjutaProject *obj,
                                                         AnjutaProjectNode *parent,
                                                         AnjutaProjectNode *sibling,
                                                         AnjutaProjectNodeType type,
                                                         GFile *file,
                                                         const gchar *name,
                                                         GError **err);
const GList *       ianjuta_project_get_node_info       (IAnjutaProject *obj,
                                                         GError **err);
AnjutaProjectNode * ianjuta_project_get_root            (IAnjutaProject *obj,
                                                         GError **err);
gboolean            ianjuta_project_is_loaded           (IAnjutaProject *obj,
                                                         GError **err);
gboolean            ianjuta_project_load_node           (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         GError **err);
gboolean            ianjuta_project_remove_node         (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         GError **err);
gboolean            ianjuta_project_remove_property     (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         const gchar *id,
                                                         const gchar *name,
                                                         GError **err);
gboolean            ianjuta_project_save_node           (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         GError **err);
AnjutaProjectProperty * ianjuta_project_set_property    (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         const gchar *id,
                                                         const gchar *name,
                                                         const gchar *value,
                                                         GError **err);

Object Hierarchy

  GEnum
   +----IAnjutaProjectError
  GEnum
   +----IAnjutaProjectProbe

Description

This is the new interface that is replacing Gnome Build.

Details

enum IAnjutaProjectError

typedef enum {
	IANJUTA_PROJECT_ERROR_SUCCESS = 0,
	IANJUTA_PROJECT_ERROR_DOESNT_EXIST,
	IANJUTA_PROJECT_ERROR_ALREADY_EXISTS,
	IANJUTA_PROJECT_ERROR_VALIDATION_FAILED,
	IANJUTA_PROJECT_ERROR_PROJECT_MALFORMED,
	IANJUTA_PROJECT_ERROR_WRONG_PARENT,
	IANJUTA_PROJECT_ERROR_NOT_SUPPORTED,
	IANJUTA_PROJECT_ERROR_GENERAL_FAILURE
} IAnjutaProjectError;

IANJUTA_PROJECT_ERROR_SUCCESS

IANJUTA_PROJECT_ERROR_DOESNT_EXIST

IANJUTA_PROJECT_ERROR_ALREADY_EXISTS

IANJUTA_PROJECT_ERROR_VALIDATION_FAILED

IANJUTA_PROJECT_ERROR_PROJECT_MALFORMED

IANJUTA_PROJECT_ERROR_WRONG_PARENT

IANJUTA_PROJECT_ERROR_NOT_SUPPORTED

IANJUTA_PROJECT_ERROR_GENERAL_FAILURE


enum IAnjutaProjectProbe

typedef enum {
	IANJUTA_PROJECT_PROBE_FILES = 10,
	IANJUTA_PROJECT_PROBE_MAKE_FILES = 100,
	IANJUTA_PROJECT_PROBE_PROJECT_FILES = 200
} IAnjutaProjectProbe;

IANJUTA_PROJECT_PROBE_FILES

IANJUTA_PROJECT_PROBE_MAKE_FILES

IANJUTA_PROJECT_PROBE_PROJECT_FILES


struct IAnjutaProjectIface

struct IAnjutaProjectIface {
	GTypeInterface g_iface;
	
	/* Signal */
	void (*file_changed) (IAnjutaProject *obj, gpointer node);
	/* Signal */
	void (*node_changed) (IAnjutaProject *obj, gpointer node,  GError *error);
	/* Signal */
	void (*node_loaded) (IAnjutaProject *obj, gpointer node,  GError *error);
	/* Signal */
	void (*node_saved) (IAnjutaProject *obj, gpointer node,  GError *error);

	AnjutaProjectNode * (*add_node_after) (IAnjutaProject *obj, AnjutaProjectNode *parent,  AnjutaProjectNode *sibling,  AnjutaProjectNodeType type,  GFile *file,  const gchar *name, GError **err);
	AnjutaProjectNode * (*add_node_before) (IAnjutaProject *obj, AnjutaProjectNode *parent,  AnjutaProjectNode *sibling,  AnjutaProjectNodeType type,  GFile *file,  const gchar *name, GError **err);
	const GList* (*get_node_info) (IAnjutaProject *obj, GError **err);
	AnjutaProjectNode * (*get_root) (IAnjutaProject *obj, GError **err);
	gboolean (*is_loaded) (IAnjutaProject *obj, GError **err);
	gboolean (*load_node) (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err);
	gboolean (*remove_node) (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err);
	gboolean (*remove_property) (IAnjutaProject *obj, AnjutaProjectNode *node,  const gchar *id,  const gchar *name, GError **err);
	gboolean (*save_node) (IAnjutaProject *obj, AnjutaProjectNode *node, GError **err);
	AnjutaProjectProperty * (*set_property) (IAnjutaProject *obj, AnjutaProjectNode *node,  const gchar *id,  const gchar *name,  const gchar *value, GError **err);
};


ianjuta_project_error_quark ()

GQuark              ianjuta_project_error_quark         (void);


ianjuta_project_add_node_after ()

AnjutaProjectNode * ianjuta_project_add_node_after      (IAnjutaProject *obj,
                                                         AnjutaProjectNode *parent,
                                                         AnjutaProjectNode *sibling,
                                                         AnjutaProjectNodeType type,
                                                         GFile *file,
                                                         const gchar *name,
                                                         GError **err);

Create a new node and insert it after sibling

obj :

Self

parent :

Parent. [transfer none]

sibling :

Sibling. [allow-none][transfer none]

type :

Node type

file :

Optional file object for the node. [allow-none][transfer none]

name :

Optional name for the node. [allow-none][transfer none]

err :

Error propagation and reporting

Returns :

The new node, NULL if error. [transfer none]

ianjuta_project_add_node_before ()

AnjutaProjectNode * ianjuta_project_add_node_before     (IAnjutaProject *obj,
                                                         AnjutaProjectNode *parent,
                                                         AnjutaProjectNode *sibling,
                                                         AnjutaProjectNodeType type,
                                                         GFile *file,
                                                         const gchar *name,
                                                         GError **err);

Create a new node and insert it before sibling

obj :

Self

parent :

Parent. [transfer none]

sibling :

Sibling. [allow-none][transfer none]

type :

Node type

file :

Optional file object for the node. [allow-none][transfer none]

name :

Optional name for the node. [allow-none][transfer none]

err :

Error propagation and reporting

Returns :

The new node, NULL if error. [transfer none]

ianjuta_project_get_node_info ()

const GList *       ianjuta_project_get_node_info       (IAnjutaProject *obj,
                                                         GError **err);

Return a list of possible node;

obj :

Self

err :

Error propagation and reporting

Returns :

A list containing information on all node supported by the project. [element-type Anjuta.ProjectNodeInfo][transfer none]

ianjuta_project_get_root ()

AnjutaProjectNode * ianjuta_project_get_root            (IAnjutaProject *obj,
                                                         GError **err);

Get root_node

obj :

Self

err :

Error propagation and reporting

Returns :

The root node. [transfer none]

ianjuta_project_is_loaded ()

gboolean            ianjuta_project_is_loaded           (IAnjutaProject *obj,
                                                         GError **err);

Return TRUE if the project is loaded;

obj :

Self

err :

Error propagation and reporting

Returns :

TRUE if the project is completely loaded.

ianjuta_project_load_node ()

gboolean            ianjuta_project_load_node           (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         GError **err);

Reload a project node

obj :

Self

node :

Project node to reload. [transfer none]

err :

Error propagation and reporting

Returns :

TRUE if the node has been loaded without error

ianjuta_project_remove_node ()

gboolean            ianjuta_project_remove_node         (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         GError **err);

Remove a node

obj :

Self

node :

Node. [transfer none]

err :

Error propagation and reporting

Returns :

TRUE if the node can be removed

ianjuta_project_remove_property ()

gboolean            ianjuta_project_remove_property     (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         const gchar *id,
                                                         const gchar *name,
                                                         GError **err);

Remove a property of the node

obj :

Self

node :

Node. [transfer none]

id :

Property. [transfer none]

name :

Name for map property. [allow-none][transfer none]

err :

Error propagation and reporting

Returns :

TRUE if the node is removed

ianjuta_project_save_node ()

gboolean            ianjuta_project_save_node           (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         GError **err);

Save a project node

obj :

Self

node :

Project node to save. [transfer none]

err :

Error propagation and reporting

Returns :

TRUE if the node has been saved without error

ianjuta_project_set_property ()

AnjutaProjectProperty * ianjuta_project_set_property    (IAnjutaProject *obj,
                                                         AnjutaProjectNode *node,
                                                         const gchar *id,
                                                         const gchar *name,
                                                         const gchar *value,
                                                         GError **err);

Change a properties on node.

obj :

Self

node :

Node. [transfer none]

id :

Property. [transfer none]

name :

Name for map property. [allow-none][transfer none]

value :

Value. [transfer none]

err :

Error propagation and reporting

Returns :

The new property of NULL if the property cannot be set. [allow-none][transfer none]