summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/config.in2
-rw-r--r--noncore/net/mail/libmailwrapper/.cvsignore6
-rw-r--r--noncore/net/mail/libmailwrapper/config.in4
-rw-r--r--noncore/net/mail/libmailwrapper/libmailwrapper.pro44
-rw-r--r--noncore/net/mail/libmailwrapper/mailwrapper.cpp15
-rw-r--r--noncore/net/mail/libmailwrapper/settings.cpp36
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.cpp4
-rw-r--r--noncore/net/mail/mail.pro26
-rw-r--r--noncore/net/mail/mainwindow.cpp7
9 files changed, 99 insertions, 45 deletions
diff --git a/noncore/net/mail/config.in b/noncore/net/mail/config.in
index 43ecc6f..b5173ae 100644
--- a/noncore/net/mail/config.in
+++ b/noncore/net/mail/config.in
@@ -3,2 +3,2 @@
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && LIBMAILWRAPPER
diff --git a/noncore/net/mail/libmailwrapper/.cvsignore b/noncore/net/mail/libmailwrapper/.cvsignore
new file mode 100644
index 0000000..581c299
--- a/dev/null
+++ b/noncore/net/mail/libmailwrapper/.cvsignore
@@ -0,0 +1,6 @@
+logindialogui.cpp
+logindialogui.h
+sendmailprogressui.cpp
+sendmailprogressui.h
+.moc
+Makefile
diff --git a/noncore/net/mail/libmailwrapper/config.in b/noncore/net/mail/libmailwrapper/config.in
new file mode 100644
index 0000000..790891e
--- a/dev/null
+++ b/noncore/net/mail/libmailwrapper/config.in
@@ -0,0 +1,4 @@
+ config LIBMAILWRAPPER
+ boolean "libmailwrapper ( wrapper arround libetpan needed by mail3"
+ default "y"
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/noncore/net/mail/libmailwrapper/libmailwrapper.pro b/noncore/net/mail/libmailwrapper/libmailwrapper.pro
new file mode 100644
index 0000000..4b4a4f1
--- a/dev/null
+++ b/noncore/net/mail/libmailwrapper/libmailwrapper.pro
@@ -0,0 +1,44 @@
+TEMPLATE = lib
+CONFIG += qt warn_on debug
+
+HEADERS = mailwrapper.h \
+ imapwrapper.h \
+ mailtypes.h \
+ pop3wrapper.h \
+ abstractmail.h \
+ smtpwrapper.h \
+ genericwrapper.h \
+ mboxwrapper.h \
+ settings.h \
+ logindialog.h \
+ sendmailprogress.h
+
+SOURCES = imapwrapper.cpp \
+ mailwrapper.cpp \
+ mailtypes.cpp \
+ pop3wrapper.cpp \
+ abstractmail.cpp \
+ smtpwrapper.cpp \
+ genericwrapper.cpp \
+ mboxwrapper.cpp \
+ settings.cpp \
+ logindialog.cpp \
+ sendmailprogress.cpp
+
+INTERFACES = logindialogui.ui \
+ sendmailprogressui.ui
+
+
+INCLUDEPATH += $(OPIEDIR)/include
+
+CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX )
+contains( CONFTEST, y ){
+ LIBS += -lqpe -letpan -lssl -lcrypto -liconv
+}else{
+ LIBS += -lqpe -letpan -lssl -lcrypto
+}
+
+DESTDIR = $(OPIEDIR)/lib$(PROJMAK)
+TARGET = mailwrapper
+
+include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.cpp b/noncore/net/mail/libmailwrapper/mailwrapper.cpp
index 9398823..75b9343 100644
--- a/noncore/net/mail/libmailwrapper/mailwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/mailwrapper.cpp
@@ -9,4 +9,15 @@
#include "mailwrapper.h"
-#include "logindialog.h"
-#include "defines.h"
+//#include "logindialog.h"
+//#include "defines.h"
+
+#define UNDEFINED 64
+#define MAXLINE 76
+#define UTF16MASK 0x03FFUL
+#define UTF16SHIFT 10
+#define UTF16BASE 0x10000UL
+#define UTF16HIGHSTART 0xD800UL
+#define UTF16HIGHEND 0xDBFFUL
+#define UTF16LOSTART 0xDC00UL
+#define UTF16LOEND 0xDFFFUL
+
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp
index 17aa1b0..c5187f5 100644
--- a/noncore/net/mail/libmailwrapper/settings.cpp
+++ b/noncore/net/mail/libmailwrapper/settings.cpp
@@ -6,3 +6,13 @@
#include "settings.h"
-#include "defines.h"
+//#include "defines.h"
+
+#define IMAP_PORT "143"
+#define IMAP_SSL_PORT "993"
+#define SMTP_PORT "25"
+#define SMTP_SSL_PORT "465"
+#define POP3_PORT "110"
+#define POP3_SSL_PORT "995"
+#define NNTP_PORT "119"
+#define NNTP_SSL_PORT "563"
+
@@ -64,3 +74,3 @@ void Settings::updateAccounts()
}
-
+
QStringList nntp = dir.entryList( "nntp-*" );
@@ -71,3 +81,3 @@ void Settings::updateAccounts()
}
-
+
readAccounts();
@@ -77,3 +87,3 @@ void Settings::saveAccounts()
{
- checkDirectory();
+ checkDirectory();
Account *it;
@@ -87,3 +97,3 @@ void Settings::readAccounts()
{
- checkDirectory();
+ checkDirectory();
Account *it;
@@ -132,3 +142,3 @@ QString IMAPaccount::getUniqueFileName()
QString unique;
-
+
QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" );
@@ -166,3 +176,3 @@ void IMAPaccount::save()
Settings::checkDirectory();
-
+
Config *conf = new Config( getFileName(), Config::File );
@@ -209,3 +219,3 @@ QString POP3account::getUniqueFileName()
QString unique;
-
+
QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" );
@@ -236,3 +246,3 @@ void POP3account::save()
Settings::checkDirectory();
-
+
Config *conf = new Config( getFileName(), Config::File );
@@ -283,3 +293,3 @@ QString SMTPaccount::getUniqueFileName()
QString unique;
-
+
QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" );
@@ -311,3 +321,3 @@ void SMTPaccount::save()
Settings::checkDirectory();
-
+
Config *conf = new Config( getFileName(), Config::File );
@@ -356,3 +366,3 @@ QString NNTPaccount::getUniqueFileName()
QString unique;
-
+
QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" );
@@ -384,3 +394,3 @@ void NNTPaccount::save()
Settings::checkDirectory();
-
+
Config *conf = new Config( getFileName(), Config::File );
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
index 7e03af9..b9c4ff2 100644
--- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
@@ -19,5 +19,7 @@
#include "mailtypes.h"
-#include "defines.h"
+//#include "defines.h"
#include "sendmailprogress.h"
+#define USER_AGENT "OpieMail v0.1"
+
progressMailSend*SMTPwrapper::sendProgress = 0;
diff --git a/noncore/net/mail/mail.pro b/noncore/net/mail/mail.pro
index 2c15a7b..69e1450 100644
--- a/noncore/net/mail/mail.pro
+++ b/noncore/net/mail/mail.pro
@@ -3,6 +3,3 @@ CONFIG += qt warn_on debug quick-app
HEADERS = defines.h \
- logindialog.h \
- settings.h \
editaccounts.h \
- mailwrapper.h \
composemail.h \
@@ -13,13 +10,5 @@ HEADERS = defines.h \
opiemail.h \
- imapwrapper.h \
- mailtypes.h \
mailistviewitem.h \
- pop3wrapper.h \
- abstractmail.h \
settingsdialog.h \
statuswidget.h \
- smtpwrapper.h \
- genericwrapper.h \
- mboxwrapper.h \
- sendmailprogress.h \
newmaildir.h
@@ -31,19 +20,8 @@ SOURCES = main.cpp \
composemail.cpp \
- mailwrapper.cpp \
- imapwrapper.cpp \
addresspicker.cpp \
editaccounts.cpp \
- logindialog.cpp \
viewmail.cpp \
viewmailbase.cpp \
- settings.cpp \
- mailtypes.cpp \
- pop3wrapper.cpp \
- abstractmail.cpp \
settingsdialog.cpp \
statuswidget.cpp \
- smtpwrapper.cpp \
- genericwrapper.cpp \
- mboxwrapper.cpp \
- sendmailprogress.cpp \
newmaildir.cpp
@@ -57,3 +35,2 @@ INTERFACES = editaccountsui.ui \
addresspickerui.ui \
- logindialogui.ui \
composemailui.ui \
@@ -61,3 +38,2 @@ INTERFACES = editaccountsui.ui \
statuswidgetui.ui \
- sendmailprogressui.ui \
newmaildirui.ui
@@ -70,3 +46,3 @@ contains( CONFTEST, y ){
}else{
- LIBS += -lqpe -letpan -lssl -lcrypto -lopie
+ LIBS += -lqpe -lopie -llibmailwrapper
}
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 2a74286..6511b1f 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -21,2 +21,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
{
+
setCaption( tr( "Mail" ) );
@@ -118,3 +119,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
slotAdjustLayout();
-
+
QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
@@ -123,5 +124,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
connect( mailView, SIGNAL( mouseButtonClicked(int, QListViewItem *,const QPoint&,int ) ),this,
- SLOT( mailLeftClicked( int, QListViewItem *,const QPoint&,int ) ) );
+ SLOT( mailLeftClicked( int, QListViewItem *,const QPoint&,int ) ) );
connect( mailView, SIGNAL( mouseButtonPressed(int, QListViewItem *,const QPoint&,int ) ),this,
- SLOT( mailHold( int, QListViewItem *,const QPoint&,int ) ) );
+ SLOT( mailHold( int, QListViewItem *,const QPoint&,int ) ) );
connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*)));