• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

kioslave/mbox

Public Member Functions
ReadMBox Class Reference

#include <readmbox.h>

Inheritance diagram for ReadMBox:
Inheritance graph
[legend]

List of all members.

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 ()

Detailed Description

This class handels reading from a mbox-file.


Constructor & Destructor Documentation

ReadMBox::ReadMBox ( const UrlInfo *  info,
MBoxProtocol *  parent,
bool  onlynew = false,
bool  savetime = false 
)

Constructor.

Parameters:
infoThe information of the file to read
parentThe instance of the parent MBoxProtocol.
onlynewOnly read new messages from the MBox file.
savetimeIf 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 58 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 143 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 68 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 63 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 151 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 73 of file readmbox.cpp.

void ReadMBox::rewind ( )

Sets the cursor back to the beginning of the file.

Definition at line 134 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:
idThe id of the message to be found.
Returns:
true if the message was found, false otherwise.

Definition at line 110 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 121 of file readmbox.cpp.


The documentation for this class was generated from the following files:
  • readmbox.h
  • readmbox.cpp

kioslave/mbox

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal