• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

kioslave/mbox

  • sources
  • kde-4.14
  • kdepimlibs
  • kioslave
  • mbox
readmbox.h
1 /*
2  * This is a simple kioslave to handle mbox-files.
3  * Copyright (C) 2004 Mart Kelder (mart.kde@hccnet.nl)
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 #ifndef READMBOX_H
20 #define READMBOX_H
21 
22 #include "mboxfile.h"
23 //Added by qt3to4:
24 #include <QTextStream>
25 
26 class UrlInfo;
27 class MBox;
28 
29 class QFile;
30 class QString;
31 class QTextStream;
32 
33 struct utimbuf;
34 
38 class ReadMBox : public MBoxFile
39 {
40 public:
49  ReadMBox( const UrlInfo* info, MBoxProtocol* parent, bool onlynew = false, bool savetime = false );
50 
54  ~ReadMBox();
55 
60  QString currentLine() const;
61 
67  QString currentID() const;
68 
75  bool nextLine();
76 
83  bool searchMessage( const QString& id );
84 
91  unsigned int skipMessage();
92 
96  void rewind();
97 
102  bool atEnd() const;
103 
108  bool inListing() const;
109 private:
114  bool open( bool savetime );
115 
119  void close();
120 
121 private:
122  QFile* m_file;
123  QTextStream* m_stream;
124  QString m_current_line;
125  QString m_current_id;
126  bool m_atend;
127 
128  struct utimbuf* m_prev_time;
129 
130  bool m_only_new, m_savetime;
131 
132  bool m_status, m_prev_status, m_header;
133 };
134 #endif
ReadMBox::~ReadMBox
~ReadMBox()
Destructor.
Definition: readmbox.cpp:61
ReadMBox::currentID
QString currentID() const
This function returns the current id.
Definition: readmbox.cpp:71
MBoxProtocol
This class is the main class and implements all function which can be called through the user...
Definition: mbox.h:33
QFile
ReadMBox::currentLine
QString currentLine() const
This functions return the current line.
Definition: readmbox.cpp:66
QTextStream
ReadMBox
This class handels reading from a mbox-file.
Definition: readmbox.h:38
ReadMBox::inListing
bool inListing() const
Return true if the message is a new message, or all messages are listed.
Definition: readmbox.cpp:157
ReadMBox::nextLine
bool nextLine()
This function reads the next line.
Definition: readmbox.cpp:76
QString
ReadMBox::skipMessage
unsigned int skipMessage()
Skips all lines which belongs to the current message.
Definition: readmbox.cpp:124
ReadMBox::rewind
void rewind()
Sets the cursor back to the beginning of the file.
Definition: readmbox.cpp:139
ReadMBox::searchMessage
bool searchMessage(const QString &id)
This function search the file for a certain id.
Definition: readmbox.cpp:111
ReadMBox::ReadMBox
ReadMBox(const UrlInfo *info, MBoxProtocol *parent, bool onlynew=false, bool savetime=false)
Constructor.
Definition: readmbox.cpp:34
ReadMBox::atEnd
bool atEnd() const
Returns true if the cursor is at EOF.
Definition: readmbox.cpp:149
MBoxFile
This class can be used to lock files when implemented.
Definition: mboxfile.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kioslave/mbox

Skip menu "kioslave/mbox"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal