|
a/src/internfile/mh_exec.h |
|
b/src/internfile/mh_exec.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 _MH_EXEC_H_INCLUDED_
|
17 |
#ifndef _MH_EXEC_H_INCLUDED_
|
18 |
#define _MH_EXEC_H_INCLUDED_
|
18 |
#define _MH_EXEC_H_INCLUDED_
|
19 |
/* @(#$Id: mh_exec.h,v 1.7 2008-10-04 14:26:59 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: mh_exec.h,v 1.8 2008-10-06 06:22:46 dockes Exp $ (C) 2004 J.F.Dockes */
|
20 |
|
20 |
|
21 |
#include <string>
|
21 |
#include <string>
|
22 |
#include <list>
|
22 |
#include <list>
|
23 |
using std::list;
|
23 |
using std::list;
|
24 |
using std::string;
|
24 |
using std::string;
|
|
... |
|
... |
31 |
* The command to execute, and its parameters, are stored in the "params"
|
31 |
* The command to execute, and its parameters, are stored in the "params"
|
32 |
* which is built in mimehandler.cpp out of data from the mimeconf file.
|
32 |
* which is built in mimehandler.cpp out of data from the mimeconf file.
|
33 |
*/
|
33 |
*/
|
34 |
class MimeHandlerExec : public RecollFilter {
|
34 |
class MimeHandlerExec : public RecollFilter {
|
35 |
public:
|
35 |
public:
|
36 |
// params, cfgMtype and chgCharset do not get reset by
|
36 |
// Members not reset by clear(). params, cfgMtype and chgCharset
|
37 |
// clear(). They define what I am
|
37 |
// actually define what I am. missingHelper is a permanent error
|
|
|
38 |
// (no use to try and execute over and over something that's not
|
|
|
39 |
// here).
|
38 |
list<string> params;
|
40 |
list<string> params;
|
39 |
// The defaults for external filters is to output html except if defined
|
41 |
// The defaults for external filters is to output html except if defined
|
40 |
// otherwise in the config.
|
42 |
// otherwise in the config.
|
41 |
string cfgMtype;
|
43 |
string cfgMtype;
|
42 |
// For ext programs which don't output html, the output charset
|
44 |
// For ext programs which don't output html, the output charset
|
43 |
// has to be known: ie they have a --charset utf-8 like option.
|
45 |
// has to be known: ie they have a --charset utf-8 like option.
|
44 |
string cfgCharset;
|
46 |
string cfgCharset;
|
|
|
47 |
bool missingHelper;
|
45 |
|
48 |
|
46 |
MimeHandlerExec(const string& mt) : RecollFilter(mt) {}
|
49 |
MimeHandlerExec(const string& mt) : RecollFilter(mt), missingHelper(false)
|
|
|
50 |
{}
|
47 |
virtual ~MimeHandlerExec() {}
|
51 |
virtual ~MimeHandlerExec() {}
|
48 |
virtual bool set_document_file(const string &file_path) {
|
52 |
virtual bool set_document_file(const string &file_path) {
|
49 |
m_fn = file_path;
|
53 |
m_fn = file_path;
|
50 |
m_havedoc = true;
|
54 |
m_havedoc = true;
|
51 |
return true;
|
55 |
return true;
|