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.26 2006-12-11 14:50:53 dockes Exp $  (C) 2004 J.F.Dockes */
19
/* @(#$Id: rclconfig.h,v 1.27 2006-12-14 13:53:42 dockes Exp $  (C) 2004 J.F.Dockes */
20
20
21
#include <list>
21
#include <list>
22
#include <string>
22
#include <string>
23
#include <vector>
24
#include <utility>
23
#ifndef NO_NAMESPACES
25
#ifndef NO_NAMESPACES
24
using std::list;
26
using std::list;
25
using std::string;
27
using std::string;
28
using std::vector;
29
using std::pair;
26
#endif
30
#endif
27
31
28
#include "conftree.h"
32
#include "conftree.h"
29
#include "smallut.h"
33
#include "smallut.h"
30
34
...
...
101
    /** Get input filter from mimeconf for mimetype */
105
    /** Get input filter from mimeconf for mimetype */
102
    string getMimeHandlerDef(const string &mimetype);
106
    string getMimeHandlerDef(const string &mimetype);
103
107
104
    /** Get external viewer exec string from mimeconf for mimetype */
108
    /** Get external viewer exec string from mimeconf for mimetype */
105
    string getMimeViewerDef(const string &mimetype);
109
    string getMimeViewerDef(const string &mimetype);
110
    bool getMimeViewerDefs(vector<pair<string, string> >&);
111
    bool setMimeViewerDef(const string& mimetype, const string& cmd);
106
112
107
    /** Get icon name from mimeconf for mimetype */
113
    /** Get icon name from mimeconf for mimetype */
108
    string getMimeIconName(const string &mtype, string *path = 0);
114
    string getMimeIconName(const string &mtype, string *path = 0);
109
115
110
    /** Get a list of all indexable mime types defined in mimemap */
116
    /** Get a list of all indexable mime types defined in mimemap */
...
...
138
    string m_confdir; // Directory where the files are stored
144
    string m_confdir; // Directory where the files are stored
139
    string m_datadir; // Example: /usr/local/share/recoll
145
    string m_datadir; // Example: /usr/local/share/recoll
140
    string m_keydir;    // Current directory used for parameter fetches.
146
    string m_keydir;    // Current directory used for parameter fetches.
141
147
142
    ConfStack<ConfTree> *m_conf;   // Parsed configuration files
148
    ConfStack<ConfTree> *m_conf;   // Parsed configuration files
143
    ConfStack<ConfTree> *mimemap;  // The files don't change with keydir, but their
149
    ConfStack<ConfTree> *mimemap;  // The files don't change with keydir, 
144
    ConfStack<ConfTree> *mimeconf; // content may depend on it.
150
    ConfStack<ConfTree> *mimeconf; // but their content may depend on it.
151
    ConfStack<ConfTree> *mimeview; // 
145
152
146
    list<string> *stopsuffixes;
153
    list<string> *stopsuffixes;
147
154
148
    // Parameters auto-fetched on setkeydir
155
    // Parameters auto-fetched on setkeydir
149
    string defcharset;   // These are stored locally to avoid 
156
    string defcharset;   // These are stored locally to avoid 
...
...
158
    void zeroMe() {
165
    void zeroMe() {
159
    m_ok = false; 
166
    m_ok = false; 
160
    m_conf = 0; 
167
    m_conf = 0; 
161
    mimemap = 0; 
168
    mimemap = 0; 
162
    mimeconf = 0; 
169
    mimeconf = 0; 
170
  mimeview = 0; 
163
    stopsuffixes = 0;
171
    stopsuffixes = 0;
164
    }
172
    }
165
    /** Free data then zero pointers */
173
    /** Free data then zero pointers */
166
    void freeAll() {
174
    void freeAll() {
167
    delete m_conf;
175
    delete m_conf;
168
    delete mimemap;
176
    delete mimemap;
169
    delete mimeconf; 
177
    delete mimeconf; 
178
  delete mimeview; 
170
    delete stopsuffixes;
179
    delete stopsuffixes;
171
    // just in case
180
    // just in case
172
    zeroMe();
181
    zeroMe();
173
    }
182
    }
174
};
183
};