pazpar2
1.14.1
|
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
#include <yaz/dirent.h>
#include <yaz/xml_get.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) |
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 103 of file settings.c.
#define SETTING_WILDCARD_NO 0 |
Definition at line 102 of file settings.c.
#define SETTING_WILDCARD_YES 2 |
Definition at line 104 of file settings.c.
void expand_settings_array | ( | struct setting *** | set_ar, |
int * | num, | ||
int | offset, | ||
NMEM | nmem | ||
) |
Definition at line 336 of file settings.c.
Referenced by session_apply_setting(), and update_database_fun().
void expand_settings_array2 | ( | struct settings_array * | settings, |
int | offset, | ||
NMEM | nmem | ||
) |
Definition at line 354 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 550 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 494 of file settings.c.
References setting_dictionary::dict, conf_service::dictionary, hard_settings, and conf_service::nmem.
Referenced by init_settings().
void initialize_soft_settings | ( | struct conf_service * | service | ) |
Definition at line 505 of file settings.c.
References conf_service::id, conf_metadata::limitmap, conf_service::metadata, Metadata_setting_no, name, conf_metadata::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 161 of file settings.c.
Referenced by read_settings().
|
static |
Definition at line 541 of file settings.c.
References create_database_for_service(), setting::target, and zurl_wildcard().
Referenced by settings_read_file(), and settings_read_node().
|
static |
Definition at line 285 of file settings.c.
References fun, isdir(), and read_settings_file().
Referenced by settings_read_file().
|
static |
Definition at line 261 of file settings.c.
References fun, and settings_read_node_x().
Referenced by read_settings().
int settings_create_offset | ( | struct conf_service * | service, |
const char * | name | ||
) |
Definition at line 145 of file settings.c.
References conf_service::dictionary, name, conf_service::nmem, and settings_index_lookup().
Referenced by initialize_soft_settings(), session_apply_setting(), and update_database_fun().
|
static |
Definition at line 113 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 150 of file settings.c.
References conf_service::dictionary, name, 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 155 of file settings.c.
References setting_dictionary::dict, and conf_service::dictionary.
int settings_num | ( | struct conf_service * | service | ) |
Definition at line 107 of file settings.c.
References conf_service::dictionary, and setting_dictionary::num.
int settings_read_file | ( | struct conf_service * | service, |
const char * | path, | ||
int | pass | ||
) |
Definition at line 563 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 572 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 174 of file settings.c.
References name, setting::name, setting::next, setting::precedence, setting::target, and setting::value.
Referenced by cmd_settings(), read_settings_file(), and settings_read_node().
|
static |
Definition at line 422 of file settings.c.
References expand_settings_array(), database::id, match_zurl(), setting::name, setting::next, conf_service::nmem, database::num_settings, setting::precedence, database::settings, settings_create_offset(), setting::target, setting::value, and zurl_wildcard().
Referenced by update_databases().
|
static |
Definition at line 483 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 371 of file settings.c.
References expand_settings_array2(), setting::name, setting::next, setting::precedence, settings_array::settings, setting::target, setting::value, and zurl_wildcard().
Referenced by initialize_soft_settings().
|
static |
Definition at line 319 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 50 of file settings.c.
Referenced by initialize_hard_settings().