|
pazpar2
1.6.30
|
#include <string.h>#include <assert.h>#include <stdio.h>#include <sys/types.h>#include <yaz/dirent.h>#include <stdlib.h>#include <sys/stat.h>#include <libxml/parser.h>#include <libxml/tree.h>#include <yaz/nmem.h>#include <yaz/log.h>#include "session.h"#include "database.h"#include "settings.h"Go to the source code of this file.
Data Structures | |
| struct | setting_dictionary |
| struct | update_database_context |
Macros | |
| #define | SETTING_WILDCARD_NO 0 |
| #define | SETTING_WILDCARD_DB 1 |
| #define | SETTING_WILDCARD_YES 2 |
Functions | |
| int | settings_num (struct conf_service *service) |
| static int | settings_index_lookup (struct setting_dictionary *dictionary, const char *name, NMEM nmem) |
| int | settings_create_offset (struct conf_service *service, const char *name) |
| int | settings_lookup_offset (struct conf_service *service, const char *name) |
| char * | settings_name (struct conf_service *service, int offset) |
| void | service_apply_setting (struct conf_service *service, char *setting, char *value) |
| static int | isdir (const char *path) |
| int | settings_read_node_x (xmlNode *n, void *client_data, void(*fun)(void *client_data, struct setting *set)) |
| static int | read_settings_file (const char *path, void *client_data, void(*fun)(void *client_data, struct setting *set)) |
| static int | read_settings (const char *path, void *client_data, void(*fun)(void *client_data, struct setting *set)) |
| static int | zurl_wildcard (const char *zurl) |
| void | expand_settings_array (struct setting ***set_ar, int *num, int offset, NMEM nmem) |
| void | expand_settings_array2 (struct settings_array *settings, int offset, NMEM nmem) |
| static void | update_settings (struct setting *set, struct settings_array *settings, int offset, NMEM nmem) |
| static void | update_database_fun (void *context, struct database *db) |
| static void | update_databases (void *client_data, struct setting *set) |
| static void | initialize_hard_settings (struct conf_service *service) |
| void | initialize_soft_settings (struct conf_service *service) |
| static void | prepare_target_dictionary (void *client_data, struct setting *set) |
| void | init_settings (struct conf_service *service) |
| int | settings_read_file (struct conf_service *service, const char *path, int pass) |
| int | settings_read_node (struct conf_service *service, xmlNode *n, int pass) |
Variables | |
| static char * | hard_settings [] |
| #define SETTING_WILDCARD_DB 1 |
Definition at line 97 of file settings.c.
Referenced by zurl_wildcard().
| #define SETTING_WILDCARD_NO 0 |
Definition at line 96 of file settings.c.
Referenced by zurl_wildcard().
| #define SETTING_WILDCARD_YES 2 |
Definition at line 98 of file settings.c.
Referenced by zurl_wildcard().
| void expand_settings_array | ( | struct setting *** | set_ar, |
| int * | num, | ||
| int | offset, | ||
| NMEM | nmem | ||
| ) |
Definition at line 358 of file settings.c.
Referenced by service_apply_setting(), session_apply_setting(), and update_database_fun().
| void expand_settings_array2 | ( | struct settings_array * | settings, |
| int | offset, | ||
| NMEM | nmem | ||
| ) |
Definition at line 376 of file settings.c.
References settings_array::num_settings, and settings_array::settings.
Referenced by update_settings().
| void init_settings | ( | struct conf_service * | service | ) |
Definition at line 572 of file settings.c.
References conf_service::dictionary, initialize_hard_settings(), initialize_soft_settings(), and conf_service::nmem.
Referenced by inherit_server_settings().
|
static |
Definition at line 516 of file settings.c.
References setting_dictionary::dict, conf_service::dictionary, hard_settings, conf_service::nmem, setting_dictionary::num, and setting_dictionary::size.
Referenced by init_settings().
| void initialize_soft_settings | ( | struct conf_service * | service | ) |
Definition at line 527 of file settings.c.
References conf_service::id, conf_metadata::limitmap, conf_service::metadata, Metadata_setting_no, conf_metadata::name, name, conf_service::nmem, conf_service::num_metadata, conf_metadata::setting, conf_service::settings, settings_create_offset(), and update_settings().
Referenced by init_settings().
|
static |
Definition at line 171 of file settings.c.
Referenced by read_settings().
|
static |
Definition at line 563 of file settings.c.
References create_database_for_service(), and zurl_wildcard().
Referenced by settings_read_file(), and settings_read_node().
|
static |
Definition at line 307 of file settings.c.
References fun, isdir(), and read_settings_file().
Referenced by settings_read_file().
|
static |
Definition at line 283 of file settings.c.
References fun, and settings_read_node_x().
Referenced by read_settings().
| void service_apply_setting | ( | struct conf_service * | service, |
| char * | setting, | ||
| char * | value | ||
| ) |
Definition at line 157 of file settings.c.
References expand_settings_array(), conf_service::nmem, settings_array::num_settings, settings_array::settings, conf_service::settings, settings_create_offset(), and setting::value.
| int settings_create_offset | ( | struct conf_service * | service, |
| const char * | name | ||
| ) |
Definition at line 139 of file settings.c.
References conf_service::dictionary, conf_service::nmem, and settings_index_lookup().
Referenced by initialize_soft_settings(), service_apply_setting(), session_apply_setting(), and update_database_fun().
|
static |
Definition at line 107 of file settings.c.
References setting_dictionary::dict, name, setting_dictionary::num, and setting_dictionary::size.
Referenced by settings_create_offset(), and settings_lookup_offset().
| int settings_lookup_offset | ( | struct conf_service * | service, |
| const char * | name | ||
| ) |
Definition at line 144 of file settings.c.
References conf_service::dictionary, and settings_index_lookup().
Referenced by insert_settings_parameters(), insert_settings_values(), and match_criterion().
| char* settings_name | ( | struct conf_service * | service, |
| int | offset | ||
| ) |
Definition at line 149 of file settings.c.
References setting_dictionary::dict, and conf_service::dictionary.
| int settings_num | ( | struct conf_service * | service | ) |
Definition at line 101 of file settings.c.
| int settings_read_file | ( | struct conf_service * | service, |
| const char * | path, | ||
| int | pass | ||
| ) |
Definition at line 585 of file settings.c.
References prepare_target_dictionary(), read_settings(), and update_databases().
Referenced by inherit_server_settings().
| int settings_read_node | ( | struct conf_service * | service, |
| xmlNode * | n, | ||
| int | pass | ||
| ) |
Definition at line 594 of file settings.c.
References prepare_target_dictionary(), settings_read_node_x(), and update_databases().
| int settings_read_node_x | ( | xmlNode * | n, |
| void * | client_data, | ||
| void(*)(void *client_data, struct setting *set) | fun | ||
| ) |
Definition at line 184 of file settings.c.
References name, setting::precedence, setting::target, and setting::value.
Referenced by cmd_settings(), read_settings_file(), and settings_read_node().
|
static |
Definition at line 444 of file settings.c.
References expand_settings_array(), database::id, match_zurl(), conf_service::nmem, database::num_settings, database::settings, settings_create_offset(), and zurl_wildcard().
Referenced by update_databases().
|
static |
Definition at line 505 of file settings.c.
References predef_grep_databases(), update_database_context::service, update_database_context::set, and update_database_fun().
Referenced by settings_read_file(), and settings_read_node().
|
static |
Definition at line 393 of file settings.c.
References expand_settings_array2(), settings_array::settings, and zurl_wildcard().
Referenced by initialize_soft_settings().
|
static |
Definition at line 341 of file settings.c.
References SETTING_WILDCARD_DB, SETTING_WILDCARD_NO, and SETTING_WILDCARD_YES.
Referenced by prepare_target_dictionary(), update_database_fun(), and update_settings().
|
static |
Definition at line 49 of file settings.c.
Referenced by initialize_hard_settings().
1.8.1.2