kmail

#include <popaccount.h>

Public Member Functions

virtual void init (void)
virtual TDEIO::MetaData slaveConfig () const
virtual void pseudoAssign (const KMAccount *a)
virtual TQString protocol () const
virtual unsigned short int defaultPort () const
bool usePipelining (void) const
virtual void setUsePipelining (bool)
bool leaveOnServer (void) const
virtual void setLeaveOnServer (bool)
int leaveOnServerDays (void) const
virtual void setLeaveOnServerDays (int)
int leaveOnServerCount (void) const
virtual void setLeaveOnServerCount (int)
int leaveOnServerSize (void) const
virtual void setLeaveOnServerSize (int)
bool filterOnServer (void) const
virtual void setFilterOnServer (bool)
unsigned int filterOnServerCheckSize (void) const
virtual void setFilterOnServerCheckSize (unsigned int)
virtual TQString type (void) const
virtual void readConfig (TDEConfig &)
virtual void writeConfig (TDEConfig &)
virtual void processNewMail (bool _interactive)
virtual void killAllJobs (bool disconnectSlave=false)

Protected Types

enum  Stage {
  Idle , List , Uidl , Head ,
  Retr , Dele , Quit
}

Protected Slots

void slotProcessPendingMsgs ()
void slotGetNextMsg ()
void slotMsgRetrieved (TDEIO::Job *, const TQString &)
void slotData (TDEIO::Job *, const TQByteArray &)
void slotResult (TDEIO::Job *)
void slotCancel ()
void slotAbortRequested ()
void slotJobFinished ()
void slotSlaveError (TDEIO::Slave *, int, const TQString &)
void slotGetNextHdr ()

Protected Member Functions

 PopAccount (AccountManager *owner, const TQString &accountName, uint id)
void startJob ()
void connectJob ()
void processRemainingQueuedMessages ()
void saveUidList ()

Protected Attributes

bool mUsePipelining
bool mLeaveOnServer
int mLeaveOnServerDays
int mLeaveOnServerCount
int mLeaveOnServerSize
bool gotMsgs
bool mFilterOnServer
unsigned int mFilterOnServerCheckSize
TDEIO::SimpleJob * job
TQMap< TQString, int > mMsgsPendingDownload
TQPtrList< KMPopHeaders > headersOnServer
TQPtrListIterator< KMPopHeaders > headerIt
bool headers
TQMap< TQString, bool > mHeaderDeleteUids
TQMap< TQString, bool > mHeaderDownUids
TQMap< TQString, bool > mHeaderLaterUids
TQStringList idsOfMsgs
TQValueList< int > lensOfMsgs
TQMap< TQString, TQString > mUidForIdMap
TQDict< int > mUidsOfSeenMsgsDict
TQDict< int > mUidsOfNextSeenMsgsDict
TQValueVector< int > mTimeOfSeenMsgsVector
TQMap< TQString, int > mTimeOfNextSeenMsgsMap
TQDict< int > mSizeOfNextSeenMsgsDict
TQStringList idsOfMsgsToDelete
TQStringList idsOfForcedDeletes
int indexOfCurrentMsg
TQValueList< KMMessage * > msgsAwaitingProcessing
TQStringList msgIdsAwaitingProcessing
TQStringList msgUidsAwaitingProcessing
TQByteArray curMsgData
TQDataStream * curMsgStrm
int curMsgLen
Stage stage
TQTimer processMsgsTimer
int processingDelay
int numMsgs
int numBytes
int numBytesToRead
int numBytesRead
int numMsgBytesRead
bool interactive
bool mProcessing
bool mUidlFinished
int dataCounter

Friends

class ::AccountManager

Detailed Description

KMail account for pop mail account.

Definition at line 27 of file popaccount.h.

Member Enumeration Documentation

◆ Stage

enum KMail::PopAccount::Stage
protected

Definition at line 99 of file popaccount.h.

Constructor & Destructor Documentation

◆ ~PopAccount()

KMail::PopAccount::~PopAccount ( )
virtual

Definition at line 87 of file popaccount.cpp.

◆ PopAccount()

KMail::PopAccount::PopAccount ( AccountManager * owner,
const TQString & accountName,
uint id )
protected

Definition at line 56 of file popaccount.cpp.

Member Function Documentation

◆ connectJob()

void KMail::PopAccount::connectJob ( )
protected

Connect up the standard signals/slots for the TDEIO Jobs.

Definition at line 287 of file popaccount.cpp.

◆ defaultPort()

unsigned short int KMail::PopAccount::defaultPort ( ) const
virtual

Definition at line 108 of file popaccount.cpp.

◆ filterOnServer()

