#include <readmbox.h>
Public Member Functions | |
ReadMBox (const UrlInfo *info, MBoxProtocol *parent, bool onlynew=false, bool savetime=false) | |
~ReadMBox () | |
TQString | currentLine () const |
TQString | currentID () const |
bool | nextLine () |
bool | searchMessage (const TQString &id) |
unsigned int | skipMessage () |
void | rewind () |
bool | atEnd () const |
bool | inListing () const |
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 36 of file readmbox.h.
Constructor & Destructor Documentation
◆ ReadMBox()
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 40 of file readmbox.cpp.
◆ ~ReadMBox()
ReadMBox::~ReadMBox | ( | ) |
Destructor.
Definition at line 66 of file readmbox.cpp.
Member Function Documentation
◆ atEnd()
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 152 of file readmbox.cpp.
◆ currentID()
TQString 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 TQString() if no id was found yet.
Definition at line 77 of file readmbox.cpp.
◆ currentLine()
TQString ReadMBox::currentLine | ( | ) | const |
This functions return the current line.
- Returns
- The line last read, or TQString() if there wasn't such last line
Definition at line 72 of file readmbox.cpp.
◆ inListing()
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 160 of file readmbox.cpp.
◆ nextLine()
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 82 of file readmbox.cpp.
◆ rewind()
void ReadMBox::rewind | ( | ) |
Sets the cursor back to the beginning of the file.
Definition at line 143 of file readmbox.cpp.
◆ searchMessage()
bool ReadMBox::searchMessage | ( | const TQString & | 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 119 of file readmbox.cpp.
◆ skipMessage()
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 130 of file readmbox.cpp.
The documentation for this class was generated from the following files: