kioslave/mbox
#include <readmbox.h>
Public Member Functions | |
ReadMBox (const UrlInfo *info, MBoxProtocol *parent, bool onlynew=false, bool savetime=false) | |
~ReadMBox () | |
bool | atEnd () const |
QString | currentID () const |
QString | currentLine () const |
bool | inListing () const |
bool | nextLine () |
void | rewind () |
bool | searchMessage (const QString &id) |
unsigned int | skipMessage () |
Public Member Functions inherited from MBoxFile | |
MBoxFile (const UrlInfo *info, MBoxProtocol *parent) | |
~MBoxFile () | |
Additional Inherited Members | |
Protected Member Functions inherited from MBoxFile | |
bool | lock () |
void | unlock () |
Protected Attributes inherited from MBoxFile | |
const UrlInfo *const | m_info |
MBoxProtocol *const | m_mbox |
Detailed Description
This class handels reading from a mbox-file.
Definition at line 38 of file readmbox.h.
Constructor & Destructor Documentation
ReadMBox::ReadMBox | ( | const UrlInfo * | info, |
MBoxProtocol * | parent, | ||
bool | onlynew = false , |
||
bool | savetime = false |
||
) |
Constructor.
- Parameters
-
info The information of the file to read parent The instance of the parent MBoxProtocol. onlynew Only read new messages from the MBox file. savetime If true, the atime of the mbox-file is preserved (note that this touch the ctime).
Definition at line 34 of file readmbox.cpp.
ReadMBox::~ReadMBox | ( | ) |
Destructor.
Definition at line 61 of file readmbox.cpp.
Member Function Documentation
bool ReadMBox::atEnd | ( | ) | const |
Returns true if the cursor is at EOF.
- Returns
- true if and only if the cursor is at EOF.
Definition at line 149 of file readmbox.cpp.
QString ReadMBox::currentID | ( | ) | const |
This function returns the current id.
The id is the first line of an email, and is used in filenaming. The id normally starts with "From ".
- Returns
- The current ID, or QString() if no id was found yet.
Definition at line 71 of file readmbox.cpp.
QString ReadMBox::currentLine | ( | ) | const |
This functions return the current line.
- Returns
- The line last read, or QString() if there wasn't such last line
Definition at line 66 of file readmbox.cpp.
bool ReadMBox::inListing | ( | ) | const |
Return true if the message is a new message, or all messages are listed.
- Returns
- true if it must be listed
Definition at line 157 of file readmbox.cpp.
bool ReadMBox::nextLine | ( | ) |
This function reads the next line.
The next line can be read by the currentLine() function call.
- Returns
- true if succesfull, otherwise false.
Definition at line 76 of file readmbox.cpp.
void ReadMBox::rewind | ( | ) |
Sets the cursor back to the beginning of the file.
Definition at line 139 of file readmbox.cpp.
bool ReadMBox::searchMessage | ( | const QString & | id | ) |
This function search the file for a certain id.
If not found, the position is EOF.
- Parameters
-
id The id of the message to be found.
- Returns
- true if the message was found, false otherwise.
Definition at line 111 of file readmbox.cpp.
unsigned int ReadMBox::skipMessage | ( | ) |
Skips all lines which belongs to the current message.
The cursor is on the first line of a new message message at the end of this function, or at EOF if the cursor was already on the last message.
- Returns
- The number of bytes read while skipping the message.
Definition at line 124 of file readmbox.cpp.
The documentation for this class was generated from the following files:
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.