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

SmtpHandler Class Reference

#include </home/clem/local/src/opie/noncore/unsupported/mail2/libmail/smtphandler.h>

Collaboration diagram for SmtpHandler:

Collaboration graph
[legend]
List of all members.

Public Types

enum  SmtpError { ErrConnectionRefused, ErrHostNotFound, ErrUnknownResponse, ErrAuthNotSupported }

Public Slots

void stop ()

Signals

void finished ()
void error (const QString &)
void status (const QString &)

Public Member Functions

 SmtpHandler (const QString &header, const QString &message, Account &account, const QString &to)

Private Types

enum  State {
  Ehlo, Auth, ReadAuth, Helo,
  Mail, Rcpt, Data, Body,
  Quit, Close
}

Private Slots

void readyRead ()
void hostFound ()
void connected ()
void deleteMe ()
void errorHandling (int)

Private Member Functions

void sendToSocket (const QString &text, bool log=true)

Private Attributes

QString _header
QString _message
Account _account
QString _to
QSocket * _socket
int _state

Member Enumeration Documentation

enum SmtpHandler::SmtpError
 

Enumeration values:
ErrConnectionRefused 
ErrHostNotFound 
ErrUnknownResponse 
ErrAuthNotSupported 

Definition at line 18 of file smtphandler.h.

enum SmtpHandler::State [private]
 

Enumeration values:
Ehlo 
Auth 
ReadAuth 
Helo 
Mail 
Rcpt 
Data 
Body 
Quit 
Close 

Definition at line 43 of file smtphandler.h.


Constructor & Destructor Documentation

SmtpHandler::SmtpHandler const QString header,
const QString message,
Account account,
const QString to
 

Definition at line 18 of file smtphandler.cpp.

References _header, _message, _socket, _state, connected(), error(), errorHandling(), Helo, hostFound(), readyRead(), QString::replace(), Account::smtpPort(), Account::smtpServer(), status(), and tr.


Member Function Documentation

void SmtpHandler::connected  )  [private, slot]
 

Definition at line 57 of file smtphandler.cpp.

References _socket, status(), and tr.

Referenced by SmtpHandler().

void SmtpHandler::deleteMe  )  [private, slot]
 

Definition at line 168 of file smtphandler.cpp.

Referenced by stop().

void SmtpHandler::error const QString  )  [signal]
 

Referenced by errorHandling(), readyRead(), and SmtpHandler().

void SmtpHandler::errorHandling int   )  [private, slot]
 

Definition at line 38 of file smtphandler.cpp.

References error(), stop(), and tr.

Referenced by SmtpHandler().

void SmtpHandler::finished  )  [signal]
 

Referenced by stop().

void SmtpHandler::hostFound  )  [private, slot]
 

Definition at line 52 of file smtphandler.cpp.

References status(), and tr.

Referenced by SmtpHandler().

void SmtpHandler::readyRead  )  [private, slot]
 

Definition at line 62 of file smtphandler.cpp.

References _account, _header, _message, _socket, _state, _to, QValueList< T >::append(), Auth, Body, Close, MiscFunctions::decodeBase64(), Ehlo, Account::email(), MiscFunctions::encodeBase64(), error(), QStringList::grep(), Helo, hostname, Account::pass(), qDebug(), Quit, Rcpt, ReadAuth, QString::replace(), sendToSocket(), MiscFunctions::smtpAuthCramMd5(), status(), stop(), QString::stripWhiteSpace(), QString::toInt(), tr, QString::truncate(), and Account::user.

Referenced by SmtpHandler().

void SmtpHandler::sendToSocket const QString text,
bool  log = true
[private]
 

Definition at line 151 of file smtphandler.cpp.

References _socket, QString::latin1(), QString::length(), qDebug(), QString::stripWhiteSpace(), and tr.

Referenced by readyRead().

void SmtpHandler::status const QString  )  [signal]
 

Referenced by connected(), hostFound(), readyRead(), and SmtpHandler().

void SmtpHandler::stop  )  [slot]
 

Definition at line 162 of file smtphandler.cpp.

References deleteMe(), and finished().

Referenced by errorHandling(), and readyRead().


Member Data Documentation

Account SmtpHandler::_account [private]
 

Definition at line 47 of file smtphandler.h.

Referenced by readyRead().

QString SmtpHandler::_header [private]
 

Definition at line 46 of file smtphandler.h.

Referenced by readyRead(), and SmtpHandler().

QString SmtpHandler::_message [private]
 

Definition at line 46 of file smtphandler.h.

Referenced by readyRead(), and SmtpHandler().

QSocket* SmtpHandler::_socket [private]
 

Definition at line 49 of file smtphandler.h.

Referenced by connected(), readyRead(), sendToSocket(), and SmtpHandler().

int SmtpHandler::_state [private]
 

Definition at line 50 of file smtphandler.h.

Referenced by readyRead(), and SmtpHandler().

QString SmtpHandler::_to [private]
 

Definition at line 48 of file smtphandler.h.

Referenced by readyRead().


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