Switch to unified view

a/src/common/rclconfig.h b/src/common/rclconfig.h
...
...
14
 *   Free Software Foundation, Inc.,
14
 *   Free Software Foundation, Inc.,
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16
 */
16
 */
17
#ifndef _RCLCONFIG_H_INCLUDED_
17
#ifndef _RCLCONFIG_H_INCLUDED_
18
#define _RCLCONFIG_H_INCLUDED_
18
#define _RCLCONFIG_H_INCLUDED_
19
/* @(#$Id: rclconfig.h,v 1.36 2007-06-22 06:14:04 dockes Exp $  (C) 2004 J.F.Dockes */
19
/* @(#$Id: rclconfig.h,v 1.37 2007-10-01 06:19:21 dockes Exp $  (C) 2004 J.F.Dockes */
20
20
21
#include <list>
21
#include <list>
22
#include <string>
22
#include <string>
23
#include <vector>
23
#include <vector>
24
#include <utility>
24
#include <utility>
...
...
61
    string str;
61
    string str;
62
    m_conf->get("guesscharset", str, m_keydir);
62
    m_conf->get("guesscharset", str, m_keydir);
63
    guesscharset = stringToBool(str);
63
    guesscharset = stringToBool(str);
64
    }
64
    }
65
    string getKeyDir() const {return m_keydir;}
65
    string getKeyDir() const {return m_keydir;}
66
    /** Get all defined key directories in configuration */
67
    list<string> getKeyDirs() {return m_conf->getSubKeys();}
66
68
67
    /** Get generic configuration parameter according to current keydir */
69
    /** Get generic configuration parameter according to current keydir */
68
    bool getConfParam(const string &name, string &value) 
70
    bool getConfParam(const string &name, string &value) 
69
    {
71
    {
70
    if (m_conf == 0)
72
    if (m_conf == 0)
71
        return false;
73
        return false;
72
    return m_conf->get(name, value, m_keydir);
74
    return m_conf->get(name, value, m_keydir);
73
    }
75
    }
76
    /** Set generic configuration parameter according to current keydir */
77
    bool setConfParam(const string &name, const string &value) 
78
    {
79
  if (m_conf == 0)
80
      return false;
81
  return m_conf->set(name, value, m_keydir);
82
    }
83
    /** Remove parameter from configuration */
84
    bool eraseConfParam(const string &name)
85
    {
86
  if (m_conf == 0)
87
      return false;
88
  return m_conf->erase(name, m_keydir);
89
    } 
90
    /** Remove parameter from configuration */
91
    bool eraseKeyDir()
92
    {
93
  if (m_conf == 0)
94
      return false;
95
  return m_conf->eraseKey(m_keydir);
96
    } 
97
74
    /** Variant with autoconversion to int */
98
    /** Variant with autoconversion to int */
75
    bool getConfParam(const std::string &name, int *value);
99
    bool getConfParam(const std::string &name, int *value);
76
    /** Variant with autoconversion to bool */
100
    /** Variant with autoconversion to bool */
77
    bool getConfParam(const std::string &name, bool *value);
101
    bool getConfParam(const std::string &name, bool *value);
78
102