summaryrefslogtreecommitdiff
authoralwin <alwin>2004-01-05 02:03:01 (UTC)
committer alwin <alwin>2004-01-05 02:03:01 (UTC)
commit4fca3779614c863443ff09295fd0af19b9d9310e (patch) (side-by-side diff)
tree666ba052b9dd440f9b2a8df8913a01571e32444c
parent2cf0c79cb325bff1c869febdd83429a5572b1e38 (diff)
downloadopie-4fca3779614c863443ff09295fd0af19b9d9310e.zip
opie-4fca3779614c863443ff09295fd0af19b9d9310e.tar.gz
opie-4fca3779614c863443ff09295fd0af19b9d9310e.tar.bz2
returns their type of connection (mbox,imap or pop3)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/abstractmail.h2
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp5
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.h1
-rw-r--r--noncore/net/mail/libmailwrapper/mboxwrapper.cpp7
-rw-r--r--noncore/net/mail/libmailwrapper/mboxwrapper.h2
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp5
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.h2
7 files changed, 23 insertions, 1 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h
index a070fb0..7c060db 100644
--- a/noncore/net/mail/libmailwrapper/abstractmail.h
+++ b/noncore/net/mail/libmailwrapper/abstractmail.h
@@ -48,8 +48,10 @@ public:
static AbstractMail* getWrapper(const QString&a);
static QString defaultLocalfolder();
+ virtual const QString&getType()const=0;
+
protected:
static encodedString*decode_String(const encodedString*text,const QString&enc);
static QString convert_String(const char*text);
static QString gen_attachment_id();
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index 0c1e05e..95b317a 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -984,4 +984,9 @@ void IMAPwrapper::storeMessage(const char*msg,size_t length, const QString&folde
if (r != MAILIMAP_NO_ERROR) {
Global::statusMessage("Error storing mail!");
}
}
+
+const QString&IMAPwrapper::getType()const
+{
+ return account->getType();
+}
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h
index a97f12d..6a9c411 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.h
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.h
@@ -42,8 +42,9 @@ public:
static void imap_progress( size_t current, size_t maximum );
virtual void logout();
+ virtual const QString&getType()const;
protected:
RecMail*parse_list_result(mailimap_msg_att*);
void login();
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp
index 540a971..60f7507 100644
--- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp
@@ -5,8 +5,10 @@
#include <qdir.h>
#include <stdlib.h>
#include <qpe/global.h>
+const QString MBOXwrapper::wrapperType="MBOX";
+
MBOXwrapper::MBOXwrapper(const QString & mbox_dir)
: Genericwrapper(),MBOXPath(mbox_dir)
{
QDir dir(MBOXPath);
@@ -321,4 +323,9 @@ void MBOXwrapper::statusFolder(folderStat&target_stat,const QString & mailbox)
&target_stat.message_recent,&target_stat.message_unseen);
if (folder) mailfolder_free(folder);
if (storage) mailstorage_free(storage);
}
+
+const QString&MBOXwrapper::getType()const
+{
+ return wrapperType;
+}
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.h b/noncore/net/mail/libmailwrapper/mboxwrapper.h
index f822997..f97fce2 100644
--- a/noncore/net/mail/libmailwrapper/mboxwrapper.h
+++ b/noncore/net/mail/libmailwrapper/mboxwrapper.h
@@ -32,11 +32,13 @@ public:
virtual void fetchRawBody(const RecMail&mail,char**target,size_t*length);
virtual void deleteMails(const QString & mailbox,QList<RecMail> &target);
virtual int deleteAllMail(const Folder*);
+ virtual const QString&getType()const;
protected:
static void deleteMails(mailmbox_folder*f,QList<RecMail> &target);
QString MBOXPath;
+ static const QString wrapperType;
};
#endif
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
index b4eca6f..45408dd 100644
--- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
@@ -234,4 +234,9 @@ void POP3wrapper::fetchRawBody(const RecMail&mail,char**target,size_t*length)
int err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg);
err = mailmessage_fetch(mailmsg,target,length);
if (mailmsg) mailmessage_free(mailmsg);
}
+
+const QString&POP3wrapper::getType()const
+{
+ return account->getType();
+}
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.h b/noncore/net/mail/libmailwrapper/pop3wrapper.h
index 9cba101..b7e8f27 100644
--- a/noncore/net/mail/libmailwrapper/pop3wrapper.h
+++ b/noncore/net/mail/libmailwrapper/pop3wrapper.h
@@ -27,9 +27,9 @@ public:
virtual RecBody fetchBody( const RecMail &mail );
virtual void fetchRawBody(const RecMail&mail,char**target,size_t*length);
virtual void logout();
-
+ virtual const QString&getType()const;
static void pop3_progress( size_t current, size_t maximum );
protected:
void login();