Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EmailHandler Class Reference

#include </home/clem/local/src/opie/noncore/unsupported/mailit/emailhandler.h>

Collaboration diagram for EmailHandler:

Collaboration graph
[legend]
List of all members.

Public Slots

void messageArrived (const QString &, int id, uint size, bool complete)

Signals

void mailSent ()
void smtpError (int, const QString &Msg)
void popError (int, const QString &Msg)
void mailArrived (const Email &, bool)
void updatePopStatus (const QString &)
void updateSmtpStatus (const QString &)
void mailTransfered (int)
void mailboxSize (int)
void currentMailSize (int)
void downloadedSize (int)

Public Member Functions

 EmailHandler ()
void setAccount (MailAccount account)
MailAccountgetAccount ()
void sendMail (QList< Email > *mailList)
void getMail ()
void getMailHeaders ()
void getMailByList (MailList *mailList)
bool parse (const QString &in, const QString &lineShift, Email *mail)
bool getEnclosure (Enclosure *ePtr)
int parse64base (char *src, char *dest)
int encodeMime (Email *mail)
int encodeFile (const QString &fileName, QString *toBody)
void encode64base (char *src, QString *dest, int len)
void cancel ()

Private Attributes

MailAccount mailAccount
SmtpClientsmtpClient
PopClientpopClient
bool headers

Constructor & Destructor Documentation

EmailHandler::EmailHandler  ) 
 

Definition at line 40 of file emailhandler.cpp.

References currentMailSize(), downloadedSize(), mailSent(), mailTransfered(), messageArrived(), popClient, popError(), qDebug(), smtpClient, smtpError(), updatePopStatus(), and updateSmtpStatus().


Member Function Documentation

void EmailHandler::cancel  ) 
 

Definition at line 625 of file emailhandler.cpp.

References ErrCancel, SmtpClient::errorHandling(), PopClient::errorHandling(), popClient, and smtpClient.

Referenced by EmailClient::cancel().

void EmailHandler::currentMailSize int   )  [signal]
 

Referenced by EmailHandler().

void EmailHandler::downloadedSize int   )  [signal]
 

Referenced by EmailHandler().

void EmailHandler::encode64base char *  src,
QString dest,
int  len
 

Definition at line 564 of file emailhandler.cpp.

References QString::append(), and Opie::MM::x.

Referenced by encodeFile().

int EmailHandler::encodeFile const QString fileName,
QString toBody
 

Definition at line 522 of file emailhandler.cpp.

References QString::append(), QFile::close(), encode64base(), f, IO_ReadOnly, QFile::open(), qWarning(), QTextStream::readRawBytes(), s, and QFile::size().

Referenced by encodeMime().

int EmailHandler::encodeMime Email mail  ) 
 

Definition at line 442 of file emailhandler.cpp.

References QValueList< T >::begin(), Email::body, Email::carbonCopies, Enclosure::contentType, MailAccount::emailAddress, encodeFile(), QValueList< T >::end(), QFileInfo::fileName(), Email::files, QString::isEmpty(), mailAccount, MailAccount::name, Enclosure::originalName, Email::rawMail, Email::recipients, and Email::subject.

Referenced by sendMail().

MailAccount* EmailHandler::getAccount  )  [inline]
 

Definition at line 115 of file emailhandler.h.

References mailAccount.

Referenced by EmailClient::mailArrived().

bool EmailHandler::getEnclosure Enclosure ePtr  ) 
 

Definition at line 350 of file emailhandler.cpp.

References Enclosure::body, Enclosure::encoding, f, FALSE, IO_WriteOnly, QString::latin1(), QString::length(), Enclosure::name, QFile::open(), parse64base(), Enclosure::path, pos, qWarning(), size, t, TRUE, QString::upper(), QFile::writeBlock(), and Opie::MM::x.

Referenced by EmailClient::mailArrived().

void EmailHandler::getMail  ) 
 

Definition at line 101 of file emailhandler.cpp.

References FALSE, headers, MailAccount::lastServerMailCount, mailAccount, PopClient::newConnection(), popClient, MailAccount::popPasswd, MailAccount::popServer, MailAccount::popUserName, PopClient::removeSynchronize(), PopClient::setAccount(), PopClient::setSynchronize(), and MailAccount::synchronize.

void EmailHandler::getMailByList MailList mailList  ) 
 

Definition at line 126 of file emailhandler.cpp.

References MailList::count(), FALSE, headers, PopClient::headersOnly(), mailAccount, mailTransfered(), PopClient::newConnection(), popClient, MailAccount::popPasswd, MailAccount::popServer, MailAccount::popUserName, PopClient::setAccount(), and PopClient::setSelectedMails().