bool KMail::PopAccount::filterOnServer ( void ) const
inline

Shall messages be filter on the server (true) or not (false).

Definition at line 78 of file popaccount.h.

◆ filterOnServerCheckSize()

unsigned int KMail::PopAccount::filterOnServerCheckSize ( void ) const
inline

Size of messages which should be check on the pop server before download.

Definition at line 85 of file popaccount.h.

◆ init()

void KMail::PopAccount::init ( void )
virtual

Definition at line 113 of file popaccount.cpp.

◆ killAllJobs()

void KMail::PopAccount::killAllJobs ( bool disconnectSlave = false)
virtual

Definition at line 1081 of file popaccount.cpp.

◆ leaveOnServer()

bool KMail::PopAccount::leaveOnServer ( void ) const
inline

Shall messages be left on the server upon retreival (true) or deleted (false).

Definition at line 53 of file popaccount.h.

◆ leaveOnServerCount()

int KMail::PopAccount::leaveOnServerCount ( void ) const
inline

If value is positive, leave so many messages on the server.

Definition at line 65 of file popaccount.h.

◆ leaveOnServerDays()

int KMail::PopAccount::leaveOnServerDays ( void ) const
inline

If value is positive, leave mail on the server for so many days.

Definition at line 59 of file popaccount.h.

◆ leaveOnServerSize()

int KMail::PopAccount::leaveOnServerSize ( void ) const
inline

If value is positive, leave so many MBs on the server.

Definition at line 71 of file popaccount.h.

◆ processNewMail()

void KMail::PopAccount::processNewMail ( bool _interactive)
virtual

Definition at line 145 of file popaccount.cpp.

◆ processRemainingQueuedMessages()

void KMail::PopAccount::processRemainingQueuedMessages ( )
protected

Process any queued messages.

Definition at line 815 of file popaccount.cpp.

◆ protocol()

TQString KMail::PopAccount::protocol ( ) const
virtual

Definition at line 104 of file popaccount.cpp.

◆ pseudoAssign()

void KMail::PopAccount::pseudoAssign ( const KMAccount * a)
virtual

A weak assignment operator.

Definition at line 128 of file popaccount.cpp.

◆ readConfig()

void KMail::PopAccount::readConfig ( TDEConfig & config)
virtual

Definition at line 215 of file popaccount.cpp.

◆ saveUidList()

void KMail::PopAccount::saveUidList ( )
protected

Save the list of seen uids for this user/server.

Definition at line 829 of file popaccount.cpp.

◆ setFilterOnServer()

void KMail::PopAccount::setFilterOnServer ( bool b)
virtual

Definition at line 275 of file popaccount.cpp.

◆ setFilterOnServerCheckSize()

void KMail::PopAccount::setFilterOnServerCheckSize ( unsigned int aSize)
virtual

Definition at line 281 of file popaccount.cpp.

◆ setLeaveOnServer()

void KMail::PopAccount::setLeaveOnServer ( bool b)
virtual

Definition at line 251 of file popaccount.cpp.

◆ setLeaveOnServerCount()

void KMail::PopAccount::setLeaveOnServerCount ( int count)
virtual

Definition at line 263 of file popaccount.cpp.

◆ setLeaveOnServerDays()

void KMail::PopAccount::setLeaveOnServerDays ( int days)
virtual

Definition at line 257 of file popaccount.cpp.

◆ setLeaveOnServerSize()

void KMail::PopAccount::setLeaveOnServerSize ( int size)
virtual

Definition at line 269 of file popaccount.cpp.

◆ setUsePipelining()

void KMail::PopAccount::setUsePipelining ( bool b)
virtual

Definition at line 245 of file popaccount.cpp.

◆ slaveConfig()

MetaData KMail::PopAccount::slaveConfig ( ) const
virtual

Definition at line 424 of file popaccount.cpp.

◆ slotAbortRequested

void KMail::PopAccount::slotAbortRequested ( )
protectedslot

Kills the job if still stage == List.

Definition at line 352 of file popaccount.cpp.

◆ slotCancel

void KMail::PopAccount::slotCancel ( )
protectedslot

Cleans up after a user cancels the current job.

Definition at line 299 of file popaccount.cpp.

◆ slotData

void KMail::PopAccount::slotData ( TDEIO::Job * job,
const TQByteArray & data )
protectedslot

New data has arrived append it to the end of the current message.

Definition at line 877 of file popaccount.cpp.

◆ slotGetNextHdr

void KMail::PopAccount::slotGetNextHdr ( )
protectedslot

If there are more headers to be downloaded then start a new tdeio job to get the next header.

Definition at line 1071 of file popaccount.cpp.

◆ slotGetNextMsg

