Switch to unified view

a/src/internfile/mh_exec.h b/src/internfile/mh_exec.h
...
...
28
/** 
28
/** 
29
 * Turn external document into internal one by executing an external filter.
29
 * Turn external document into internal one by executing an external filter.
30
 *
30
 *
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
 *
34
 * As any RecollFilter, a MimeHandlerExec object can be reset
35
 * by calling clear(), and will stay initialised for the same mtype
36
 * (cmd, params etc.)
33
 */
37
 */
34
class MimeHandlerExec : public RecollFilter {
38
class MimeHandlerExec : public RecollFilter {
35
 public:
39
 public:
40
    ///////////////////////
36
    // Members not reset by clear().  params, cfgMtype and chgCharset
41
    // Members not reset by clear(). params, cfgMtype and chgCharset
37
    // actually define what I am.  missingHelper is a permanent error
42
    // define what I am.  missingHelper is a permanent error
38
    // (no use to try and execute over and over something that's not
43
    // (no use to try and execute over and over something that's not
39
    // here).
44
    // here).
45
46
    // Parameter list: this has been built by our creator, from config file 
47
    // data. We always add the file name at the end before actual execution
40
    list<string> params;
48
    list<string> params;
41
    // The defaults for external filters is to output html except if defined 
49
    // Filter output type. The default for ext. filters is to output html, 
42
    // otherwise in the config.
50
    // but some don't, in which case the type is defined in the config.
43
    string cfgMtype;
51
    string cfgMtype;
44
    // For ext programs which don't output html, the output charset
52
    // Output character set if the above type is not text/html. For
45
    // has to be known: ie they have a --charset utf-8 like option.
53
    // those filters, the output charset has to be known: ie set by a command
54
    // line option.
46
    string cfgCharset; 
55
    string cfgCharset; 
47
    bool missingHelper;
56
    bool missingHelper;
57
    ////////////////
48
58
49
    MimeHandlerExec(const string& mt) : RecollFilter(mt), missingHelper(false) 
59
    MimeHandlerExec(const string& mt) : RecollFilter(mt), missingHelper(false) 
50
    {}
60
    {}
51
    virtual ~MimeHandlerExec() {}
61
    virtual ~MimeHandlerExec() {}
52
    virtual bool set_document_file(const string &file_path) {
62
    virtual bool set_document_file(const string &file_path) {
...
...
64
    m_fn.erase(); 
74
    m_fn.erase(); 
65
    m_ipath.erase();
75
    m_ipath.erase();
66
    RecollFilter::clear(); 
76
    RecollFilter::clear(); 
67
    }
77
    }
68
78
69
private:
79
protected:
70
    string m_fn;
80
    string m_fn;
71
    string m_ipath;
81
    string m_ipath;
82
83
    virtual void finaldetails();
72
};
84
};
73
85
74
#endif /* _MH_EXEC_H_INCLUDED_ */
86
#endif /* _MH_EXEC_H_INCLUDED_ */