Referenced by EmailClient::download().

void EmailHandler::getMailHeaders  ) 
 

Definition at line 115 of file emailhandler.cpp.

References headers, PopClient::headersOnly(), MailAccount::lastServerMailCount, mailAccount, PopClient::newConnection(), popClient, MailAccount::popPasswd, MailAccount::popServer, MailAccount::popUserName, qDebug(), PopClient::removeSynchronize(), PopClient::setAccount(), PopClient::setSynchronize(), MailAccount::synchronize, MailAccount::syncLimit, and TRUE.

Referenced by EmailClient::getNewMail().

void EmailHandler::mailArrived const Email ,
bool 
[signal]
 

Referenced by messageArrived().

void EmailHandler::mailboxSize int   )  [signal]
 

void EmailHandler::mailSent  )  [signal]
 

Referenced by EmailHandler().

void EmailHandler::mailTransfered int   )  [signal]
 

Referenced by EmailHandler(), and getMailByList().

void EmailHandler::messageArrived const QString ,
int  id,
uint  size,
bool  complete
[slot]
 

Definition at line 141 of file emailhandler.cpp.

References Email::downloaded, FALSE, mailArrived(), Email::rawMail, Email::serverId, and Email::size.

Referenced by EmailHandler().

bool EmailHandler::parse const QString in,
const QString lineShift,
Email mail
 

Definition at line 153 of file emailhandler.cpp.

References Email::addEnclosure(), QValueList< T >::append(), QString::at(), Enclosure::body, Email::body, Email::bodyPlain, Email::carbonCopies, Enclosure::contentAttribute, Enclosure::contentType, Email::date, Enclosure::encoding, encoding, FALSE, Email::files, TextParser::find(), QString::find(), Email::from, Email::fromMail, TextParser::getString(), Enclosure::id, Email::id, id, QString::left(), QString::length(), Email::mimeType, TextParser::nextSeparator(), TextParser::nextWord(), Enclosure::originalName, p, pos, Email::rawMail, rec, Email::received, Email::recipients, QString::right(), Enclosure::saved, TextParser::separatorAt(), QString::stripWhiteSpace(), Email::subject, TRUE, QString::truncate(), and TextParser::wordAt().

Referenced by EmailClient::mailArrived(), and EmailClient::readMail().

int EmailHandler::parse64base char *  src,
char *  dest
 

Definition at line 396 of file emailhandler.cpp.

References Opie::MM::x.

Referenced by getEnclosure().

void EmailHandler::popError int  ,
const QString Msg
[signal]
 

Referenced by EmailHandler().

void EmailHandler::sendMail QList< Email > *  mailList  ) 
 

Definition at line 70 of file emailhandler.cpp.

References SmtpClient::addMail(), MailAccount::emailAddress, encodeMime(), mailAccount, SmtpClient::newConnection(), QString::null, qApp, Email::rawMail, Email::recipients, smtpClient, MailAccount::smtpServer, Email::subject, tr, and warning().

Referenced by EmailClient::sendQuedMail().

void EmailHandler::setAccount MailAccount  account  ) 
 

Definition at line 96 of file emailhandler.cpp.

References mailAccount.

Referenced by EmailClient::download(), and EmailClient::setMailAccount().

void EmailHandler::smtpError int  ,
const QString Msg
[signal]
 

Referenced by EmailHandler().

void EmailHandler::updatePopStatus const QString  )  [signal]
 

Referenced by EmailHandler().

void EmailHandler::updateSmtpStatus const QString  )  [signal]
 

Referenced by EmailHandler().


Member Data Documentation

bool EmailHandler::headers [private]
 

Definition at line 147 of file emailhandler.h.

Referenced by getMail(), getMailByList(), and getMailHeaders().

MailAccount EmailHandler::mailAccount [private]
 

Definition at line 144 of file emailhandler.h.

Referenced by encodeMime(), getAccount(), getMail(), getMailByList(), getMailHeaders(), sendMail(), and setAccount().

PopClient* EmailHandler::popClient [private]
 

Definition at line 146 of file emailhandler.h.

Referenced by cancel(), EmailHandler(), getMail(), getMailByList(), and getMailHeaders().

SmtpClient* EmailHandler::smtpClient [private]
 

Definition at line 145 of file emailhandler.h.

Referenced by cancel(), EmailHandler(), and sendMail().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:31:57 2005 for OPIE by  doxygen 1.4.2