master-service-settings.h revision e2bdca8201e4aa1cd31332ffbdd4c6eef9151d5e
#ifndef MASTER_SERVICE_SETTINGS_H
#define MASTER_SERVICE_SETTINGS_H
#include "network.h"
struct setting_parser_info;
struct master_service;
struct master_service_settings {
const char *log_path;
const char *info_log_path;
const char *debug_log_path;
const char *log_timestamp;
const char *syslog_facility;
bool version_ignore;
bool shutdown_clients;
bool verbose_proctitle;
};
struct master_service_settings_input {
const struct setting_parser_info *const *roots;
const char *config_path;
bool preserve_home;
bool never_exec;
bool use_sysexits;
bool parse_full_config;
const char *module;
const char *service;
const char *username;
const char *local_name;
};
struct master_service_settings_output {
/* if service was not given for lookup, this contains names of services
that have more specific settings */
const char *const *specific_services;
/* some settings for this service (or if service was not given,
(but this lookup didn't necessarily return any of them). */
unsigned int service_uses_local:1;
unsigned int service_uses_remote:1;
/* returned settings contain settings specific to given
unsigned int used_local:1;
unsigned int used_remote:1;
};
extern const struct setting_parser_info master_service_setting_parser_info;
const struct master_service_settings_input *input,
struct master_service_settings_output *output_r,
const char **error_r);
const struct setting_parser_info **roots,
const char **error_r);
/* destroy settings parser and clear service's set_pool, so that
master_service_settings_read*() can be called without freeing memory used
by existing settings structures. */
const struct master_service_settings *
/* Returns TRUE if -o key=value parameter was used. Setting keys in overrides
and parameter are unaliased before comparing. */
const char *key);
#endif