Main Page | Compound List | File List | Compound Members | File Members

MailBody.h

Go to the documentation of this file.
00001 
00002 #ifndef MAILBODY_H
00003 #define MAILBODY_H
00004 
00040 #include "SpamParameters.h"
00041 #include "Logger.h"
00042 #include "MailFilter.h"
00043 #include "HeaderInfo.h"
00044 #include "SpamUtil.h"
00045 
00051 class MailBody
00052 {
00053  private:
00054   MailBody(const MailBody &rhs);
00055   SpamParameters &mParams;
00056   HeaderInfo &mHeadInfo;
00057   Logger log;
00058 
00059  private:
00060   typedef enum { BAD_VALUE, EndOfFile, LINE, BOUNDARY } lineType;
00061 
00062  private:
00063   lineType getLine(char *buf, 
00064                    const size_t bufSize, 
00065                    FILE *fp, 
00066                    const char *boundary);
00067   lineType getHtmlLine(char *buf,
00068                        const size_t bufSize, 
00069                        FILE *fp, 
00070                        const char *boundary);
00071   void mailBodyMsg( MailFilter::classification klass,
00072                     const char *foundStr,
00073                     const char *funcName );
00074   lineType findSection( const char *boundary, FILE *fp );
00075   SpamUtil::contentType classifyMailSection(FILE *fp);
00076   MailFilter::classification processBySection(const char *boundary, FILE *fp);
00077   MailFilter::classification processTextBody( FILE *fp );
00078 
00079  public:
00080   MailBody( SpamParameters &param, HeaderInfo &headInfo );
00081   MailFilter::classification checkBody(const char *boundary, FILE *fp);
00082 };
00083 
00084 #endif

Generated on Sat Mar 27 13:07:38 2004 for Mail Filter by doxygen 1.3.3