IAnjutaEnvironment

IAnjutaEnvironment — Implemented by plugins doing cross compilation

Stability Level

Unstable, unless otherwise indicated

Synopsis

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

enum                IAnjutaEnvironmentError;
struct              IAnjutaEnvironmentIface;
GQuark              ianjuta_environment_error_quark     (void);
gchar *             ianjuta_environment_get_real_directory
                                                        (IAnjutaEnvironment *obj,
                                                         gchar *dir,
                                                         GError **err);
gboolean            ianjuta_environment_override        (IAnjutaEnvironment *obj,
                                                         gchar **dirp,
                                                         gchar ***argvp,
                                                         gchar ***envp,
                                                         GError **err);

Object Hierarchy

  GEnum
   +----IAnjutaEnvironmentError

Description

Details

enum IAnjutaEnvironmentError

typedef enum {
	IANJUTA_ENVIRONMENT_CONFIG,
	IANJUTA_ENVIRONMENT_OTHER_ERROR
} IAnjutaEnvironmentError;

Possible build errors

IANJUTA_ENVIRONMENT_CONFIG

IANJUTA_ENVIRONMENT_OTHER_ERROR


struct IAnjutaEnvironmentIface

struct IAnjutaEnvironmentIface {
	GTypeInterface g_iface;
	

	gchar* (*get_real_directory) (IAnjutaEnvironment *obj, gchar *dir, GError **err);
	gboolean (*override) (IAnjutaEnvironment *obj, gchar **dirp,  gchar ***argvp,  gchar ***envp, GError **err);
};


ianjuta_environment_error_quark ()

GQuark              ianjuta_environment_error_quark     (void);


ianjuta_environment_get_real_directory ()

gchar *             ianjuta_environment_get_real_directory
                                                        (IAnjutaEnvironment *obj,
                                                         gchar *dir,
                                                         GError **err);

Convert a directory in the environment to a directory outside. It is useful when the environment use chroot. Take care that the input directory string is freed using g_free but and you need to free the output string when not needed.

obj :

Self

dir :

A directory path in the environment

err :

Error propagation and reporting.

Returns :

The directory path outside the environment

ianjuta_environment_override ()

gboolean            ianjuta_environment_override        (IAnjutaEnvironment *obj,
                                                         gchar **dirp,
                                                         gchar ***argvp,
                                                         gchar ***envp,
                                                         GError **err);

Override a command to work in another build environment

obj :

Self

dirp :

a pointer on the working directory

argvp :

a pointer on a NULL terminated string array containing the command name in argv[0] and all its argument

envp :

a pointer on a NULL terminated string array containing all additional environment variable used by the command

err :

Error propagation and reporting.

Returns :

FALSE if there is an error.