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

IMAPwrapper Class Reference

#include </home/clem/local/src/opie/noncore/net/mail/libmailwrapper/imapwrapper.h>

Inheritance diagram for IMAPwrapper:

Inheritance graph
[legend]
Collaboration diagram for IMAPwrapper:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IMAPwrapper (IMAPaccount *a)
virtual ~IMAPwrapper ()
virtual QValueList< Opie::Core::OSmartPointer<
Folder > > * 
listFolders ()
virtual void listMessages (const QString &mailbox, QValueList< Opie::Core::OSmartPointer< RecMail > > &target)
virtual void statusFolder (folderStat &target_stat, const QString &mailbox="INBOX")
virtual void deleteMail (const RecMailP &mail)
virtual void answeredMail (const RecMailP &mail)
virtual int deleteAllMail (const Opie::Core::OSmartPointer< Folder > &folder)
virtual void storeMessage (const char *msg, size_t length, const QString &folder)
virtual void mvcpAllMails (const Opie::Core::OSmartPointer< Folder > &fromFolder, const QString &targetFolder, AbstractMail *targetWrapper, bool moveit)
virtual void mvcpMail (const RecMailP &mail, const QString &targetFolder, AbstractMail *targetWrapper, bool moveit)
virtual RecBodyP fetchBody (const RecMailP &mail)
virtual QString fetchTextPart (const RecMailP &mail, const RecPartP &part)
virtual encodedStringfetchDecodedPart (const RecMailP &mail, const RecPartP &part)
virtual encodedStringfetchRawPart (const RecMailP &mail, const RecPartP &part)
virtual encodedStringfetchRawBody (const RecMailP &mail)
virtual int createMbox (const QString &, const Opie::Core::OSmartPointer< Folder > &parentfolder=0, const QString &delemiter="/", bool getsubfolder=false)
virtual int deleteMbox (const Opie::Core::OSmartPointer< Folder > &folder)
virtual void logout ()
virtual MAILLIB::ATYPE getType () const
virtual const QStringgetName () const

Static Public Member Functions

static void imap_progress (size_t current, size_t maximum)

Protected Member Functions

RecMailparse_list_result (mailimap_msg_att *)
void login ()
bool start_tls (bool force=true)
virtual QString fetchTextPart (const RecMailP &mail, const QValueList< int > &path, bool internal_call=false, const QString &enc="")
virtual encodedStringfetchRawPart (const RecMailP &mail, const QValueList< int > &path, bool internal_call)
int selectMbox (const QString &mbox)
void fillSinglePart (RecPartP &target_part, mailimap_body_type_1part *Description)
void fillSingleTextPart (RecPartP &target_part, mailimap_body_type_text *which)
void fillSingleBasicPart (RecPartP &target_part, mailimap_body_type_basic *which)
void fillSingleMsgPart (RecPartP &target_part, mailimap_body_type_msg *which)
void fillMultiPart (RecPartP &target_part, mailimap_body_type_mpart *which)
void traverseBody (const RecMailP &mail, mailimap_body *body, RecBodyP &target_body, int current_recursion, QValueList< int >recList, int current_count=1)

Static Protected Member Functions

static void fillBodyFields (RecPartP &target_part, mailimap_body_fields *which)
static QStringList address_list_to_stringlist (clist *list)

Protected Attributes

IMAPaccountaccount
mailimap * m_imap
QString m_Lastmbox

Constructor & Destructor Documentation

IMAPwrapper::IMAPwrapper IMAPaccount a  ) 
 

Definition at line 12 of file imapwrapper.cpp.

References account, m_imap, and m_Lastmbox.

IMAPwrapper::~IMAPwrapper  )  [virtual]
 

Definition at line 20 of file imapwrapper.cpp.

References logout().


Member Function Documentation

QStringList IMAPwrapper::address_list_to_stringlist clist *  list  )  [static, protected]
 

Definition at line 535 of file imapwrapper.cpp.

References QValueList< T >::append(), AbstractMail::convert_String(), QString::data(), l, and NULL.

Referenced by parse_list_result().

void IMAPwrapper::answeredMail const RecMailP mail  )  [virtual]
 

Implements AbstractMail.

Definition at line 912 of file imapwrapper.cpp.

References login(), m_imap, odebug, oendl, and selectMbox().

virtual int IMAPwrapper::createMbox const QString ,
const Opie::Core::OSmartPointer< Folder > &  parentfolder = 0,
const QString delemiter = "/",
bool  getsubfolder = false
[virtual]
 

Reimplemented from AbstractMail.

virtual int IMAPwrapper::deleteAllMail const Opie::Core::OSmartPointer< Folder > &  folder  )  [virtual]
 

Implements AbstractMail.

void IMAPwrapper::deleteMail const RecMailP mail  )  [virtual]
 

Implements AbstractMail.

Definition at line 877 of file imapwrapper.cpp.

References login(), m_imap, odebug, oendl, and selectMbox().

Referenced by mvcpMail().

virtual int IMAPwrapper::deleteMbox const Opie::Core::OSmartPointer< Folder > &  folder  )  [virtual]
 

Implements AbstractMail.

RecBodyP IMAPwrapper::fetchBody const RecMailP mail  )  [virtual]
 

Implements AbstractMail.

Definition at line 490 of file imapwrapper.cpp.

References login(), m_imap, odebug, oendl, selectMbox(), and traverseBody().

encodedString * IMAPwrapper::fetchDecodedPart const RecMailP mail,
const RecPartP part
[virtual]
 

Implements AbstractMail.

Definition at line 960 of file imapwrapper.cpp.

References AbstractMail::decode_String(), and fetchRawPart().

encodedString * IMAPwrapper::fetchRawBody const RecMailP mail  )  [virtual]
 

Implements AbstractMail.

Definition at line 1122 of file imapwrapper.cpp.

References fetchRawPart().

encodedString * IMAPwrapper::fetchRawPart const RecMailP mail,
const QValueList< int > &  path,
bool  internal_call
[protected, virtual]
 

Definition at line 576 of file imapwrapper.cpp.

References QValueList< T >::count(), login(), m_imap, NULL, odebug, oendl, selectMbox(), encodedString::setContent(), and text.

encodedString * IMAPwrapper::fetchRawPart const RecMailP mail,
const RecPartP part
[virtual]
 

Implements AbstractMail.

Definition at line 968 of file imapwrapper.cpp.

Referenced by fetchDecodedPart(), fetchRawBody(), and fetchTextPart().

QString IMAPwrapper::fetchTextPart const RecMailP mail,
const QValueList< int > &  path,
bool  internal_call = false,
const QString enc = ""
[protected, virtual]
 

Definition at line 940 of file imapwrapper.cpp.

References encodedString::Content(), AbstractMail::decode_String(), fetchRawPart(), and encodedString::Length().

QString IMAPwrapper::fetchTextPart const RecMailP mail,
const RecPartP part
[virtual]
 

Implements AbstractMail.

Definition at line 955 of file imapwrapper.cpp.

Referenced by traverseBody().

void IMAPwrapper::fillBodyFields RecPartP target_part,
mailimap_body_fields *  which
[static, protected]
 

Definition at line 830 of file imapwrapper.cpp.

References encoding, NULL, and t.

Referenced by fillSingleBasicPart(), fillSingleMsgPart(), and fillSingleTextPart().

void IMAPwrapper::fillMultiPart RecPartP target_part,
mailimap_body_type_mpart *  which
[protected]
 

Definition at line 771 of file imapwrapper.cpp.

References QString::lower(), and NULL.

Referenced by traverseBody().

void IMAPwrapper::fillSingleBasicPart RecPartP target_part,
mailimap_body_type_basic *  which
[protected]
 

Definition at line 788 of file imapwrapper.cpp.

References fillBodyFields(), QString::latin1(), QString::lower(), odebug, oendl, and type.

Referenced by fillSinglePart().

void IMAPwrapper::fillSingleMsgPart RecPartP target_part,
mailimap_body_type_msg *  which
[protected]
 

Definition at line 759 of file imapwrapper.cpp.

References fillBodyFields(), odebug, and oendl.

Referenced by fillSinglePart().

void IMAPwrapper::fillSinglePart RecPartP target_part,
mailimap_body_type_1part *  Description
[protected]
 

Definition at line 724 of file imapwrapper.cpp.

References fillSingleBasicPart(), fillSingleMsgPart(), and fillSingleTextPart().

Referenced by traverseBody().

void IMAPwrapper::fillSingleTextPart RecPartP target_part,
mailimap_body_type_text *  which
[protected]
 

Definition at line 746 of file imapwrapper.cpp.

References fillBodyFields(), QString::lower(), odebug, and oendl.

Referenced by fillSinglePart().

const QString & IMAPwrapper::getName  )  const [virtual]
 

Implements AbstractMail.

Definition at line 1116 of file imapwrapper.cpp.

References account, Account::getAccountName(), odebug, and oendl.

MAILLIB::ATYPE IMAPwrapper::getType  )  const [virtual]
 

Implements AbstractMail.

Definition at line 1111 of file imapwrapper.cpp.

References account, and Account::getType().

void IMAPwrapper::imap_progress size_t  current,
size_t  maximum
[static]
 

Definition at line 42 of file imapwrapper.cpp.

References odebug, oendl, and qApp.

Referenced by login().

QValueList< Opie::Core::OSmartPointer< Folder > > * IMAPwrapper::listFolders  )  [virtual]
 

Implements AbstractMail.

Definition at line 279 of file imapwrapper.cpp.

References account, QValueList< T >::append(), IMAPaccount::getPrefix(), i, list, login(), QString::lower(), m_imap, NULL, odebug, and oendl.

void IMAPwrapper::listMessages const QString mailbox,
QValueList< Opie::Core::OSmartPointer< RecMail > > &  target
[virtual]
 

Definition at line 214 of file imapwrapper.cpp.

References i, login(), m_imap, parse_list_result(), selectMbox(), RecMail::setMbox(), RecMail::setNumber(), RecMail::setWrapper(), Global::statusMessage(), and tr.

void IMAPwrapper::login  )  [protected]
 

Definition at line 102 of file imapwrapper.cpp.

References account, Account::ConnectionType(), Account::getOffline(), LoginDialog::getPassword(), Account::getPassword(), Account::getPort(), Account::getServer(), LoginDialog::getUser(), Account::getUser(), imap_progress(), logout(), m_imap, NULL, odebug, oendl, server, start_tls(), Global::statusMessage(), tr, and true.

Referenced by answeredMail(), deleteMail(), fetchBody(), fetchRawPart(), listFolders(), listMessages(), mvcpMail(), statusFolder(), and storeMessage().

void IMAPwrapper::logout  )  [virtual]
 

Implements AbstractMail.

Definition at line 203 of file imapwrapper.cpp.

References m_imap, and m_Lastmbox.

Referenced by login(), and ~IMAPwrapper().

virtual void IMAPwrapper::mvcpAllMails const Opie::Core::OSmartPointer< Folder > &  fromFolder,
const QString targetFolder,
AbstractMail targetWrapper,
bool  moveit
[virtual]
 

Reimplemented from AbstractMail.

void IMAPwrapper::mvcpMail const RecMailP mail,
const QString targetFolder,
AbstractMail targetWrapper,
bool  moveit
[virtual]
 

Reimplemented from AbstractMail.

Definition at line 1161 of file imapwrapper.cpp.

References deleteMail(), QString::latin1(), login(), AbstractMail::mvcpMail(), odebug, oendl, selectMbox(), Global::statusMessage(), and tr.

RecMail * IMAPwrapper::parse_list_result mailimap_msg_att *   )  [protected]
 

Definition at line 370 of file imapwrapper.cpp.

References address_list_to_stringlist(), AbstractMail::convert_String(), QValueList< T >::count(), d, QValueList< T >::first(), FLAG_ANSWERED, FLAG_DELETED, FLAG_DRAFT, FLAG_FLAGGED, FLAG_RECENT, FLAG_SEEN, QString::length(), NULL, MailStatics::parseDateTime(), QString::remove(), RecMail::setBcc(), QBitArray::setBit(), RecMail::setCC(), RecMail::setDate(), RecMail::setFrom(), RecMail::setInreply(), RecMail::setMsgid(), RecMail::setMsgsize(), RecMail::setReplyto(), RecMail::setSubject(), RecMail::setTo(), size, and QBitArray::testBit().

Referenced by listMessages().

int IMAPwrapper::selectMbox const QString mbox  )  [protected]
 

Definition at line 27 of file imapwrapper.cpp.

References QString::latin1(), m_imap, m_Lastmbox, odebug, and oendl.

Referenced by answeredMail(), deleteMail(), fetchBody(), fetchRawPart(), listMessages(), and mvcpMail().

bool IMAPwrapper::start_tls bool  force = true  )  [protected]
 

Definition at line 48 of file imapwrapper.cpp.

References low, m_imap, NULL, odebug, oendl, Global::statusMessage(), and tr.

Referenced by login().

void IMAPwrapper::statusFolder folderStat target_stat,
const QString mailbox = "INBOX"
[virtual]
 

Implements AbstractMail.

Definition at line 1057 of file imapwrapper.cpp.

References QString::latin1(), login(), folderStat::message_count, folderStat::message_recent, folderStat::message_unseen, NULL, odebug, and oendl.

void IMAPwrapper::storeMessage const char *  msg,
size_t  length,
const QString folder
[virtual]
 

Implements AbstractMail.

Definition at line 1100 of file imapwrapper.cpp.

References QString::latin1(), login(), and Global::statusMessage().

void IMAPwrapper::traverseBody const RecMailP mail,
mailimap_body *  body,
RecBodyP target_body,
int  current_recursion,
QValueList< int >  recList,
int  current_count = 1
[protected]
 

Definition at line 649 of file imapwrapper.cpp.

References QValueList< T >::append(), QValueList< T >::count(), fetchTextPart(), fillMultiPart(), fillSinglePart(), id, odebug, and oendl.

Referenced by fetchBody().


Member Data Documentation

IMAPaccount* IMAPwrapper::account [protected]
 

Definition at line 76 of file imapwrapper.h.

Referenced by getName(), getType(), IMAPwrapper(), listFolders(), and login().

mailimap* IMAPwrapper::m_imap [protected]
 

Definition at line 77 of file imapwrapper.h.

Referenced by answeredMail(), deleteMail(), fetchBody(), fetchRawPart(), IMAPwrapper(), listFolders(), listMessages(), login(), logout(), selectMbox(), and start_tls().

QString IMAPwrapper::m_Lastmbox [protected]
 

Definition at line 78 of file imapwrapper.h.

Referenced by IMAPwrapper(), logout(), and selectMbox().


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