void KMail::PopAccount::slotGetNextMsg ( )
protectedslot

If there are more messages to be downloaded then start a new tdeio job to get the message whose id is at the head of the queue.

Definition at line 854 of file popaccount.cpp.

◆ slotJobFinished

void KMail::PopAccount::slotJobFinished ( )
protectedslot

Called when a job is finished.

Basically a finite state machine for cycling through the Idle, List, Uidl, Retr, Quit stages

Definition at line 476 of file popaccount.cpp.

◆ slotMsgRetrieved

void KMail::PopAccount::slotMsgRetrieved ( TDEIO::Job * ,
const TQString & infoMsg )
protectedslot

A messages has been retrieved successfully.

The next data belongs to the next message.

Definition at line 444 of file popaccount.cpp.

◆ slotProcessPendingMsgs

void KMail::PopAccount::slotProcessPendingMsgs ( )
protectedslot

Messages are downloaded in the background and then once every x seconds a batch of messages are processed.

Messages are processed in batches to reduce flicker (multiple refreshes of the qlistview of messages headers in a single second causes flicker) when using a fast pop server such as one on a lan.

Processing a message means applying KMAccount::processNewMsg to it and adding its UID to the list of seen UIDs

Definition at line 309 of file popaccount.cpp.

◆ slotResult

void KMail::PopAccount::slotResult ( TDEIO::Job * )
protectedslot

Finished downloading the current tdeio job, either due to an error or because the job has been canceled or because the complete message has been downloaded.

Definition at line 1015 of file popaccount.cpp.

◆ slotSlaveError

void KMail::PopAccount::slotSlaveError ( TDEIO::Slave * aSlave,
int error,
const TQString & errorMsg )
protectedslot

Slave error handling.

Definition at line 1044 of file popaccount.cpp.

◆ startJob()

void KMail::PopAccount::startJob ( )
protected

Start a TDEIO Job to get a list of messages on the pop server.

Definition at line 367 of file popaccount.cpp.

◆ type()

TQString KMail::PopAccount::type ( void ) const
virtual

Inherited methods.

Definition at line 99 of file popaccount.cpp.

◆ usePipelining()

bool KMail::PopAccount::usePipelining ( void ) const
inline

Sending of several commands at once.

Definition at line 46 of file popaccount.h.

◆ writeConfig()

void KMail::PopAccount::writeConfig ( TDEConfig & config)
virtual

Definition at line 230 of file popaccount.cpp.

◆ ::AccountManager

friend class ::AccountManager
friend

Definition at line 100 of file popaccount.h.

Member Data Documentation

◆ curMsgData

TQByteArray KMail::PopAccount::curMsgData
protected

Definition at line 160 of file popaccount.h.

◆ curMsgLen

int KMail::PopAccount::curMsgLen
protected

Definition at line 163 of file popaccount.h.

◆ curMsgStrm

TQDataStream* KMail::PopAccount::curMsgStrm
protected

Definition at line 161 of file popaccount.h.

◆ dataCounter

int KMail::PopAccount::dataCounter
protected

Definition at line 171 of file popaccount.h.

◆ gotMsgs

bool KMail::PopAccount::gotMsgs
protected

Definition at line 128 of file popaccount.h.

◆ headerIt

TQPtrListIterator<KMPopHeaders> KMail::PopAccount::headerIt
protected

Definition at line 137 of file popaccount.h.

◆ headers

bool KMail::PopAccount::headers
protected

Definition at line 138 of file popaccount.h.

◆ headersOnServer

TQPtrList<KMPopHeaders> KMail::PopAccount::headersOnServer
protected

Definition at line 136 of file popaccount.h.

◆ idsOfForcedDeletes

TQStringList KMail::PopAccount::idsOfForcedDeletes
protected

Definition at line 153 of file popaccount.h.

◆ idsOfMsgs

TQStringList KMail::PopAccount::idsOfMsgs
protected

Definition at line 144 of file popaccount.h.

◆ idsOfMsgsToDelete

TQStringList KMail::PopAccount::idsOfMsgsToDelete
protected

Definition at line 152 of file popaccount.h.

◆ indexOfCurrentMsg

int KMail::PopAccount::indexOfCurrentMsg
protected

Definition at line 154 of file popaccount.h.

◆ interactive

bool KMail::PopAccount::interactive
protected

Definition at line 168 of file popaccount.h.

◆ job

TDEIO::SimpleJob* KMail::PopAccount::job
protected

Definition at line 132 of file popaccount.h.

◆ lensOfMsgs

TQValueList<int> KMail::PopAccount::lensOfMsgs
protected

Definition at line 145 of file popaccount.h.

