|
a/src/common/rclconfig.h |
|
b/src/common/rclconfig.h |
1 |
#ifndef _RCLCONFIG_H_INCLUDED_
|
1 |
#ifndef _RCLCONFIG_H_INCLUDED_
|
2 |
#define _RCLCONFIG_H_INCLUDED_
|
2 |
#define _RCLCONFIG_H_INCLUDED_
|
3 |
/* @(#$Id: rclconfig.h,v 1.10 2006-01-04 11:33:44 dockes Exp $ (C) 2004 J.F.Dockes */
|
3 |
/* @(#$Id: rclconfig.h,v 1.11 2006-01-10 11:07:21 dockes Exp $ (C) 2004 J.F.Dockes */
|
4 |
|
4 |
|
5 |
#include <list>
|
5 |
#include <list>
|
6 |
|
6 |
|
7 |
#include "conftree.h"
|
7 |
#include "conftree.h"
|
8 |
#include "smallut.h"
|
8 |
#include "smallut.h"
|
|
... |
|
... |
35 |
/// Set current directory reference, and fetch automatic parameters.
|
35 |
/// Set current directory reference, and fetch automatic parameters.
|
36 |
void setKeyDir(const string &dir)
|
36 |
void setKeyDir(const string &dir)
|
37 |
{
|
37 |
{
|
38 |
keydir = dir;
|
38 |
keydir = dir;
|
39 |
conf->get("defaultcharset", defcharset, keydir);
|
39 |
conf->get("defaultcharset", defcharset, keydir);
|
40 |
conf->get("defaultlanguage", deflang, keydir);
|
|
|
41 |
string str;
|
40 |
string str;
|
42 |
conf->get("guesscharset", str, keydir);
|
41 |
conf->get("guesscharset", str, keydir);
|
43 |
guesscharset = stringToBool(str);
|
42 |
guesscharset = stringToBool(str);
|
44 |
}
|
43 |
}
|
45 |
|
44 |
|
|
... |
|
... |
61 |
* Return icon name for mime type
|
60 |
* Return icon name for mime type
|
62 |
*/
|
61 |
*/
|
63 |
string getMimeIconName(const string &mtype);
|
62 |
string getMimeIconName(const string &mtype);
|
64 |
|
63 |
|
65 |
const string &getDefCharset() {return defcharset;}
|
64 |
const string &getDefCharset() {return defcharset;}
|
66 |
const string &getDefLang() {return deflang;}
|
|
|
67 |
bool getGuessCharset() {return guesscharset;}
|
65 |
bool getGuessCharset() {return guesscharset;}
|
68 |
std::list<string> getAllMimeTypes();
|
66 |
std::list<string> getAllMimeTypes();
|
69 |
|
67 |
|
70 |
private:
|
68 |
private:
|
71 |
int m_ok;
|
69 |
int m_ok;
|
|
... |
|
... |
79 |
ConfTree *mimemap_local; //
|
77 |
ConfTree *mimemap_local; //
|
80 |
std::list<std::string> *stopsuffixes;
|
78 |
std::list<std::string> *stopsuffixes;
|
81 |
|
79 |
|
82 |
// Parameters auto-fetched on setkeydir
|
80 |
// Parameters auto-fetched on setkeydir
|
83 |
string defcharset; // These are stored locally to avoid
|
81 |
string defcharset; // These are stored locally to avoid
|
84 |
string deflang; // a config lookup each time.
|
|
|
85 |
bool guesscharset; // They are fetched initially or on setKeydir()
|
82 |
bool guesscharset; // They are fetched initially or on setKeydir()
|
86 |
};
|
83 |
};
|
87 |
|
84 |
|
88 |
std::string find_filter(RclConfig *conf, const string& cmd);
|
85 |
std::string find_filter(RclConfig *conf, const string& cmd);
|
89 |
|
86 |
|