kioslave/mbox
readmbox.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef READMBOX_H
00020 #define READMBOX_H
00021
00022 #include "mboxfile.h"
00023
00024 #include <QTextStream>
00025
00026 class UrlInfo;
00027 class MBox;
00028
00029 class QFile;
00030 class QString;
00031 class QTextStream;
00032
00033 struct utimbuf;
00034
00038 class ReadMBox : public MBoxFile
00039 {
00040 public:
00049 ReadMBox( const UrlInfo* info, MBoxProtocol* parent, bool onlynew = false, bool savetime = false );
00050
00054 ~ReadMBox();
00055
00060 QString currentLine() const;
00061
00067 QString currentID() const;
00068
00075 bool nextLine();
00076
00083 bool searchMessage( const QString& id );
00084
00091 unsigned int skipMessage();
00092
00096 void rewind();
00097
00102 bool atEnd() const;
00103
00108 bool inListing() const;
00109 private:
00114 bool open( bool savetime );
00115
00119 void close();
00120
00121 private:
00122 QFile* m_file;
00123 QTextStream* m_stream;
00124 QString m_current_line;
00125 QString m_current_id;
00126 bool m_atend;
00127
00128 struct utimbuf* m_prev_time;
00129
00130 bool m_only_new, m_savetime;
00131
00132 bool m_status, m_prev_status, m_header;
00133 };
00134 #endif