|
a/src/internfile/mh_mail.h |
|
b/src/internfile/mh_mail.h |
|
... |
|
... |
35 |
* Translate a mail folder file into internal documents (also works
|
35 |
* Translate a mail folder file into internal documents (also works
|
36 |
* for maildir files). This has to keep state while parsing a mail folder
|
36 |
* for maildir files). This has to keep state while parsing a mail folder
|
37 |
* file.
|
37 |
* file.
|
38 |
*/
|
38 |
*/
|
39 |
class MimeHandlerMail : public RecollFilter {
|
39 |
class MimeHandlerMail : public RecollFilter {
|
40 |
public:
|
40 |
public:
|
41 |
MimeHandlerMail(const string &mt)
|
41 |
MimeHandlerMail(const string &mt)
|
42 |
: RecollFilter(mt), m_bincdoc(0), m_fd(-1), m_stream(0), m_idx(-1)
|
42 |
: RecollFilter(mt), m_bincdoc(0), m_fd(-1), m_stream(0), m_idx(-1)
|
43 |
{}
|
43 |
{}
|
44 |
virtual ~MimeHandlerMail();
|
44 |
virtual ~MimeHandlerMail();
|
45 |
virtual bool set_document_file(const string& file_path);
|
45 |
virtual bool set_document_file(const string& file_path);
|
|
... |
|
... |
51 |
}
|
51 |
}
|
52 |
virtual bool next_document();
|
52 |
virtual bool next_document();
|
53 |
virtual bool skip_to_document(const string& ipath);
|
53 |
virtual bool skip_to_document(const string& ipath);
|
54 |
virtual void clear();
|
54 |
virtual void clear();
|
55 |
|
55 |
|
56 |
private:
|
56 |
private:
|
57 |
bool processMsg(Binc::MimePart *doc, int depth);
|
57 |
bool processMsg(Binc::MimePart *doc, int depth);
|
58 |
void walkmime(Binc::MimePart* doc, int depth);
|
58 |
void walkmime(Binc::MimePart* doc, int depth);
|
59 |
bool processAttach();
|
59 |
bool processAttach();
|
60 |
Binc::MimeDocument *m_bincdoc;
|
60 |
Binc::MimeDocument *m_bincdoc;
|
61 |
int m_fd;
|
61 |
int m_fd;
|
62 |
std::stringstream *m_stream;
|
62 |
std::stringstream *m_stream;
|
63 |
int m_idx; // starts at -1 for self, then index into
|
63 |
|
64 |
// attachments;
|
64 |
// Current index in parts. starts at -1 for self, then index into
|
|
|
65 |
// attachments
|
|
|
66 |
int m_idx;
|
|
|
67 |
// Start of actual text (after the reprinted headers. This is for
|
|
|
68 |
// generating a semi-meaningful "abstract")
|
|
|
69 |
string::size_type m_startoftext;
|
65 |
string m_subject;
|
70 |
string m_subject;
|
66 |
vector<MHMailAttach *> m_attachments;
|
71 |
vector<MHMailAttach *> m_attachments;
|
67 |
};
|
72 |
};
|
68 |
|
73 |
|
69 |
class MHMailAttach {
|
74 |
class MHMailAttach {
|