![]() |
![]() |
![]() |
Schroot Reference Manual | ![]() |
---|
SbuildConfigSbuildConfig — config object |
enum SbuildConfigFileError; #define SBUILD_CONFIG_FILE_ERROR SbuildConfig; SbuildConfigClass; SbuildConfig* sbuild_config_new (const char *file); const GList* sbuild_config_get_chroots (SbuildConfig *config); SbuildChroot* sbuild_config_find_chroot (SbuildConfig *config, const char *name); SbuildChroot* sbuild_config_find_alias (SbuildConfig *config, const char *name); GList* sbuild_config_get_chroot_list (SbuildConfig *config); void sbuild_config_print_chroot_list (SbuildConfig *config, FILE *file); gboolean sbuild_config_validate_chroots (SbuildConfig *config, char **chroots);
This class holds the configuration details from the configuration file. Conceptually, it's an opaque container of SbuildChroot objects.
Methods are provided to query the available chroots and find specific chroots.
typedef enum { SBUILD_CONFIG_FILE_ERROR_STAT_FAIL, SBUILD_CONFIG_FILE_ERROR_OWNERSHIP, SBUILD_CONFIG_FILE_ERROR_PERMISSIONS, SBUILD_CONFIG_FILE_ERROR_NOT_REGULAR } SbuildConfigFileError;
The errors which can occur while loading a configuration file.
SBUILD_CONFIG_FILE_ERROR_STAT_FAIL |
The file could not be fstat() ed
|
SBUILD_CONFIG_FILE_ERROR_OWNERSHIP |
Ownership checks failed |
SBUILD_CONFIG_FILE_ERROR_PERMISSIONS |
Permissions checks failed |
SBUILD_CONFIG_FILE_ERROR_NOT_REGULAR |
Not a regular file |
#define SBUILD_CONFIG_FILE_ERROR sbuild_config_file_error_quark()
The error domain for sbuild configuration file errors.
typedef struct { GObjectClass parent; } SbuildConfigClass;
SbuildConfig class.
GObjectClass parent ; |
the parent class |
SbuildConfig* sbuild_config_new (const char *file);
Creates a new SbuildConfig.
file : |
the filename to open. |
Returns : | the newly created SbuildConfig. |
const GList* sbuild_config_get_chroots (SbuildConfig *config);
Get a list of available chroots.
config : |
a SbuildConfig |
Returns : | a list of available chroots, or NULL if no chroots are available. |
SbuildChroot* sbuild_config_find_chroot (SbuildConfig *config, const char *name);
Find a chroot by its name.
config : |
an SbuildConfig |
name : |
the chroot name |
Returns : | the chroot if found, otherwise NULL. |
SbuildChroot* sbuild_config_find_alias (SbuildConfig *config, const char *name);
Find a chroot by its name or an alias.
config : |
an SbuildConfig |
name : |
the chroot name |
Returns : | the chroot if found, otherwise NULL. |
GList* sbuild_config_get_chroot_list (SbuildConfig *config);
Get the names (including aliases) of all the available chroots.
config : |
an SbuildConfig |
Returns : | the list, or NULL if no chroots are available. |
void sbuild_config_print_chroot_list (SbuildConfig *config, FILE *file);
Print all the available chroots to the specified file.
config : |
an SbuildConfig |
file : |
the file to print to |
gboolean sbuild_config_validate_chroots (SbuildConfig *config, char **chroots);
Check that all the chroots specified by chroots
exist in config
.
config : |
an SbuildConfig |
chroots : |
the chroots to validate |
Returns : | TRUE if the validation succeeds, otherwise FALSE. |
<< SbuildChroot | SbuildAuth >> |