|
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.39 2007-11-16 14:28:52 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: rclconfig.h,v 1.40 2008-09-08 16:49:10 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 <set>
|
24 |
#include <set>
|
25 |
#include <utility>
|
25 |
#include <utility>
|
|
|
26 |
#include <map>
|
|
|
27 |
#include <set>
|
26 |
#ifndef NO_NAMESPACES
|
28 |
#ifndef NO_NAMESPACES
|
27 |
using std::list;
|
29 |
using std::list;
|
28 |
using std::string;
|
30 |
using std::string;
|
29 |
using std::vector;
|
31 |
using std::vector;
|
30 |
using std::pair;
|
32 |
using std::pair;
|
|
|
33 |
using std::set;
|
|
|
34 |
using std::map;
|
31 |
using std::set;
|
35 |
using std::set;
|
32 |
#endif
|
36 |
#endif
|
33 |
|
37 |
|
34 |
#include "conftree.h"
|
38 |
#include "conftree.h"
|
35 |
#include "smallut.h"
|
39 |
#include "smallut.h"
|
|
... |
|
... |
140 |
/** mimeconf: get list of mime types for category */
|
144 |
/** mimeconf: get list of mime types for category */
|
141 |
bool getMimeCatTypes(const string& cat, list<string>&);
|
145 |
bool getMimeCatTypes(const string& cat, list<string>&);
|
142 |
|
146 |
|
143 |
/** mimeconf: get field prefix from field name */
|
147 |
/** mimeconf: get field prefix from field name */
|
144 |
bool getFieldPrefix(const string& fldname, string &pfx);
|
148 |
bool getFieldPrefix(const string& fldname, string &pfx);
|
|
|
149 |
/** Get implied meanings for field name (ie: author->[author, from]) */
|
|
|
150 |
bool getFieldSpecialisations(const string& fld,
|
|
|
151 |
list<string>& childrens, bool top = true);
|
|
|
152 |
/** Get prefixes for specialisations of field name */
|
|
|
153 |
bool getFieldSpecialisationPrefixes(const string& fld,
|
|
|
154 |
list<string>& pfxes);
|
|
|
155 |
bool fieldIsStored(const string& fld);
|
|
|
156 |
const set<string>& getStoredFields() {return m_storedFields;}
|
145 |
|
157 |
|
146 |
/** mimeview: get/set external viewer exec string(s) for mimetype(s) */
|
158 |
/** mimeview: get/set external viewer exec string(s) for mimetype(s) */
|
147 |
string getMimeViewerDef(const string &mimetype);
|
159 |
string getMimeViewerDef(const string &mimetype);
|
148 |
bool getMimeViewerDefs(vector<pair<string, string> >&);
|
160 |
bool getMimeViewerDefs(vector<pair<string, string> >&);
|
149 |
bool setMimeViewerDef(const string& mimetype, const string& cmd);
|
161 |
bool setMimeViewerDef(const string& mimetype, const string& cmd);
|
|
... |
|
... |
179 |
string m_keydir; // Current directory used for parameter fetches.
|
191 |
string m_keydir; // Current directory used for parameter fetches.
|
180 |
list<string> m_cdirs; // directory stack for the confstacks
|
192 |
list<string> m_cdirs; // directory stack for the confstacks
|
181 |
|
193 |
|
182 |
ConfStack<ConfTree> *m_conf; // Parsed configuration files
|
194 |
ConfStack<ConfTree> *m_conf; // Parsed configuration files
|
183 |
ConfStack<ConfTree> *mimemap; // The files don't change with keydir,
|
195 |
ConfStack<ConfTree> *mimemap; // The files don't change with keydir,
|
184 |
ConfStack<ConfTree> *mimeconf; // but their content may depend on it.
|
196 |
ConfStack<ConfSimple> *mimeconf; // but their content may depend on it.
|
185 |
ConfStack<ConfTree> *mimeview; //
|
197 |
ConfStack<ConfSimple> *mimeview; //
|
|
|
198 |
ConfStack<ConfSimple> *m_fields;
|
|
|
199 |
map<string, string> m_fldtopref;
|
|
|
200 |
set<string> m_storedFields;
|
186 |
|
201 |
|
187 |
void *m_stopsuffixes;
|
202 |
void *m_stopsuffixes;
|
188 |
unsigned int m_maxsufflen;
|
203 |
unsigned int m_maxsufflen;
|
189 |
|
204 |
|
190 |
// Parameters auto-fetched on setkeydir
|
205 |
// Parameters auto-fetched on setkeydir
|
|
... |
|
... |
203 |
m_ok = false;
|
218 |
m_ok = false;
|
204 |
m_conf = 0;
|
219 |
m_conf = 0;
|
205 |
mimemap = 0;
|
220 |
mimemap = 0;
|
206 |
mimeconf = 0;
|
221 |
mimeconf = 0;
|
207 |
mimeview = 0;
|
222 |
mimeview = 0;
|
|
|
223 |
m_fields = 0;
|
208 |
m_stopsuffixes = 0;
|
224 |
m_stopsuffixes = 0;
|
209 |
m_maxsufflen = 0;
|
225 |
m_maxsufflen = 0;
|
210 |
}
|
226 |
}
|
211 |
/** Free data then zero pointers */
|
227 |
/** Free data then zero pointers */
|
212 |
void freeAll();
|
228 |
void freeAll();
|
|
|
229 |
bool readFieldsConfig(const string& errloc);
|
213 |
};
|
230 |
};
|
214 |
|
231 |
|
215 |
|
232 |
|
216 |
#endif /* _RCLCONFIG_H_INCLUDED_ */
|
233 |
#endif /* _RCLCONFIG_H_INCLUDED_ */
|