◆ mFilterOnServer

bool KMail::PopAccount::mFilterOnServer
protected

Definition at line 129 of file popaccount.h.

◆ mFilterOnServerCheckSize

unsigned int KMail::PopAccount::mFilterOnServerCheckSize
protected

Definition at line 130 of file popaccount.h.

◆ mHeaderDeleteUids

TQMap<TQString, bool> KMail::PopAccount::mHeaderDeleteUids
protected

Definition at line 140 of file popaccount.h.

◆ mHeaderDownUids

TQMap<TQString, bool> KMail::PopAccount::mHeaderDownUids
protected

Definition at line 141 of file popaccount.h.

◆ mHeaderLaterUids

TQMap<TQString, bool> KMail::PopAccount::mHeaderLaterUids
protected

Definition at line 142 of file popaccount.h.

◆ mLeaveOnServer

bool KMail::PopAccount::mLeaveOnServer
protected

Definition at line 124 of file popaccount.h.

◆ mLeaveOnServerCount

int KMail::PopAccount::mLeaveOnServerCount
protected

Definition at line 126 of file popaccount.h.

◆ mLeaveOnServerDays

int KMail::PopAccount::mLeaveOnServerDays
protected

Definition at line 125 of file popaccount.h.

◆ mLeaveOnServerSize

int KMail::PopAccount::mLeaveOnServerSize
protected

Definition at line 127 of file popaccount.h.

◆ mMsgsPendingDownload

TQMap<TQString, int> KMail::PopAccount::mMsgsPendingDownload
protected

Definition at line 134 of file popaccount.h.

◆ mProcessing

bool KMail::PopAccount::mProcessing
protected

Definition at line 169 of file popaccount.h.

◆ msgIdsAwaitingProcessing

TQStringList KMail::PopAccount::msgIdsAwaitingProcessing
protected

Definition at line 157 of file popaccount.h.

◆ msgsAwaitingProcessing

TQValueList<KMMessage*> KMail::PopAccount::msgsAwaitingProcessing
protected

Definition at line 156 of file popaccount.h.

◆ msgUidsAwaitingProcessing

TQStringList KMail::PopAccount::msgUidsAwaitingProcessing
protected

Definition at line 158 of file popaccount.h.

◆ mSizeOfNextSeenMsgsDict

TQDict<int> KMail::PopAccount::mSizeOfNextSeenMsgsDict
protected

Definition at line 151 of file popaccount.h.

◆ mTimeOfNextSeenMsgsMap

TQMap<TQString, int> KMail::PopAccount::mTimeOfNextSeenMsgsMap
protected

Definition at line 150 of file popaccount.h.

◆ mTimeOfSeenMsgsVector

TQValueVector<int> KMail::PopAccount::mTimeOfSeenMsgsVector
protected

Definition at line 149 of file popaccount.h.

◆ mUidForIdMap

TQMap<TQString, TQString> KMail::PopAccount::mUidForIdMap
protected

Definition at line 146 of file popaccount.h.

◆ mUidlFinished

bool KMail::PopAccount::mUidlFinished
protected

Definition at line 170 of file popaccount.h.

◆ mUidsOfNextSeenMsgsDict

TQDict<int> KMail::PopAccount::mUidsOfNextSeenMsgsDict
protected

Definition at line 148 of file popaccount.h.

◆ mUidsOfSeenMsgsDict

TQDict<int> KMail::PopAccount::mUidsOfSeenMsgsDict
protected

Definition at line 147 of file popaccount.h.

◆ mUsePipelining

bool KMail::PopAccount::mUsePipelining
protected

Definition at line 123 of file popaccount.h.

◆ numBytes

int KMail::PopAccount::numBytes
protected

Definition at line 167 of file popaccount.h.

◆ numBytesRead

int KMail::PopAccount::numBytesRead
protected

Definition at line 167 of file popaccount.h.

◆ numBytesToRead

int KMail::PopAccount::numBytesToRead
protected

Definition at line 167 of file popaccount.h.

◆ numMsgBytesRead

int KMail::PopAccount::numMsgBytesRead
protected

Definition at line 167 of file popaccount.h.

◆ numMsgs

int KMail::PopAccount::numMsgs
protected

Definition at line 167 of file popaccount.h.

◆ processingDelay

int KMail::PopAccount::processingDelay
protected

Definition at line 166 of file popaccount.h.

◆ processMsgsTimer

TQTimer KMail::PopAccount::processMsgsTimer
protected

Definition at line 165 of file popaccount.h.

◆ stage

Stage KMail::PopAccount::stage
protected

Definition at line 164 of file popaccount.h.


The documentation for this class was generated from the following files: