Switch to unified view

a/src/query/history.h b/src/query/history.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 _HISTORY_H_INCLUDED_
17
#ifndef _HISTORY_H_INCLUDED_
18
#define _HISTORY_H_INCLUDED_
18
#define _HISTORY_H_INCLUDED_
19
/* @(#$Id: history.h,v 1.6 2006-10-02 12:33:13 dockes Exp $  (C) 2004 J.F.Dockes */
19
/* @(#$Id: history.h,v 1.7 2007-06-20 13:16:11 dockes Exp $  (C) 2004 J.F.Dockes */
20
20
21
/**
21
/**
22
 * Dynamic configuration storage
22
 * Dynamic configuration storage
23
 *
23
 *
24
 * The term "history" is a misnomer as this code is now used to save
24
 * The term "history" is a misnomer as this code is now used to save
...
...
92
 public:
92
 public:
93
    RclHistory(const string &fn, unsigned int maxsize=100)
93
    RclHistory(const string &fn, unsigned int maxsize=100)
94
    : m_mlen(maxsize), m_data(fn.c_str()) {}
94
    : m_mlen(maxsize), m_data(fn.c_str()) {}
95
    bool ok() {return m_data.getStatus() == ConfSimple::STATUS_RW;}
95
    bool ok() {return m_data.getStatus() == ConfSimple::STATUS_RW;}
96
96
97
    // Specific methods for history entries
97
    // Specific methods for history entries. These are for convenience, they 
98
    // just call regular methods with key RclHistory::docSubkey;
98
    bool enterDoc(const string fn, const string ipath);
99
    bool enterDoc(const string fn, const string ipath);
99
    list<RclDHistoryEntry> getDocHistory();
100
    list<RclDHistoryEntry> getDocHistory();
100
101
101
    // Generic methods used for string lists, designated by the subkey value
102
    // Generic methods used for string lists, designated by the subkey value
102
    bool enterString(const string sk, const string value);
103
    bool enterString(const string sk, const string value);
103
    list<string> getStringList(const string sk);
104
    list<string> getStringList(const string sk);
104
    bool eraseAll(const string& sk);
105
    bool eraseAll(const string& sk);
105
    bool truncate(const string& sk, unsigned int n);
106
    bool truncate(const string& sk, unsigned int n);
107
108
    static string docSubkey;
106
109
107
 private:
110
 private:
108
    unsigned int m_mlen;
111
    unsigned int m_mlen;
109
    ConfSimple m_data;
112
    ConfSimple m_data;
110
    bool insertNew(const string& sk, HistoryEntry &n, HistoryEntry &s);
113
    bool insertNew(const string& sk, HistoryEntry &n, HistoryEntry &s);