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

kioslave/mbox

Public Member Functions | List of all members
ReadMBox Class Reference

#include <readmbox.h>

Inheritance diagram for ReadMBox:
Inheritance graph
[legend]

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
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 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
idThe 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:
  • readmbox.h
  • readmbox.cpp
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