1 /* $Id: p2_config.h,v 1.1 2005-10-05 12:07:14 adam Exp $
2 Copyright (c) 1998-2005, Index Data.
4 This file is part of the yaz-proxy.
6 YAZ proxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 YAZ proxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with YAZ proxy; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef P2_CONFIG_INCLUDED
23 #define P2_CONFIG_INCLUDED
28 class P2_ConfigTarget {
31 std::string m_virt_address;
32 std::string m_virt_database;
33 std::string m_target_address;
34 std::string m_target_database;
39 class P2_ConfigModule {
47 P2_Config::P2_Config();
48 P2_Config::~P2_Config();
49 bool P2_Config::parse_options(int argc, char **argv);
50 P2_ConfigTarget *find_target(std::string db);
53 bool read_xml_config(const char *fname);
54 void parse_xml_element_proxy(void *xml_ptr);
55 void parse_xml_element_target(void *xml_ptr,
57 bool parse_xml_text(void *xml_ptr, std::string &val);
58 bool parse_xml_text(void *xml_ptr, bool &val);
60 std::string m_apdu_log;
61 std::string m_default_target;
62 std::string m_listen_address;
63 std::string m_log_file;
64 std::string m_optimize_flags;
65 std::string m_pid_fname;
67 std::string m_xml_fname;
70 int m_client_idletime;
74 int m_target_idletime;
76 std::list<P2_ConfigTarget *> m_target_list;
77 std::list<P2_ConfigModule *> m_modules;
87 * indent-tabs-mode: nil
89 * vim: shiftwidth=4 tabstop=8 expandtab