Switch to unified view

a/src/internfile/mh_mail.h b/src/internfile/mh_mail.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 _MAIL_H_INCLUDED_
17
#ifndef _MAIL_H_INCLUDED_
18
#define _MAIL_H_INCLUDED_
18
#define _MAIL_H_INCLUDED_
19
/* @(#$Id: mh_mail.h,v 1.8 2006-09-19 14:30:39 dockes Exp $  (C) 2004 J.F.Dockes */
19
/* @(#$Id: mh_mail.h,v 1.9 2006-12-15 12:40:02 dockes Exp $  (C) 2004 J.F.Dockes */
20
20
21
#include <sstream>
21
#include "mimehandler.h"
22
#include "mimehandler.h"
22
23
23
namespace Binc {
24
namespace Binc {
24
    class MimeDocument;
25
    class MimeDocument;
25
    class MimePart;
26
    class MimePart;
...
...
28
/** 
29
/** 
29
 * Translate a mail folder file into internal documents (also works
30
 * Translate a mail folder file into internal documents (also works
30
 * for maildir files). This has to keep state while parsing a mail folder
31
 * for maildir files). This has to keep state while parsing a mail folder
31
 * file. 
32
 * file. 
32
 */
33
 */
33
class MimeHandlerMail : public MimeHandler {
34
class MimeHandlerMail : public RecollFilter {
34
 public:
35
 public:
35
    MimeHandlerMail() : m_vfp(0), m_msgnum(0), m_conf(0) {}
36
    MimeHandlerMail(const string &mt) 
36
37
  : RecollFilter(mt), m_bincdoc(0), m_fd(-1), m_stream(0) 
37
    virtual MimeHandler::Status 
38
    {}
38
  mkDoc(RclConfig *conf, const std::string &fn, 
39
        const std::string &mtype, Rcl::Doc &docout, std::string& ipath);
40
41
    virtual ~MimeHandlerMail();
39
    virtual ~MimeHandlerMail();
42
40
    virtual bool set_document_file(const string &file_path);
41
    virtual bool set_document_string(const string &data);
42
    virtual bool next_document();
43
 private:
43
 private:
44
    void      *m_vfp;    // File pointer for folder
44
    Binc::MimeDocument *m_bincdoc;
45
    int        m_msgnum; // Current message number in folder. Starts at 1
45
    bool processMsg(Binc::MimePart *doc, int depth);
46
    RclConfig *m_conf;   // Keep pointer to rclconfig around
47
48
    MimeHandler::Status processmbox(const string &fn, Rcl::Doc &docout, 
49
                 string &ipath);
50
    MimeHandler::Status processMsg(Rcl::Doc &docout, Binc::MimePart& doc,
51
                 int depth);
52
    void walkmime(Rcl::Doc &docout, Binc::MimePart& doc, int depth);
46
    void walkmime(Binc::MimePart* doc, int depth);
47
    int m_fd;
48
    std::stringstream *m_stream;
53
};
49
};
54
50
55
#endif /* _MAIL_H_INCLUDED_ */
51
#endif /* _MAIL_H_INCLUDED_ */