16 #ifndef __KMIME_PARSERS__
17 #define __KMIME_PARSERS__
19 #include <tqvaluelist.h>
20 #include <tqcstring.h>
21 #include <tqstrlist.h>
34 MultiPart( const TQCString &src, const TQCString &boundary);
38 TQValueList<TQCString> parts() { return p_arts; }
39 TQCString preamble() { return p_reamble; }
40 TQCString epilouge() { return e_pilouge; }
43 TQCString s_rc, b_oundary, p_reamble, e_pilouge;
44 TQValueList<TQCString> p_arts;
57 virtual bool parse() = 0;
58 bool isPartial() { return (p_artNr>-1 && t_otalNr>-1 && t_otalNr!=1); }
59 int partialNumber() { return p_artNr; }
60 int partialCount() { return t_otalNr; }
61 bool hasTextPart() { return (t_ext.length()>1); }
62 TQCString textPart() { return t_ext; }
63 TQStrList binaryParts() { return b_ins; }
64 TQStrList filenames() { return f_ilenames; }
65 TQStrList mimeTypes() { return m_imeTypes; }
70 TQCString s_rc, t_ext;
71 TQStrList b_ins, f_ilenames, m_imeTypes;
72 int p_artNr, t_otalNr;
83 UUEncoded( const TQCString &src, const TQCString &subject);
102 virtual bool parse();
103 TQValueList<TQByteArray> binaryParts() { return b_ins; }
106 TQValueList<TQByteArray> b_ins;
107 static bool yencMeta( TQCString& src, const TQCString& name, int* value);
Helper-class: splits a multipart-message into single parts as described in RFC 2046.
Helper-class: abstract base class of all parsers for non-mime binary data (uuencoded,...
static TQCString guessMimeType(const TQCString &fileName) try to guess the mimetype from the file-extension
Helper-class: tries to extract the data from a possibly uuencoded message.
Helper-class: tries to extract the data from a possibly yenc encoded message.
|