kioslaves/mbox
readmbox.h00001
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 class UrlInfo;
00025 class MBox;
00026
00027 class QFile;
00028 class QString;
00029 class QTextStream;
00030
00031 struct utimbuf;
00032
00036 class ReadMBox : public MBoxFile
00037 {
00038 public:
00047 ReadMBox( const UrlInfo* info, MBoxProtocol* parent, bool onlynew = false, bool savetime = false );
00048
00052 ~ReadMBox();
00053
00058 QString currentLine() const;
00059
00065 QString currentID() const;
00066
00073 bool nextLine();
00074
00081 bool searchMessage( const QString& id );
00082
00089 unsigned int skipMessage();
00090
00094 void rewind();
00095
00100 bool atEnd() const;
00101
00106 bool inListing() const;
00107 private:
00112 bool open( bool savetime );
00113
00117 void close();
00118
00119 private:
00120 QFile* m_file;
00121 QTextStream* m_stream;
00122 QString* m_current_line;
00123 QString* m_current_id;
00124 bool m_atend;
00125
00126 struct utimbuf* m_prev_time;
00127
00128 bool m_only_new, m_savetime;
00129
00130 bool m_status, m_prev_status, m_header;
00131 };
00132 #endif
|