X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Fpazpar2_config.h;h=530794ba0bafff13578604fba730fc08f6de0a1b;hb=5331cb5a3f7e8f6018036d13b4bfd6e334b2dbf0;hp=e3637f8e36b9b6632582d3d570eaba0157ebcfc0;hpb=216073a7a0d2fdfc9d88c58b1a2ff83fa76d4628;p=pazpar2-moved-to-github.git diff --git a/src/pazpar2_config.h b/src/pazpar2_config.h index e3637f8..530794b 100644 --- a/src/pazpar2_config.h +++ b/src/pazpar2_config.h @@ -105,11 +105,20 @@ struct conf_service char *id; char *settings; NMEM nmem; + + /* duplicated from conf_server */ + pp2_charset_t relevance_pct; + pp2_charset_t sort_pct; + pp2_charset_t mergekey_pct; + struct database *databases; + struct conf_targetprofiles *targetprofiles; + struct conf_config *config; }; -struct conf_service * conf_service_create(int num_metadata, int num_sortkeys, - const char *service_id); +struct conf_service * conf_service_create(struct conf_config *config, + int num_metadata, int num_sortkeys, + const char *service_id); struct conf_metadata* conf_service_add_metadata(struct conf_service *service, int field_id, @@ -133,11 +142,6 @@ int conf_service_metadata_field_id(struct conf_service *service, const char * na int conf_service_sortkey_field_id(struct conf_service *service, const char * name); - -void config_read_settings(const char *path_override); - -struct conf_service *locate_service(const char *service_id); - struct conf_server { char *host; @@ -145,12 +149,12 @@ struct conf_server char *proxy_host; int proxy_port; char *myurl; - char *server_settings; + struct sockaddr_in *proxy_addr; + int listener_socket; pp2_charset_t relevance_pct; pp2_charset_t sort_pct; pp2_charset_t mergekey_pct; - struct conf_service *service; struct conf_server *next; }; @@ -163,21 +167,21 @@ struct conf_targetprofiles char *src; }; -struct conf_config -{ - NMEM nmem; - struct conf_server *servers; - struct conf_targetprofiles *targetprofiles; -}; +struct conf_config *config_create(const char *fname, int verbose); +void config_destroy(struct conf_config *config); +xsltStylesheet *conf_load_stylesheet(struct conf_config *config, + const char *fname); -#ifndef CONFIG_NOEXTERNS +void config_start_databases(struct conf_config *config); -extern struct conf_config *config; +struct conf_service *locate_service(struct conf_server *server, + const char *service_id); -#endif -int read_config(const char *fname); -xsltStylesheet *conf_load_stylesheet(const char *fname); +int config_start_listeners(struct conf_config *conf, + const char *listener_override); + +void config_stop_listeners(struct conf_config *conf); #endif