author | zecke <zecke> | 2004-03-14 13:22:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 13:22:42 (UTC) |
commit | 0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44 (patch) (unidiff) | |
tree | f6a68afa76a9be4099c3de7a286caeadd250c966 /noncore/net/mail | |
parent | d9d68663164078b8dbdbfe70d291291b9fd5aacf (diff) | |
download | opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.zip opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.gz opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.bz2 |
Convert net to ODP and QtAUX
35 files changed, 129 insertions, 108 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp index 9a09c18..e4bb6c5 100644 --- a/noncore/net/mail/accountitem.cpp +++ b/noncore/net/mail/accountitem.cpp | |||
@@ -10,16 +10,17 @@ | |||
10 | #include <libmailwrapper/abstractmail.h> | 10 | #include <libmailwrapper/abstractmail.h> |
11 | #include <libmailwrapper/mailwrapper.h> | 11 | #include <libmailwrapper/mailwrapper.h> |
12 | #include <qpe/qpeapplication.h> | 12 | #include <qpe/qpeapplication.h> |
13 | 13 | ||
14 | /* QT */ | 14 | /* QT */ |
15 | #include <qpopupmenu.h> | 15 | #include <qpopupmenu.h> |
16 | #include <qmessagebox.h> | 16 | #include <qmessagebox.h> |
17 | 17 | ||
18 | using namespace Opie::Core; | ||
18 | #define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} | 19 | #define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} |
19 | /** | 20 | /** |
20 | * POP3 Account stuff | 21 | * POP3 Account stuff |
21 | */ | 22 | */ |
22 | POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent ) | 23 | POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent ) |
23 | : AccountViewItem( parent ) | 24 | : AccountViewItem( parent ) |
24 | { | 25 | { |
25 | account = a; | 26 | account = a; |
@@ -44,17 +45,17 @@ POP3viewItem::~POP3viewItem() | |||
44 | delete wrapper; | 45 | delete wrapper; |
45 | } | 46 | } |
46 | 47 | ||
47 | AbstractMail *POP3viewItem::getWrapper() | 48 | AbstractMail *POP3viewItem::getWrapper() |
48 | { | 49 | { |
49 | return wrapper; | 50 | return wrapper; |
50 | } | 51 | } |
51 | 52 | ||
52 | void POP3viewItem::refresh(QValueList<Opie::OSmartPointer<RecMail> > & ) | 53 | void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & ) |
53 | { | 54 | { |
54 | refresh(); | 55 | refresh(); |
55 | } | 56 | } |
56 | 57 | ||
57 | void POP3viewItem::refresh() | 58 | void POP3viewItem::refresh() |
58 | { | 59 | { |
59 | if (account->getOffline()) return; | 60 | if (account->getOffline()) return; |
60 | QValueList<FolderP> *folders = wrapper->listFolders(); | 61 | QValueList<FolderP> *folders = wrapper->listFolders(); |
@@ -1037,17 +1038,17 @@ AccountViewItem::AccountViewItem( QListViewItem *parent) | |||
1037 | } | 1038 | } |
1038 | 1039 | ||
1039 | AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) | 1040 | AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) |
1040 | :QListViewItem( parent,after ),folder(0) | 1041 | :QListViewItem( parent,after ),folder(0) |
1041 | { | 1042 | { |
1042 | init(); | 1043 | init(); |
1043 | } | 1044 | } |
1044 | 1045 | ||
1045 | AccountViewItem::AccountViewItem( const Opie::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) | 1046 | AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) |
1046 | :QListViewItem( parent,after ),folder(folderInit) | 1047 | :QListViewItem( parent,after ),folder(folderInit) |
1047 | { | 1048 | { |
1048 | init(); | 1049 | init(); |
1049 | } | 1050 | } |
1050 | 1051 | ||
1051 | void AccountViewItem::init() | 1052 | void AccountViewItem::init() |
1052 | { | 1053 | { |
1053 | m_Backlink = 0; | 1054 | m_Backlink = 0; |
diff --git a/noncore/net/mail/accountitem.h b/noncore/net/mail/accountitem.h index 276eae0..6cdb260 100644 --- a/noncore/net/mail/accountitem.h +++ b/noncore/net/mail/accountitem.h | |||
@@ -19,82 +19,82 @@ class Folder; | |||
19 | 19 | ||
20 | class AccountViewItem : public QListViewItem | 20 | class AccountViewItem : public QListViewItem |
21 | { | 21 | { |
22 | 22 | ||
23 | public: | 23 | public: |
24 | AccountViewItem( AccountView *parent ); | 24 | AccountViewItem( AccountView *parent ); |
25 | AccountViewItem( QListViewItem *parent); | 25 | AccountViewItem( QListViewItem *parent); |
26 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); | 26 | AccountViewItem( QListViewItem *parent , QListViewItem*after ); |
27 | AccountViewItem( const Opie::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); | 27 | AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); |
28 | 28 | ||
29 | virtual ~AccountViewItem(); | 29 | virtual ~AccountViewItem(); |
30 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&)=0; | 30 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; |
31 | virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&)=0; | 31 | virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; |
32 | virtual QPopupMenu * getContextMenu(){return 0;}; | 32 | virtual QPopupMenu * getContextMenu(){return 0;}; |
33 | virtual void contextMenuSelected(int){} | 33 | virtual void contextMenuSelected(int){} |
34 | virtual AccountView*accountView(); | 34 | virtual AccountView*accountView(); |
35 | virtual bool matchName(const QString&name)const; | 35 | virtual bool matchName(const QString&name)const; |
36 | virtual bool isDraftfolder(); | 36 | virtual bool isDraftfolder(); |
37 | 37 | ||
38 | protected: | 38 | protected: |
39 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); | 39 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); |
40 | virtual void init(); | 40 | virtual void init(); |
41 | virtual void removeChilds(); | 41 | virtual void removeChilds(); |
42 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::OSmartPointer<Folder>&f); | 42 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer<Folder>&f); |
43 | static const QString contextName; | 43 | static const QString contextName; |
44 | AccountView*m_Backlink; | 44 | AccountView*m_Backlink; |
45 | Opie::OSmartPointer<Folder> folder; | 45 | Opie::Core::OSmartPointer<Folder> folder; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | class POP3viewItem : public AccountViewItem | 48 | class POP3viewItem : public AccountViewItem |
49 | { | 49 | { |
50 | 50 | ||
51 | public: | 51 | public: |
52 | POP3viewItem( POP3account *a, AccountView *parent ); | 52 | POP3viewItem( POP3account *a, AccountView *parent ); |
53 | virtual ~POP3viewItem(); | 53 | virtual ~POP3viewItem(); |
54 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&target ); | 54 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
55 | virtual RecBody fetchBody( const Opie::OSmartPointer<RecMail> &mail ); | 55 | virtual RecBody fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
56 | AbstractMail *getWrapper(); | 56 | AbstractMail *getWrapper(); |
57 | virtual QPopupMenu * getContextMenu(); | 57 | virtual QPopupMenu * getContextMenu(); |
58 | virtual void contextMenuSelected(int); | 58 | virtual void contextMenuSelected(int); |
59 | 59 | ||
60 | protected: | 60 | protected: |
61 | POP3account *account; | 61 | POP3account *account; |
62 | virtual void refresh(); | 62 | virtual void refresh(); |
63 | AbstractMail *wrapper; | 63 | AbstractMail *wrapper; |
64 | void disconnect(); | 64 | void disconnect(); |
65 | void setOnOffline(); | 65 | void setOnOffline(); |
66 | }; | 66 | }; |
67 | 67 | ||
68 | class POP3folderItem : public AccountViewItem | 68 | class POP3folderItem : public AccountViewItem |
69 | { | 69 | { |
70 | 70 | ||
71 | public: | 71 | public: |
72 | POP3folderItem( const Opie::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); | 72 | POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); |
73 | virtual ~POP3folderItem(); | 73 | virtual ~POP3folderItem(); |
74 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); | 74 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
75 | virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); | 75 | virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
76 | virtual QPopupMenu * getContextMenu(); | 76 | virtual QPopupMenu * getContextMenu(); |
77 | virtual void contextMenuSelected(int); | 77 | virtual void contextMenuSelected(int); |
78 | 78 | ||
79 | protected: | 79 | protected: |
80 | void downloadMails(); | 80 | void downloadMails(); |
81 | POP3viewItem *pop3; | 81 | POP3viewItem *pop3; |
82 | }; | 82 | }; |
83 | 83 | ||
84 | 84 | ||
85 | class NNTPviewItem : public AccountViewItem | 85 | class NNTPviewItem : public AccountViewItem |
86 | { | 86 | { |
87 | 87 | ||
88 | public: | 88 | public: |
89 | NNTPviewItem( NNTPaccount *a, AccountView *parent ); | 89 | NNTPviewItem( NNTPaccount *a, AccountView *parent ); |
90 | virtual ~NNTPviewItem(); | 90 | virtual ~NNTPviewItem(); |
91 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&target ); | 91 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
92 | virtual RecBody fetchBody( const Opie::OSmartPointer<RecMail> &mail ); | 92 | virtual RecBody fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
93 | AbstractMail *getWrapper(); | 93 | AbstractMail *getWrapper(); |
94 | virtual QPopupMenu * getContextMenu(); | 94 | virtual QPopupMenu * getContextMenu(); |
95 | virtual void contextMenuSelected(int); | 95 | virtual void contextMenuSelected(int); |
96 | 96 | ||
97 | protected: | 97 | protected: |
98 | NNTPaccount *account; | 98 | NNTPaccount *account; |
99 | virtual void refresh(); | 99 | virtual void refresh(); |
100 | AbstractMail *wrapper; | 100 | AbstractMail *wrapper; |
@@ -102,38 +102,38 @@ protected: | |||
102 | void setOnOffline(); | 102 | void setOnOffline(); |
103 | void subscribeGroups(); | 103 | void subscribeGroups(); |
104 | }; | 104 | }; |
105 | 105 | ||
106 | class NNTPfolderItem : public AccountViewItem | 106 | class NNTPfolderItem : public AccountViewItem |
107 | { | 107 | { |
108 | 108 | ||
109 | public: | 109 | public: |
110 | NNTPfolderItem(const Opie::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); | 110 | NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); |
111 | virtual ~NNTPfolderItem(); | 111 | virtual ~NNTPfolderItem(); |
112 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); | 112 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
113 | virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); | 113 | virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
114 | virtual QPopupMenu * getContextMenu(); | 114 | virtual QPopupMenu * getContextMenu(); |
115 | virtual void contextMenuSelected(int); | 115 | virtual void contextMenuSelected(int); |
116 | 116 | ||
117 | protected: | 117 | protected: |
118 | void downloadMails(); | 118 | void downloadMails(); |
119 | NNTPviewItem *nntp; | 119 | NNTPviewItem *nntp; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | 122 | ||
123 | 123 | ||
124 | class IMAPviewItem : public AccountViewItem | 124 | class IMAPviewItem : public AccountViewItem |
125 | { | 125 | { |
126 | friend class IMAPfolderItem; | 126 | friend class IMAPfolderItem; |
127 | public: | 127 | public: |
128 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); | 128 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); |
129 | virtual ~IMAPviewItem(); | 129 | virtual ~IMAPviewItem(); |
130 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); | 130 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
131 | virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); | 131 | virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
132 | AbstractMail *getWrapper(); | 132 | AbstractMail *getWrapper(); |
133 | virtual QPopupMenu * getContextMenu(); | 133 | virtual QPopupMenu * getContextMenu(); |
134 | virtual void contextMenuSelected(int); | 134 | virtual void contextMenuSelected(int); |
135 | const QStringList&subFolders(); | 135 | const QStringList&subFolders(); |
136 | virtual void refreshFolders(bool force=false); | 136 | virtual void refreshFolders(bool force=false); |
137 | bool offline(); | 137 | bool offline(); |
138 | 138 | ||
139 | protected: | 139 | protected: |
@@ -142,21 +142,21 @@ protected: | |||
142 | AbstractMail *wrapper; | 142 | AbstractMail *wrapper; |
143 | QStringList currentFolders; | 143 | QStringList currentFolders; |
144 | }; | 144 | }; |
145 | 145 | ||
146 | class IMAPfolderItem : public AccountViewItem | 146 | class IMAPfolderItem : public AccountViewItem |
147 | { | 147 | { |
148 | 148 | ||
149 | public: | 149 | public: |
150 | IMAPfolderItem( const Opie::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); | 150 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); |
151 | IMAPfolderItem( const Opie::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); | 151 | IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); |
152 | virtual ~IMAPfolderItem(); | 152 | virtual ~IMAPfolderItem(); |
153 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); | 153 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
154 | virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); | 154 | virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
155 | virtual QPopupMenu * getContextMenu(); | 155 | virtual QPopupMenu * getContextMenu(); |
156 | virtual void contextMenuSelected(int); | 156 | virtual void contextMenuSelected(int); |
157 | virtual const QString& Delemiter()const; | 157 | virtual const QString& Delemiter()const; |
158 | protected: | 158 | protected: |
159 | virtual void createNewFolder(); | 159 | virtual void createNewFolder(); |
160 | virtual void deleteFolder(); | 160 | virtual void deleteFolder(); |
161 | virtual void downloadMails(); | 161 | virtual void downloadMails(); |
162 | IMAPviewItem *imap; | 162 | IMAPviewItem *imap; |
@@ -164,18 +164,18 @@ protected: | |||
164 | 164 | ||
165 | class MHviewItem : public AccountViewItem | 165 | class MHviewItem : public AccountViewItem |
166 | { | 166 | { |
167 | friend class MHfolderItem; | 167 | friend class MHfolderItem; |
168 | 168 | ||
169 | public: | 169 | public: |
170 | MHviewItem( const QString&aMboxPath, AccountView *parent ); | 170 | MHviewItem( const QString&aMboxPath, AccountView *parent ); |
171 | virtual ~MHviewItem(); | 171 | virtual ~MHviewItem(); |
172 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&target ); | 172 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
173 | virtual RecBody fetchBody( const Opie::OSmartPointer<RecMail> &mail ); | 173 | virtual RecBody fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); |
174 | AbstractMail *getWrapper(); | 174 | AbstractMail *getWrapper(); |
175 | virtual QPopupMenu * getContextMenu(); | 175 | virtual QPopupMenu * getContextMenu(); |
176 | virtual void contextMenuSelected(int); | 176 | virtual void contextMenuSelected(int); |
177 | QStringList subFolders(); | 177 | QStringList subFolders(); |
178 | virtual void refresh(bool force=false); | 178 | virtual void refresh(bool force=false); |
179 | 179 | ||
180 | protected: | 180 | protected: |
181 | void downloadMails(); | 181 | void downloadMails(); |
@@ -184,24 +184,24 @@ protected: | |||
184 | AbstractMail *wrapper; | 184 | AbstractMail *wrapper; |
185 | QStringList currentFolders; | 185 | QStringList currentFolders; |
186 | }; | 186 | }; |
187 | 187 | ||
188 | class MHfolderItem : public AccountViewItem | 188 | class MHfolderItem : public AccountViewItem |
189 | { | 189 | { |
190 | 190 | ||
191 | public: | 191 | public: |
192 | MHfolderItem( const Opie::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); | 192 | MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); |
193 | MHfolderItem( const Opie::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); | 193 | MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); |
194 | virtual ~MHfolderItem(); | 194 | virtual ~MHfolderItem(); |
195 | virtual void refresh(QValueList<Opie::OSmartPointer<RecMail> >&); | 195 | virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); |
196 | virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&); | 196 | virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&); |
197 | virtual QPopupMenu * getContextMenu(); | 197 | virtual QPopupMenu * getContextMenu(); |
198 | virtual void contextMenuSelected(int); | 198 | virtual void contextMenuSelected(int); |
199 | virtual const Opie::OSmartPointer<Folder>&getFolder()const; | 199 | virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; |
200 | virtual bool isDraftfolder(); | 200 | virtual bool isDraftfolder(); |
201 | 201 | ||
202 | protected: | 202 | protected: |
203 | void downloadMails(); | 203 | void downloadMails(); |
204 | virtual void createFolder(); | 204 | virtual void createFolder(); |
205 | virtual void deleteFolder(); | 205 | virtual void deleteFolder(); |
206 | void initName(); | 206 | void initName(); |
207 | MHviewItem *mbox; | 207 | MHviewItem *mbox; |
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 26107ff..811e57a 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -9,16 +9,17 @@ | |||
9 | #include <libmailwrapper/mailtypes.h> | 9 | #include <libmailwrapper/mailtypes.h> |
10 | #include <libmailwrapper/abstractmail.h> | 10 | #include <libmailwrapper/abstractmail.h> |
11 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
12 | 12 | ||
13 | /* QT */ | 13 | /* QT */ |
14 | #include <qmessagebox.h> | 14 | #include <qmessagebox.h> |
15 | #include <qpopupmenu.h> | 15 | #include <qpopupmenu.h> |
16 | 16 | ||
17 | using namespace Opie::Core; | ||
17 | AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) | 18 | AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) |
18 | : QListView( parent, name, flags ) | 19 | : QListView( parent, name, flags ) |
19 | { | 20 | { |
20 | connect( this, SIGNAL( selectionChanged(QListViewItem*) ), | 21 | connect( this, SIGNAL( selectionChanged(QListViewItem*) ), |
21 | SLOT( refresh(QListViewItem*) ) ); | 22 | SLOT( refresh(QListViewItem*) ) ); |
22 | connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, | 23 | connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
23 | SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) ); | 24 | SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) ); |
24 | setSorting(0); | 25 | setSorting(0); |
diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h index d236058..b082b1f 100644 --- a/noncore/net/mail/accountview.h +++ b/noncore/net/mail/accountview.h | |||
@@ -16,18 +16,18 @@ class MHviewItem; | |||
16 | class AccountView : public QListView | 16 | class AccountView : public QListView |
17 | { | 17 | { |
18 | Q_OBJECT | 18 | Q_OBJECT |
19 | 19 | ||
20 | public: | 20 | public: |
21 | AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); | 21 | AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); |
22 | virtual ~AccountView(); | 22 | virtual ~AccountView(); |
23 | virtual void populate( QList<Account> list ); | 23 | virtual void populate( QList<Account> list ); |
24 | virtual RecBody fetchBody(const Opie::OSmartPointer<RecMail>&aMail); | 24 | virtual RecBody fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail); |
25 | virtual void downloadMails(const Opie::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); | 25 | virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); |
26 | virtual bool currentisDraft(); | 26 | virtual bool currentisDraft(); |
27 | 27 | ||
28 | public slots: | 28 | public slots: |
29 | virtual void refreshAll(); | 29 | virtual void refreshAll(); |
30 | virtual void refresh(QListViewItem *item); | 30 | virtual void refresh(QListViewItem *item); |
31 | virtual void refreshCurrent(); | 31 | virtual void refreshCurrent(); |
32 | virtual void slotHold(int, QListViewItem *,const QPoint&,int); | 32 | virtual void slotHold(int, QListViewItem *,const QPoint&,int); |
33 | virtual void slotContextMenu(int id); | 33 | virtual void slotContextMenu(int id); |
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 74ccc7b..5bc2883 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp | |||
@@ -8,16 +8,18 @@ | |||
8 | 8 | ||
9 | #include "composemail.h" | 9 | #include "composemail.h" |
10 | 10 | ||
11 | #include <libmailwrapper/smtpwrapper.h> | 11 | #include <libmailwrapper/smtpwrapper.h> |
12 | #include <libmailwrapper/storemail.h> | 12 | #include <libmailwrapper/storemail.h> |
13 | #include <libmailwrapper/abstractmail.h> | 13 | #include <libmailwrapper/abstractmail.h> |
14 | #include <libmailwrapper/mailtypes.h> | 14 | #include <libmailwrapper/mailtypes.h> |
15 | 15 | ||
16 | using namespace Opie::Core; | ||
17 | using namespace Opie::Ui; | ||
16 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) | 18 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) |
17 | : ComposeMailUI( parent, name, modal, flags ) | 19 | : ComposeMailUI( parent, name, modal, flags ) |
18 | { | 20 | { |
19 | settings = s; | 21 | settings = s; |
20 | m_replyid = ""; | 22 | m_replyid = ""; |
21 | 23 | ||
22 | QString vfilename = Global::applicationFileName("addressbook", | 24 | QString vfilename = Global::applicationFileName("addressbook", |
23 | "businesscard.vcf"); | 25 | "businesscard.vcf"); |
@@ -155,17 +157,17 @@ void ComposeMail::slotAdjustColumns() | |||
155 | attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); | 157 | attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); |
156 | attList->setColumnWidth( 1, 80 ); | 158 | attList->setColumnWidth( 1, 80 ); |
157 | 159 | ||
158 | tabWidget->setCurrentPage( currPage ); | 160 | tabWidget->setCurrentPage( currPage ); |
159 | } | 161 | } |
160 | 162 | ||
161 | void ComposeMail::addAttachment() | 163 | void ComposeMail::addAttachment() |
162 | { | 164 | { |
163 | DocLnk lnk = Opie::OFileDialog::getOpenFileName( 1, "/" ); | 165 | DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" ); |
164 | if ( !lnk.name().isEmpty() ) { | 166 | if ( !lnk.name().isEmpty() ) { |
165 | Attachment *att = new Attachment( lnk ); | 167 | Attachment *att = new Attachment( lnk ); |
166 | (void) new AttachViewItem( attList, att ); | 168 | (void) new AttachViewItem( attList, att ); |
167 | } | 169 | } |
168 | } | 170 | } |
169 | 171 | ||
170 | void ComposeMail::removeAttachment() | 172 | void ComposeMail::removeAttachment() |
171 | { | 173 | { |
@@ -183,17 +185,17 @@ void ComposeMail::accept() | |||
183 | if ( checkBoxLater->isChecked() ) { | 185 | if ( checkBoxLater->isChecked() ) { |
184 | qDebug( "Send later" ); | 186 | qDebug( "Send later" ); |
185 | } | 187 | } |
186 | 188 | ||
187 | #if 0 | 189 | #if 0 |
188 | qDebug( "Sending Mail with " + | 190 | qDebug( "Sending Mail with " + |
189 | smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() ); | 191 | smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() ); |
190 | #endif | 192 | #endif |
191 | Opie::OSmartPointer<Mail> mail=new Mail; | 193 | Opie::Core::OSmartPointer<Mail> mail=new Mail; |
192 | 194 | ||
193 | SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); | 195 | SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); |
194 | mail->setMail(fromBox->currentText()); | 196 | mail->setMail(fromBox->currentText()); |
195 | 197 | ||
196 | if ( !toLine->text().isEmpty() ) { | 198 | if ( !toLine->text().isEmpty() ) { |
197 | mail->setTo( toLine->text() ); | 199 | mail->setTo( toLine->text() ); |
198 | } else { | 200 | } else { |
199 | QMessageBox::warning(0,tr("Sending mail"), | 201 | QMessageBox::warning(0,tr("Sending mail"), |
@@ -231,17 +233,17 @@ void ComposeMail::accept() | |||
231 | void ComposeMail::reject() | 233 | void ComposeMail::reject() |
232 | { | 234 | { |
233 | int yesno = QMessageBox::warning(0,tr("Store message"), | 235 | int yesno = QMessageBox::warning(0,tr("Store message"), |
234 | tr("Store message into drafts?"), | 236 | tr("Store message into drafts?"), |
235 | tr("Yes"), | 237 | tr("Yes"), |
236 | tr("No"),QString::null,0,1); | 238 | tr("No"),QString::null,0,1); |
237 | 239 | ||
238 | if (yesno == 0) { | 240 | if (yesno == 0) { |
239 | Opie::OSmartPointer<Mail> mail=new Mail(); | 241 | Opie::Core::OSmartPointer<Mail> mail=new Mail(); |
240 | mail->setMail(fromBox->currentText()); | 242 | mail->setMail(fromBox->currentText()); |
241 | mail->setTo( toLine->text() ); | 243 | mail->setTo( toLine->text() ); |
242 | mail->setName(senderNameEdit->text()); | 244 | mail->setName(senderNameEdit->text()); |
243 | mail->setCC( ccLine->text() ); | 245 | mail->setCC( ccLine->text() ); |
244 | mail->setBCC( bccLine->text() ); | 246 | mail->setBCC( bccLine->text() ); |
245 | mail->setReply( replyLine->text() ); | 247 | mail->setReply( replyLine->text() ); |
246 | mail->setSubject( subjectLine->text() ); | 248 | mail->setSubject( subjectLine->text() ); |
247 | if (!m_replyid.isEmpty()) { | 249 | if (!m_replyid.isEmpty()) { |
diff --git a/noncore/net/mail/composemail.h b/noncore/net/mail/composemail.h index c12eb30..4693927 100644 --- a/noncore/net/mail/composemail.h +++ b/noncore/net/mail/composemail.h | |||
@@ -32,17 +32,17 @@ class RecMail; | |||
32 | class ComposeMail : public ComposeMailUI | 32 | class ComposeMail : public ComposeMailUI |
33 | { | 33 | { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | 35 | ||
36 | public: | 36 | public: |
37 | ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); | 37 | ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); |
38 | virtual ~ComposeMail(); | 38 | virtual ~ComposeMail(); |
39 | 39 | ||
40 | void reEditMail(const Opie::OSmartPointer<RecMail>¤t); | 40 | void reEditMail(const Opie::Core::OSmartPointer<RecMail>¤t); |
41 | 41 | ||
42 | public slots: | 42 | public slots: |
43 | void slotAdjustColumns(); | 43 | void slotAdjustColumns(); |
44 | 44 | ||
45 | void setTo( const QString & to ); | 45 | void setTo( const QString & to ); |
46 | void setSubject( const QString & subject ); | 46 | void setSubject( const QString & subject ); |
47 | void setInReplyTo( const QString & messageId ); | 47 | void setInReplyTo( const QString & messageId ); |
48 | void setMessage( const QString & text ); | 48 | void setMessage( const QString & text ); |
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 68a7a4d..6bebb7b 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp | |||
@@ -6,16 +6,17 @@ | |||
6 | #include "mailtypes.h" | 6 | #include "mailtypes.h" |
7 | 7 | ||
8 | #include <qfile.h> | 8 | #include <qfile.h> |
9 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
11 | #include <libetpan/mailmime_content.h> | 11 | #include <libetpan/mailmime_content.h> |
12 | #include <libetpan/mailmime.h> | 12 | #include <libetpan/mailmime.h> |
13 | 13 | ||
14 | using namespace Opie::Core; | ||
14 | AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) | 15 | AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) |
15 | { | 16 | { |
16 | return new IMAPwrapper(a); | 17 | return new IMAPwrapper(a); |
17 | } | 18 | } |
18 | 19 | ||
19 | AbstractMail* AbstractMail::getWrapper(POP3account *a) | 20 | AbstractMail* AbstractMail::getWrapper(POP3account *a) |
20 | { | 21 | { |
21 | return new POP3wrapper(a); | 22 | return new POP3wrapper(a); |
@@ -124,17 +125,17 @@ QString AbstractMail::defaultLocalfolder() | |||
124 | } | 125 | } |
125 | 126 | ||
126 | QString AbstractMail::draftFolder() | 127 | QString AbstractMail::draftFolder() |
127 | { | 128 | { |
128 | return QString("Drafts"); | 129 | return QString("Drafts"); |
129 | } | 130 | } |
130 | 131 | ||
131 | /* temporary - will be removed when implemented in all classes */ | 132 | /* temporary - will be removed when implemented in all classes */ |
132 | void AbstractMail::deleteMails(const QString &,const QValueList<Opie::OSmartPointer<RecMail> > &) | 133 | void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &) |
133 | { | 134 | { |
134 | } | 135 | } |
135 | 136 | ||
136 | void AbstractMail::mvcpAllMails(const FolderP&fromFolder, | 137 | void AbstractMail::mvcpAllMails(const FolderP&fromFolder, |
137 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | 138 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) |
138 | { | 139 | { |
139 | QValueList<RecMailP> t; | 140 | QValueList<RecMailP> t; |
140 | listMessages(fromFolder->getName(),t); | 141 | listMessages(fromFolder->getName(),t); |
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index b03d757..2d55c83 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h | |||
@@ -16,43 +16,43 @@ class encodedString; | |||
16 | struct folderStat; | 16 | struct folderStat; |
17 | 17 | ||
18 | class AbstractMail:public QObject | 18 | class AbstractMail:public QObject |
19 | { | 19 | { |
20 | Q_OBJECT | 20 | Q_OBJECT |
21 | public: | 21 | public: |
22 | AbstractMail(){}; | 22 | AbstractMail(){}; |
23 | virtual ~AbstractMail(){} | 23 | virtual ~AbstractMail(){} |
24 | virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders()=0; | 24 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; |
25 | virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target )=0; | 25 | virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target )=0; |
26 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; | 26 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; |
27 | virtual RecBody fetchBody(const RecMailP&mail)=0; | 27 | virtual RecBody fetchBody(const RecMailP&mail)=0; |
28 | virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part)=0; | 28 | virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part)=0; |
29 | virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part)=0; | 29 | virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part)=0; |
30 | virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part)=0; | 30 | virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part)=0; |
31 | virtual encodedString* fetchRawBody(const RecMailP&mail)=0; | 31 | virtual encodedString* fetchRawBody(const RecMailP&mail)=0; |
32 | 32 | ||
33 | virtual void deleteMail(const RecMailP&mail)=0; | 33 | virtual void deleteMail(const RecMailP&mail)=0; |
34 | virtual void answeredMail(const RecMailP&mail)=0; | 34 | virtual void answeredMail(const RecMailP&mail)=0; |
35 | virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&)=0; | 35 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; |
36 | virtual void deleteMails(const QString & FolderName,const QValueList<Opie::OSmartPointer<RecMail> >&target); | 36 | virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> >&target); |
37 | virtual int deleteMbox(const Opie::OSmartPointer<Folder>&)=0; | 37 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; |
38 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; | 38 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; |
39 | 39 | ||
40 | virtual void mvcpAllMails(const Opie::OSmartPointer<Folder>&fromFolder, | 40 | virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, |
41 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 41 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
42 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 42 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
43 | 43 | ||
44 | virtual void cleanMimeCache(){}; | 44 | virtual void cleanMimeCache(){}; |
45 | /* mail box methods */ | 45 | /* mail box methods */ |
46 | /* parameter is the box to create. | 46 | /* parameter is the box to create. |
47 | * if the implementing subclass has prefixes, | 47 | * if the implementing subclass has prefixes, |
48 | * them has to be appended automatic. | 48 | * them has to be appended automatic. |
49 | */ | 49 | */ |
50 | virtual int createMbox(const QString&,const Opie::OSmartPointer<Folder>&parentfolder=0, | 50 | virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0, |
51 | const QString& delemiter="/",bool getsubfolder=false); | 51 | const QString& delemiter="/",bool getsubfolder=false); |
52 | virtual void logout()=0; | 52 | virtual void logout()=0; |
53 | 53 | ||
54 | static AbstractMail* getWrapper(IMAPaccount *a); | 54 | static AbstractMail* getWrapper(IMAPaccount *a); |
55 | static AbstractMail* getWrapper(POP3account *a); | 55 | static AbstractMail* getWrapper(POP3account *a); |
56 | static AbstractMail* getWrapper(NNTPaccount *a); | 56 | static AbstractMail* getWrapper(NNTPaccount *a); |
57 | /* mbox only! */ | 57 | /* mbox only! */ |
58 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); | 58 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); |
diff --git a/noncore/net/mail/libmailwrapper/generatemail.cpp b/noncore/net/mail/libmailwrapper/generatemail.cpp index cb7ccc0..cb58d82 100644 --- a/noncore/net/mail/libmailwrapper/generatemail.cpp +++ b/noncore/net/mail/libmailwrapper/generatemail.cpp | |||
@@ -1,15 +1,16 @@ | |||
1 | #include "generatemail.h" | 1 | #include "generatemail.h" |
2 | #include "mailwrapper.h" | 2 | #include "mailwrapper.h" |
3 | 3 | ||
4 | #include <libetpan/libetpan.h> | 4 | #include <libetpan/libetpan.h> |
5 | 5 | ||
6 | #include <qt.h> | 6 | #include <qt.h> |
7 | 7 | ||
8 | using namespace Opie::Core; | ||
8 | const char* Generatemail::USER_AGENT="OpieMail v0.6"; | 9 | const char* Generatemail::USER_AGENT="OpieMail v0.6"; |
9 | 10 | ||
10 | Generatemail::Generatemail() | 11 | Generatemail::Generatemail() |
11 | { | 12 | { |
12 | } | 13 | } |
13 | 14 | ||
14 | Generatemail::~Generatemail() | 15 | Generatemail::~Generatemail() |
15 | { | 16 | { |
@@ -274,17 +275,17 @@ err_free: | |||
274 | return NULL; // Error :( | 275 | return NULL; // Error :( |
275 | } | 276 | } |
276 | 277 | ||
277 | mailimf_mailbox *Generatemail::newMailbox(const QString&name, const QString&mail ) { | 278 | mailimf_mailbox *Generatemail::newMailbox(const QString&name, const QString&mail ) { |
278 | return mailimf_mailbox_new( strdup( name.latin1() ), | 279 | return mailimf_mailbox_new( strdup( name.latin1() ), |
279 | strdup( mail.latin1() ) ); | 280 | strdup( mail.latin1() ) ); |
280 | } | 281 | } |
281 | 282 | ||
282 | mailimf_fields *Generatemail::createImfFields(const Opie::OSmartPointer<Mail>&mail ) | 283 | mailimf_fields *Generatemail::createImfFields(const Opie::Core::OSmartPointer<Mail>&mail ) |
283 | { | 284 | { |
284 | mailimf_fields *fields = NULL; | 285 | mailimf_fields *fields = NULL; |
285 | mailimf_field *xmailer = NULL; | 286 | mailimf_field *xmailer = NULL; |
286 | mailimf_mailbox *sender=0,*fromBox=0; | 287 | mailimf_mailbox *sender=0,*fromBox=0; |
287 | mailimf_mailbox_list *from=0; | 288 | mailimf_mailbox_list *from=0; |
288 | mailimf_address_list *to=0, *cc=0, *bcc=0, *reply=0; | 289 | mailimf_address_list *to=0, *cc=0, *bcc=0, *reply=0; |
289 | clist*in_reply_to = 0; | 290 | clist*in_reply_to = 0; |
290 | char *subject = strdup( mail->getSubject().latin1() ); | 291 | char *subject = strdup( mail->getSubject().latin1() ); |
@@ -394,17 +395,17 @@ mailimf_fields *Generatemail::createImfFields(const Opie::OSmartPointer<Mail>&ma | |||
394 | if (subject) { | 395 | if (subject) { |
395 | free( subject ); | 396 | free( subject ); |
396 | } | 397 | } |
397 | } | 398 | } |
398 | } | 399 | } |
399 | return fields; | 400 | return fields; |
400 | } | 401 | } |
401 | 402 | ||
402 | mailmime *Generatemail::createMimeMail(const Opie::OSmartPointer<Mail> &mail ) { | 403 | mailmime *Generatemail::createMimeMail(const Opie::Core::OSmartPointer<Mail> &mail ) { |
403 | mailmime *message, *txtPart; | 404 | mailmime *message, *txtPart; |
404 | mailimf_fields *fields; | 405 | mailimf_fields *fields; |
405 | int err; | 406 | int err; |
406 | 407 | ||
407 | fields = createImfFields( mail ); | 408 | fields = createImfFields( mail ); |
408 | if ( fields == NULL ) | 409 | if ( fields == NULL ) |
409 | goto err_free; | 410 | goto err_free; |
410 | 411 | ||
diff --git a/noncore/net/mail/libmailwrapper/generatemail.h b/noncore/net/mail/libmailwrapper/generatemail.h index c246a2a..a767b61 100644 --- a/noncore/net/mail/libmailwrapper/generatemail.h +++ b/noncore/net/mail/libmailwrapper/generatemail.h | |||
@@ -31,16 +31,16 @@ protected: | |||
31 | static char *getFrom( mailmime *mail ); | 31 | static char *getFrom( mailmime *mail ); |
32 | static char *getFrom( mailimf_field *ffrom); | 32 | static char *getFrom( mailimf_field *ffrom); |
33 | static mailimf_field *getField( mailimf_fields *fields, int type ); | 33 | static mailimf_field *getField( mailimf_fields *fields, int type ); |
34 | mailimf_address_list *parseAddresses(const QString&addr ); | 34 | mailimf_address_list *parseAddresses(const QString&addr ); |
35 | void addFileParts( mailmime *message,const QList<Attachment>&files ); | 35 | void addFileParts( mailmime *message,const QList<Attachment>&files ); |
36 | mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); | 36 | mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); |
37 | mailmime *buildTxtPart(const QString&str ); | 37 | mailmime *buildTxtPart(const QString&str ); |
38 | mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); | 38 | mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); |
39 | mailimf_fields *createImfFields(const Opie::OSmartPointer<Mail> &mail ); | 39 | mailimf_fields *createImfFields(const Opie::Core::OSmartPointer<Mail> &mail ); |
40 | mailmime *createMimeMail(const Opie::OSmartPointer<Mail>&mail ); | 40 | mailmime *createMimeMail(const Opie::Core::OSmartPointer<Mail>&mail ); |
41 | clist *createRcptList( mailimf_fields *fields ); | 41 | clist *createRcptList( mailimf_fields *fields ); |
42 | 42 | ||
43 | static const char* USER_AGENT; | 43 | static const char* USER_AGENT; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | #endif | 46 | #endif |
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index ee2c8cd..f428415 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp | |||
@@ -1,12 +1,13 @@ | |||
1 | #include "genericwrapper.h" | 1 | #include "genericwrapper.h" |
2 | #include <libetpan/libetpan.h> | 2 | #include <libetpan/libetpan.h> |
3 | #include "mailtypes.h" | 3 | #include "mailtypes.h" |
4 | 4 | ||
5 | using namespace Opie::Core; | ||
5 | Genericwrapper::Genericwrapper() | 6 | Genericwrapper::Genericwrapper() |
6 | : AbstractMail() | 7 | : AbstractMail() |
7 | { | 8 | { |
8 | bodyCache.clear(); | 9 | bodyCache.clear(); |
9 | m_storage = 0; | 10 | m_storage = 0; |
10 | m_folder = 0; | 11 | m_folder = 0; |
11 | } | 12 | } |
12 | 13 | ||
@@ -382,17 +383,17 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) | |||
382 | } | 383 | } |
383 | if (h.length()>0) { | 384 | if (h.length()>0) { |
384 | res.append(h); | 385 | res.append(h); |
385 | } | 386 | } |
386 | } | 387 | } |
387 | return res; | 388 | return res; |
388 | } | 389 | } |
389 | 390 | ||
390 | void Genericwrapper::parseList(QValueList<Opie::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) | 391 | void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to) |
391 | { | 392 | { |
392 | int r; | 393 | int r; |
393 | mailmessage_list * env_list = 0; | 394 | mailmessage_list * env_list = 0; |
394 | r = mailsession_get_messages_list(session,&env_list); | 395 | r = mailsession_get_messages_list(session,&env_list); |
395 | if (r != MAIL_NO_ERROR) { | 396 | if (r != MAIL_NO_ERROR) { |
396 | qDebug("Error message list"); | 397 | qDebug("Error message list"); |
397 | return; | 398 | return; |
398 | } | 399 | } |
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.h b/noncore/net/mail/libmailwrapper/genericwrapper.h index f9968d1..f5b9504 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.h +++ b/noncore/net/mail/libmailwrapper/genericwrapper.h | |||
@@ -33,33 +33,33 @@ class Genericwrapper : public AbstractMail | |||
33 | public: | 33 | public: |
34 | Genericwrapper(); | 34 | Genericwrapper(); |
35 | virtual ~Genericwrapper(); | 35 | virtual ~Genericwrapper(); |
36 | 36 | ||
37 | virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part); | 37 | virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part); |
38 | virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part); | 38 | virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part); |
39 | virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part); | 39 | virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part); |
40 | virtual void cleanMimeCache(); | 40 | virtual void cleanMimeCache(); |
41 | virtual int deleteMbox(const Opie::OSmartPointer<Folder>&){return 1;} | 41 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&){return 1;} |
42 | virtual void logout(){}; | 42 | virtual void logout(){}; |
43 | virtual void storeMessage(const char*msg,size_t length, const QString&folder){}; | 43 | virtual void storeMessage(const char*msg,size_t length, const QString&folder){}; |
44 | 44 | ||
45 | protected: | 45 | protected: |
46 | RecBody parseMail( mailmessage * msg ); | 46 | RecBody parseMail( mailmessage * msg ); |
47 | QString parseMailboxList( mailimf_mailbox_list *list ); | 47 | QString parseMailboxList( mailimf_mailbox_list *list ); |
48 | QString parseMailbox( mailimf_mailbox *box ); | 48 | QString parseMailbox( mailimf_mailbox *box ); |
49 | QString parseGroup( mailimf_group *group ); | 49 | QString parseGroup( mailimf_group *group ); |
50 | QString parseAddressList( mailimf_address_list *list ); | 50 | QString parseAddressList( mailimf_address_list *list ); |
51 | QString parseDateTime( mailimf_date_time *date ); | 51 | QString parseDateTime( mailimf_date_time *date ); |
52 | 52 | ||
53 | void traverseBody(RecBody&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rek=0,int current_count=1); | 53 | void traverseBody(RecBody&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rek=0,int current_count=1); |
54 | static void fillSingleBody(RecPart&target,mailmessage*message,mailmime*mime); | 54 | static void fillSingleBody(RecPart&target,mailmessage*message,mailmime*mime); |
55 | static void fillParameters(RecPart&target,clist*parameters); | 55 | static void fillParameters(RecPart&target,clist*parameters); |
56 | static QString getencoding(mailmime_mechanism*aEnc); | 56 | static QString getencoding(mailmime_mechanism*aEnc); |
57 | virtual void parseList(QValueList<Opie::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false); | 57 | virtual void parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false); |
58 | QStringList parseInreplies(mailimf_in_reply_to * in_replies); | 58 | QStringList parseInreplies(mailimf_in_reply_to * in_replies); |
59 | 59 | ||
60 | QString msgTempName; | 60 | QString msgTempName; |
61 | unsigned int last_msg_id; | 61 | unsigned int last_msg_id; |
62 | QMap<QString,encodedString*> bodyCache; | 62 | QMap<QString,encodedString*> bodyCache; |
63 | mailstorage * m_storage; | 63 | mailstorage * m_storage; |
64 | mailfolder*m_folder; | 64 | mailfolder*m_folder; |
65 | }; | 65 | }; |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 071e734..56e7df9 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -1,16 +1,17 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <libetpan/libetpan.h> | 2 | #include <libetpan/libetpan.h> |
3 | #include <qpe/global.h> | 3 | #include <qpe/global.h> |
4 | 4 | ||
5 | #include "imapwrapper.h" | 5 | #include "imapwrapper.h" |
6 | #include "mailtypes.h" | 6 | #include "mailtypes.h" |
7 | #include "logindialog.h" | 7 | #include "logindialog.h" |
8 | 8 | ||
9 | using namespace Opie::Core; | ||
9 | IMAPwrapper::IMAPwrapper( IMAPaccount *a ) | 10 | IMAPwrapper::IMAPwrapper( IMAPaccount *a ) |
10 | : AbstractMail() | 11 | : AbstractMail() |
11 | { | 12 | { |
12 | account = a; | 13 | account = a; |
13 | m_imap = 0; | 14 | m_imap = 0; |
14 | m_Lastmbox = ""; | 15 | m_Lastmbox = ""; |
15 | } | 16 | } |
16 | 17 | ||
@@ -200,17 +201,17 @@ void IMAPwrapper::logout() | |||
200 | if (!m_imap) return; | 201 | if (!m_imap) return; |
201 | err = mailimap_logout( m_imap ); | 202 | err = mailimap_logout( m_imap ); |
202 | err = mailimap_close( m_imap ); | 203 | err = mailimap_close( m_imap ); |
203 | mailimap_free( m_imap ); | 204 | mailimap_free( m_imap ); |
204 | m_imap = 0; | 205 | m_imap = 0; |
205 | m_Lastmbox = ""; | 206 | m_Lastmbox = ""; |
206 | } | 207 | } |
207 | 208 | ||
208 | void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::OSmartPointer<RecMail> > &target ) | 209 | void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) |
209 | { | 210 | { |
210 | int err = MAILIMAP_NO_ERROR; | 211 | int err = MAILIMAP_NO_ERROR; |
211 | clist *result = 0; | 212 | clist *result = 0; |
212 | clistcell *current; | 213 | clistcell *current; |
213 | mailimap_fetch_type *fetchType = 0; | 214 | mailimap_fetch_type *fetchType = 0; |
214 | mailimap_set *set = 0; | 215 | mailimap_set *set = 0; |
215 | 216 | ||
216 | login(); | 217 | login(); |
@@ -261,17 +262,17 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::OSmartPoin | |||
261 | } | 262 | } |
262 | Global::statusMessage(tr("Mailbox has %1 mails").arg(target.count())); | 263 | Global::statusMessage(tr("Mailbox has %1 mails").arg(target.count())); |
263 | } else { | 264 | } else { |
264 | Global::statusMessage(tr("Error fetching headers: %1").arg(m_imap->imap_response)); | 265 | Global::statusMessage(tr("Error fetching headers: %1").arg(m_imap->imap_response)); |
265 | } | 266 | } |
266 | if (result) mailimap_fetch_list_free(result); | 267 | if (result) mailimap_fetch_list_free(result); |
267 | } | 268 | } |
268 | 269 | ||
269 | QValueList<Opie::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | 270 | QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() |
270 | { | 271 | { |
271 | const char *path, *mask; | 272 | const char *path, *mask; |
272 | int err = MAILIMAP_NO_ERROR; | 273 | int err = MAILIMAP_NO_ERROR; |
273 | clist *result = 0; | 274 | clist *result = 0; |
274 | clistcell *current = 0; | 275 | clistcell *current = 0; |
275 | clistcell*cur_flag = 0; | 276 | clistcell*cur_flag = 0; |
276 | mailimap_mbx_list_flags*bflags = 0; | 277 | mailimap_mbx_list_flags*bflags = 0; |
277 | 278 | ||
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index 3bd5967..7448acb 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h | |||
@@ -18,37 +18,37 @@ struct mailimap_msg_att; | |||
18 | class encodedString; | 18 | class encodedString; |
19 | 19 | ||
20 | class IMAPwrapper : public AbstractMail | 20 | class IMAPwrapper : public AbstractMail |
21 | { | 21 | { |
22 | Q_OBJECT | 22 | Q_OBJECT |
23 | public: | 23 | public: |
24 | IMAPwrapper( IMAPaccount *a ); | 24 | IMAPwrapper( IMAPaccount *a ); |
25 | virtual ~IMAPwrapper(); | 25 | virtual ~IMAPwrapper(); |
26 | virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); | 26 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
27 | virtual void listMessages(const QString & mailbox,QValueList<Opie::OSmartPointer<RecMail> >&target ); | 27 | virtual void listMessages(const QString & mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); |
28 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 28 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
29 | 29 | ||
30 | virtual void deleteMail(const RecMailP&mail); | 30 | virtual void deleteMail(const RecMailP&mail); |
31 | virtual void answeredMail(const RecMailP&mail); | 31 | virtual void answeredMail(const RecMailP&mail); |
32 | virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&folder); | 32 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder); |
33 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); | 33 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); |
34 | virtual void mvcpAllMails(const Opie::OSmartPointer<Folder>&fromFolder, | 34 | virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, |
35 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 35 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
36 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 36 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
37 | 37 | ||
38 | virtual RecBody fetchBody(const RecMailP&mail); | 38 | virtual RecBody fetchBody(const RecMailP&mail); |
39 | virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part); | 39 | virtual QString fetchTextPart(const RecMailP&mail,const RecPart&part); |
40 | virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part); | 40 | virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPart&part); |
41 | virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part); | 41 | virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPart&part); |
42 | virtual encodedString* fetchRawBody(const RecMailP&mail); | 42 | virtual encodedString* fetchRawBody(const RecMailP&mail); |
43 | 43 | ||
44 | virtual int createMbox(const QString&,const Opie::OSmartPointer<Folder>&parentfolder=0, | 44 | virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0, |
45 | const QString& delemiter="/",bool getsubfolder=false); | 45 | const QString& delemiter="/",bool getsubfolder=false); |
46 | virtual int deleteMbox(const Opie::OSmartPointer<Folder>&folder); | 46 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&folder); |
47 | 47 | ||
48 | static void imap_progress( size_t current, size_t maximum ); | 48 | static void imap_progress( size_t current, size_t maximum ); |
49 | 49 | ||
50 | virtual void logout(); | 50 | virtual void logout(); |
51 | virtual MAILLIB::ATYPE getType()const; | 51 | virtual MAILLIB::ATYPE getType()const; |
52 | virtual const QString&getName()const; | 52 | virtual const QString&getName()const; |
53 | 53 | ||
54 | protected: | 54 | protected: |
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index 7dd7e58..fd91fe5 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp | |||
@@ -1,19 +1,20 @@ | |||
1 | #include "mailtypes.h" | 1 | #include "mailtypes.h" |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | 3 | ||
4 | using namespace Opie::Core; | ||
4 | RecMail::RecMail() | 5 | RecMail::RecMail() |
5 | :Opie::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) | 6 | :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) |
6 | { | 7 | { |
7 | init(); | 8 | init(); |
8 | } | 9 | } |
9 | 10 | ||
10 | RecMail::RecMail(const RecMail&old) | 11 | RecMail::RecMail(const RecMail&old) |
11 | :Opie::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) | 12 | :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) |
12 | { | 13 | { |
13 | init(); | 14 | init(); |
14 | copy_old(old); | 15 | copy_old(old); |
15 | qDebug("Copy constructor RecMail"); | 16 | qDebug("Copy constructor RecMail"); |
16 | } | 17 | } |
17 | 18 | ||
18 | RecMail::~RecMail() | 19 | RecMail::~RecMail() |
19 | { | 20 | { |
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h index dc10de6..941556a 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.h +++ b/noncore/net/mail/libmailwrapper/mailtypes.h | |||
@@ -24,17 +24,17 @@ class AbstractMail; | |||
24 | But: not from the point of view of the device. | 24 | But: not from the point of view of the device. |
25 | Mailbodies can be real large. So we request them when | 25 | Mailbodies can be real large. So we request them when |
26 | needed from the mail-wrapper class direct from the server itself | 26 | needed from the mail-wrapper class direct from the server itself |
27 | (imap) or from a file-based cache (pop3?) | 27 | (imap) or from a file-based cache (pop3?) |
28 | So there is no interface "const QString&body()" but you should | 28 | So there is no interface "const QString&body()" but you should |
29 | make a request to the mailwrapper with this class as parameter to | 29 | make a request to the mailwrapper with this class as parameter to |
30 | get the body. Same words for the attachments. | 30 | get the body. Same words for the attachments. |
31 | */ | 31 | */ |
32 | class RecMail:public Opie::ORefCount | 32 | class RecMail:public Opie::Core::ORefCount |
33 | { | 33 | { |
34 | public: | 34 | public: |
35 | RecMail(); | 35 | RecMail(); |
36 | RecMail(const RecMail&old); | 36 | RecMail(const RecMail&old); |
37 | virtual ~RecMail(); | 37 | virtual ~RecMail(); |
38 | 38 | ||
39 | const unsigned int getNumber()const{return msg_number;} | 39 | const unsigned int getNumber()const{return msg_number;} |
40 | void setNumber(unsigned int number){msg_number=number;} | 40 | void setNumber(unsigned int number){msg_number=number;} |
@@ -76,17 +76,17 @@ protected: | |||
76 | unsigned int msg_number,msg_size; | 76 | unsigned int msg_number,msg_size; |
77 | QBitArray msg_flags; | 77 | QBitArray msg_flags; |
78 | QStringList to,cc,bcc,in_reply_to,references; | 78 | QStringList to,cc,bcc,in_reply_to,references; |
79 | AbstractMail*wrapper; | 79 | AbstractMail*wrapper; |
80 | void init(); | 80 | void init(); |
81 | void copy_old(const RecMail&old); | 81 | void copy_old(const RecMail&old); |
82 | }; | 82 | }; |
83 | 83 | ||
84 | typedef Opie::OSmartPointer<RecMail> RecMailP; | 84 | typedef Opie::Core::OSmartPointer<RecMail> RecMailP; |
85 | typedef QMap<QString,QString> part_plist_t; | 85 | typedef QMap<QString,QString> part_plist_t; |
86 | 86 | ||
87 | class RecPart | 87 | class RecPart |
88 | { | 88 | { |
89 | protected: | 89 | protected: |
90 | QString m_type,m_subtype,m_identifier,m_encoding,m_description; | 90 | QString m_type,m_subtype,m_identifier,m_encoding,m_description; |
91 | unsigned int m_lines,m_size; | 91 | unsigned int m_lines,m_size; |
92 | part_plist_t m_Parameters; | 92 | part_plist_t m_Parameters; |
diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.cpp b/noncore/net/mail/libmailwrapper/mailwrapper.cpp index 9bf2fd3..eddc0b9 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mailwrapper.cpp | |||
@@ -16,16 +16,17 @@ | |||
16 | #define UTF16SHIFT 10 | 16 | #define UTF16SHIFT 10 |
17 | #define UTF16BASE 0x10000UL | 17 | #define UTF16BASE 0x10000UL |
18 | #define UTF16HIGHSTART 0xD800UL | 18 | #define UTF16HIGHSTART 0xD800UL |
19 | #define UTF16HIGHEND 0xDBFFUL | 19 | #define UTF16HIGHEND 0xDBFFUL |
20 | #define UTF16LOSTART 0xDC00UL | 20 | #define UTF16LOSTART 0xDC00UL |
21 | #define UTF16LOEND 0xDFFFUL | 21 | #define UTF16LOEND 0xDFFFUL |
22 | 22 | ||
23 | 23 | ||
24 | using namespace Opie::Core; | ||
24 | Attachment::Attachment( DocLnk lnk ) | 25 | Attachment::Attachment( DocLnk lnk ) |
25 | { | 26 | { |
26 | doc = lnk; | 27 | doc = lnk; |
27 | size = QFileInfo( doc.file() ).size(); | 28 | size = QFileInfo( doc.file() ).size(); |
28 | } | 29 | } |
29 | 30 | ||
30 | Folder::Folder(const QString&tmp_name, const QString&sep ) | 31 | Folder::Folder(const QString&tmp_name, const QString&sep ) |
31 | { | 32 | { |
@@ -150,17 +151,17 @@ QString IMAPFolder::decodeFolderName( const QString &name ) | |||
150 | ++srcPtr; | 151 | ++srcPtr; |
151 | } | 152 | } |
152 | } | 153 | } |
153 | 154 | ||
154 | return QString::fromUtf8( dst.data() ); | 155 | return QString::fromUtf8( dst.data() ); |
155 | } | 156 | } |
156 | 157 | ||
157 | Mail::Mail() | 158 | Mail::Mail() |
158 | :Opie::ORefCount(),name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") | 159 | :Opie::Core::ORefCount(),name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") |
159 | { | 160 | { |
160 | } | 161 | } |
161 | 162 | ||
162 | MHFolder::MHFolder(const QString&disp_name,const QString&mbox) | 163 | MHFolder::MHFolder(const QString&disp_name,const QString&mbox) |
163 | : Folder( disp_name,"/" ) | 164 | : Folder( disp_name,"/" ) |
164 | { | 165 | { |
165 | separator = "/"; | 166 | separator = "/"; |
166 | name = mbox; | 167 | name = mbox; |
diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.h b/noncore/net/mail/libmailwrapper/mailwrapper.h index 6bf0078..542de03 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.h +++ b/noncore/net/mail/libmailwrapper/mailwrapper.h | |||
@@ -23,17 +23,17 @@ public: | |||
23 | DocLnk getDocLnk() { return doc; } | 23 | DocLnk getDocLnk() { return doc; } |
24 | 24 | ||
25 | protected: | 25 | protected: |
26 | DocLnk doc; | 26 | DocLnk doc; |
27 | int size; | 27 | int size; |
28 | 28 | ||
29 | }; | 29 | }; |
30 | 30 | ||
31 | class Mail:public Opie::ORefCount | 31 | class Mail:public Opie::Core::ORefCount |
32 | { | 32 | { |
33 | public: | 33 | public: |
34 | Mail(); | 34 | Mail(); |
35 | /* Possible that this destructor must not be declared virtual | 35 | /* Possible that this destructor must not be declared virtual |
36 | * 'cause it seems that it will never have some child classes. | 36 | * 'cause it seems that it will never have some child classes. |
37 | * in this case this object will not get a virtual table -> memory and | 37 | * in this case this object will not get a virtual table -> memory and |
38 | * speed will be a little bit better? | 38 | * speed will be a little bit better? |
39 | */ | 39 | */ |
@@ -61,33 +61,33 @@ public: | |||
61 | const QStringList&Inreply()const{return m_in_reply_to;} | 61 | const QStringList&Inreply()const{return m_in_reply_to;} |
62 | 62 | ||
63 | private: | 63 | private: |
64 | QList<Attachment> attList; | 64 | QList<Attachment> attList; |
65 | QString name, mail, to, cc, bcc, reply, subject, message; | 65 | QString name, mail, to, cc, bcc, reply, subject, message; |
66 | QStringList m_in_reply_to; | 66 | QStringList m_in_reply_to; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | class Folder:public Opie::ORefCount | 69 | class Folder:public Opie::Core::ORefCount |
70 | { | 70 | { |
71 | public: | 71 | public: |
72 | Folder( const QString&init_name,const QString&sep ); | 72 | Folder( const QString&init_name,const QString&sep ); |
73 | virtual ~Folder(); | 73 | virtual ~Folder(); |
74 | const QString&getDisplayName()const { return nameDisplay; } | 74 | const QString&getDisplayName()const { return nameDisplay; } |
75 | const QString&getName()const { return name; } | 75 | const QString&getName()const { return name; } |
76 | const QString&getPrefix()const{return prefix; } | 76 | const QString&getPrefix()const{return prefix; } |
77 | virtual bool may_select()const{return true;} | 77 | virtual bool may_select()const{return true;} |
78 | virtual bool no_inferior()const{return true;} | 78 | virtual bool no_inferior()const{return true;} |
79 | const QString&Separator()const; | 79 | const QString&Separator()const; |
80 | 80 | ||
81 | protected: | 81 | protected: |
82 | QString nameDisplay, name, separator,prefix; | 82 | QString nameDisplay, name, separator,prefix; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | typedef Opie::OSmartPointer<Folder> FolderP; | 85 | typedef Opie::Core::OSmartPointer<Folder> FolderP; |
86 | 86 | ||
87 | class MHFolder : public Folder | 87 | class MHFolder : public Folder |
88 | { | 88 | { |
89 | public: | 89 | public: |
90 | MHFolder(const QString&disp_name,const QString&mbox); | 90 | MHFolder(const QString&disp_name,const QString&mbox); |
91 | virtual ~MHFolder(); | 91 | virtual ~MHFolder(); |
92 | }; | 92 | }; |
93 | 93 | ||
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index 5e6b714..4aee0be 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp | |||
@@ -1,16 +1,17 @@ | |||
1 | #include "mboxwrapper.h" | 1 | #include "mboxwrapper.h" |
2 | #include "mailtypes.h" | 2 | #include "mailtypes.h" |
3 | #include "mailwrapper.h" | 3 | #include "mailwrapper.h" |
4 | #include <libetpan/libetpan.h> | 4 | #include <libetpan/libetpan.h> |
5 | #include <qdir.h> | 5 | #include <qdir.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <qpe/global.h> | 7 | #include <qpe/global.h> |
8 | 8 | ||
9 | using namespace Opie::Core; | ||
9 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir,const QString&mbox_name) | 10 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir,const QString&mbox_name) |
10 | : Genericwrapper(),MBOXPath(mbox_dir),MBOXName(mbox_name) | 11 | : Genericwrapper(),MBOXPath(mbox_dir),MBOXName(mbox_name) |
11 | { | 12 | { |
12 | QDir dir(MBOXPath); | 13 | QDir dir(MBOXPath); |
13 | if (!dir.exists()) { | 14 | if (!dir.exists()) { |
14 | dir.mkdir(MBOXPath); | 15 | dir.mkdir(MBOXPath); |
15 | } | 16 | } |
16 | } | 17 | } |
@@ -39,19 +40,19 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta | |||
39 | parseList(target,folder->fld_session,mailbox); | 40 | parseList(target,folder->fld_session,mailbox); |
40 | 41 | ||
41 | mailfolder_disconnect(folder); | 42 | mailfolder_disconnect(folder); |
42 | mailfolder_free(folder); | 43 | mailfolder_free(folder); |
43 | mailstorage_free(storage); | 44 | mailstorage_free(storage); |
44 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); | 45 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); |
45 | } | 46 | } |
46 | 47 | ||
47 | QValueList<Opie::OSmartPointer<Folder> >* MBOXwrapper::listFolders() | 48 | QValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() |
48 | { | 49 | { |
49 | QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<Opie::OSmartPointer<Folder> >(); | 50 | QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); |
50 | QDir dir(MBOXPath); | 51 | QDir dir(MBOXPath); |
51 | if (!dir.exists()) return folders; | 52 | if (!dir.exists()) return folders; |
52 | dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); | 53 | dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); |
53 | QStringList entries = dir.entryList(); | 54 | QStringList entries = dir.entryList(); |
54 | QStringList::ConstIterator it = entries.begin(); | 55 | QStringList::ConstIterator it = entries.begin(); |
55 | for (;it!=entries.end();++it) { | 56 | for (;it!=entries.end();++it) { |
56 | FolderP inb=new Folder(*it,"/"); | 57 | FolderP inb=new Folder(*it,"/"); |
57 | folders->append(inb); | 58 | folders->append(inb); |
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.h b/noncore/net/mail/libmailwrapper/mboxwrapper.h index 33eeb1e..a2ecfee 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.h +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.h | |||
@@ -11,34 +11,34 @@ class MBOXwrapper : public Genericwrapper | |||
11 | { | 11 | { |
12 | Q_OBJECT | 12 | Q_OBJECT |
13 | 13 | ||
14 | public: | 14 | public: |
15 | MBOXwrapper(const QString & dir,const QString&name); | 15 | MBOXwrapper(const QString & dir,const QString&name); |
16 | virtual ~MBOXwrapper(); | 16 | virtual ~MBOXwrapper(); |
17 | 17 | ||
18 | virtual void listMessages(const QString & mailbox, QValueList<RecMailP>&target ); | 18 | virtual void listMessages(const QString & mailbox, QValueList<RecMailP>&target ); |
19 | virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); | 19 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
20 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 20 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
21 | 21 | ||
22 | virtual void deleteMail(const RecMailP&mail); | 22 | virtual void deleteMail(const RecMailP&mail); |
23 | virtual void answeredMail(const RecMailP&mail); | 23 | virtual void answeredMail(const RecMailP&mail); |
24 | 24 | ||
25 | virtual int createMbox(const QString&folder,const Opie::OSmartPointer<Folder>&f=0, | 25 | virtual int createMbox(const QString&folder,const Opie::Core::OSmartPointer<Folder>&f=0, |
26 | const QString&d="",bool s=false); | 26 | const QString&d="",bool s=false); |
27 | virtual int deleteMbox(const Opie::OSmartPointer<Folder>&); | 27 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&); |
28 | 28 | ||
29 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); | 29 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); |
30 | 30 | ||
31 | virtual RecBody fetchBody( const RecMailP &mail ); | 31 | virtual RecBody fetchBody( const RecMailP &mail ); |
32 | static void mbox_progress( size_t current, size_t maximum ); | 32 | static void mbox_progress( size_t current, size_t maximum ); |
33 | 33 | ||
34 | virtual encodedString* fetchRawBody(const RecMailP&mail); | 34 | virtual encodedString* fetchRawBody(const RecMailP&mail); |
35 | virtual void deleteMails(const QString & FolderName,const QValueList<RecMailP> &target); | 35 | virtual void deleteMails(const QString & FolderName,const QValueList<RecMailP> &target); |
36 | virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&); | 36 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); |
37 | virtual MAILLIB::ATYPE getType()const; | 37 | virtual MAILLIB::ATYPE getType()const; |
38 | virtual const QString&getName()const; | 38 | virtual const QString&getName()const; |
39 | 39 | ||
40 | protected: | 40 | protected: |
41 | static void deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target); | 41 | static void deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target); |
42 | QString MBOXPath; | 42 | QString MBOXPath; |
43 | QString MBOXName; | 43 | QString MBOXName; |
44 | }; | 44 | }; |
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index 0b00a2e..21e24a0 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp | |||
@@ -3,16 +3,19 @@ | |||
3 | #include "mailwrapper.h" | 3 | #include "mailwrapper.h" |
4 | #include <libetpan/libetpan.h> | 4 | #include <libetpan/libetpan.h> |
5 | #include <qdir.h> | 5 | #include <qdir.h> |
6 | #include <qmessagebox.h> | 6 | #include <qmessagebox.h> |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <qpe/global.h> | 8 | #include <qpe/global.h> |
9 | #include <opie2/oprocess.h> | 9 | #include <opie2/oprocess.h> |
10 | 10 | ||
11 | using namespace Opie::Core; | ||
12 | using namespace Opie::Core; | ||
13 | using namespace Opie::Core; | ||
11 | MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) | 14 | MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) |
12 | : Genericwrapper(),MHPath(mbox_dir),MHName(mbox_name) | 15 | : Genericwrapper(),MHPath(mbox_dir),MHName(mbox_name) |
13 | { | 16 | { |
14 | if (MHPath.length()>0) { | 17 | if (MHPath.length()>0) { |
15 | if (MHPath[MHPath.length()-1]=='/') { | 18 | if (MHPath[MHPath.length()-1]=='/') { |
16 | MHPath=MHPath.left(MHPath.length()-1); | 19 | MHPath=MHPath.left(MHPath.length()-1); |
17 | } | 20 | } |
18 | qDebug(MHPath); | 21 | qDebug(MHPath); |
@@ -55,35 +58,35 @@ void MHwrapper::clean_storage() | |||
55 | } | 58 | } |
56 | } | 59 | } |
57 | 60 | ||
58 | MHwrapper::~MHwrapper() | 61 | MHwrapper::~MHwrapper() |
59 | { | 62 | { |
60 | clean_storage(); | 63 | clean_storage(); |
61 | } | 64 | } |
62 | 65 | ||
63 | void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ) | 66 | void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) |
64 | { | 67 | { |
65 | init_storage(); | 68 | init_storage(); |
66 | if (!m_storage) { | 69 | if (!m_storage) { |
67 | return; | 70 | return; |
68 | } | 71 | } |
69 | QString f = buildPath(mailbox); | 72 | QString f = buildPath(mailbox); |
70 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); | 73 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); |
71 | if (r!=MAIL_NO_ERROR) { | 74 | if (r!=MAIL_NO_ERROR) { |
72 | qDebug("listMessages: error selecting folder!"); | 75 | qDebug("listMessages: error selecting folder!"); |
73 | return; | 76 | return; |
74 | } | 77 | } |
75 | parseList(target,m_storage->sto_session,f); | 78 | parseList(target,m_storage->sto_session,f); |
76 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); | 79 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); |
77 | } | 80 | } |
78 | 81 | ||
79 | QValueList<Opie::OSmartPointer<Folder> >* MHwrapper::listFolders() | 82 | QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() |
80 | { | 83 | { |
81 | QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<Opie::OSmartPointer<Folder> >(); | 84 | QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); |
82 | /* this is needed! */ | 85 | /* this is needed! */ |
83 | if (m_storage) mailstorage_disconnect(m_storage); | 86 | if (m_storage) mailstorage_disconnect(m_storage); |
84 | init_storage(); | 87 | init_storage(); |
85 | if (!m_storage) { | 88 | if (!m_storage) { |
86 | return folders; | 89 | return folders; |
87 | } | 90 | } |
88 | mail_list*flist = 0; | 91 | mail_list*flist = 0; |
89 | clistcell*current=0; | 92 | clistcell*current=0; |
@@ -312,19 +315,19 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) | |||
312 | } | 315 | } |
313 | QString cmd = "rm -rf "+tfolder->getName(); | 316 | QString cmd = "rm -rf "+tfolder->getName(); |
314 | QStringList command; | 317 | QStringList command; |
315 | command << "/bin/sh"; | 318 | command << "/bin/sh"; |
316 | command << "-c"; | 319 | command << "-c"; |
317 | command << cmd.latin1(); | 320 | command << cmd.latin1(); |
318 | OProcess *process = new OProcess(); | 321 | OProcess *process = new OProcess(); |
319 | 322 | ||
320 | connect(process, SIGNAL(processExited(OProcess*)), | 323 | connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), |
321 | this, SLOT( processEnded(OProcess*))); | 324 | this, SLOT( processEnded(OProcess*))); |
322 | connect(process, SIGNAL( receivedStderr(OProcess*,char*,int)), | 325 | connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), |
323 | this, SLOT( oprocessStderr(OProcess*,char*,int))); | 326 | this, SLOT( oprocessStderr(OProcess*,char*,int))); |
324 | 327 | ||
325 | *process << command; | 328 | *process << command; |
326 | removeMboxfailed = false; | 329 | removeMboxfailed = false; |
327 | if(!process->start(OProcess::Block, OProcess::All) ) { | 330 | if(!process->start(OProcess::Block, OProcess::All) ) { |
328 | qDebug("could not start process"); | 331 | qDebug("could not start process"); |
329 | return 0; | 332 | return 0; |
330 | } | 333 | } |
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.h b/noncore/net/mail/libmailwrapper/mhwrapper.h index 208cf2f..1245507 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.h +++ b/noncore/net/mail/libmailwrapper/mhwrapper.h | |||
@@ -3,54 +3,54 @@ | |||
3 | 3 | ||
4 | #include "maildefines.h" | 4 | #include "maildefines.h" |
5 | 5 | ||
6 | #include "genericwrapper.h" | 6 | #include "genericwrapper.h" |
7 | #include <qstring.h> | 7 | #include <qstring.h> |
8 | 8 | ||
9 | class encodedString; | 9 | class encodedString; |
10 | struct mailmbox_folder; | 10 | struct mailmbox_folder; |
11 | class OProcess; | 11 | namespace Opie {namespace Core {class Opie::Core::OProcess;}} |
12 | 12 | ||
13 | class MHwrapper : public Genericwrapper | 13 | class MHwrapper : public Genericwrapper |
14 | { | 14 | { |
15 | Q_OBJECT | 15 | Q_OBJECT |
16 | public: | 16 | public: |
17 | MHwrapper(const QString & dir,const QString&name); | 17 | MHwrapper(const QString & dir,const QString&name); |
18 | virtual ~MHwrapper(); | 18 | virtual ~MHwrapper(); |
19 | 19 | ||
20 | virtual void listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ); | 20 | virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ); |
21 | virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); | 21 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
22 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 22 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
23 | 23 | ||
24 | virtual void deleteMail(const RecMailP&mail); | 24 | virtual void deleteMail(const RecMailP&mail); |
25 | virtual void answeredMail(const RecMailP&mail); | 25 | virtual void answeredMail(const RecMailP&mail); |
26 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 26 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
27 | virtual void mvcpAllMails(const Opie::OSmartPointer<Folder>&fromFolder, | 27 | virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, |
28 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 28 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
29 | 29 | ||
30 | virtual int createMbox(const QString&folder,const Opie::OSmartPointer<Folder>&f=0, | 30 | virtual int createMbox(const QString&folder,const Opie::Core::OSmartPointer<Folder>&f=0, |
31 | const QString&d="",bool s=false); | 31 | const QString&d="",bool s=false); |
32 | virtual int deleteMbox(const Opie::OSmartPointer<Folder>&); | 32 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&); |
33 | 33 | ||
34 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); | 34 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); |
35 | 35 | ||
36 | virtual RecBody fetchBody( const RecMailP &mail ); | 36 | virtual RecBody fetchBody( const RecMailP &mail ); |
37 | static void mbox_progress( size_t current, size_t maximum ); | 37 | static void mbox_progress( size_t current, size_t maximum ); |
38 | 38 | ||
39 | virtual encodedString* fetchRawBody(const RecMailP&mail); | 39 | virtual encodedString* fetchRawBody(const RecMailP&mail); |
40 | virtual void deleteMails(const QString & FolderName,const QValueList<Opie::OSmartPointer<RecMail> > &target); | 40 | virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> > &target); |
41 | virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&); | 41 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); |
42 | virtual MAILLIB::ATYPE getType()const; | 42 | virtual MAILLIB::ATYPE getType()const; |
43 | virtual const QString&getName()const; | 43 | virtual const QString&getName()const; |
44 | 44 | ||
45 | public slots: | 45 | public slots: |
46 | /* for deleting maildirs we are using a system call */ | 46 | /* for deleting maildirs we are using a system call */ |
47 | virtual void oprocessStderr(OProcess*, char *buffer, int ); | 47 | virtual void oprocessStderr(Opie::Core::OProcess*, char *buffer, int ); |
48 | virtual void processEnded(OProcess *); | 48 | virtual void processEnded(Opie::Core::OProcess *); |
49 | protected: | 49 | protected: |
50 | QString buildPath(const QString&p); | 50 | QString buildPath(const QString&p); |
51 | QString MHPath; | 51 | QString MHPath; |
52 | QString MHName; | 52 | QString MHName; |
53 | 53 | ||
54 | void init_storage(); | 54 | void init_storage(); |
55 | void clean_storage(); | 55 | void clean_storage(); |
56 | 56 | ||
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp index c0b3eec..9de958d 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp | |||
@@ -6,16 +6,17 @@ | |||
6 | 6 | ||
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | 8 | ||
9 | #include <libetpan/libetpan.h> | 9 | #include <libetpan/libetpan.h> |
10 | 10 | ||
11 | 11 | ||
12 | #define HARD_MSG_SIZE_LIMIT 5242880 | 12 | #define HARD_MSG_SIZE_LIMIT 5242880 |
13 | 13 | ||
14 | using namespace Opie::Core; | ||
14 | NNTPwrapper::NNTPwrapper( NNTPaccount *a ) | 15 | NNTPwrapper::NNTPwrapper( NNTPaccount *a ) |
15 | : Genericwrapper() { | 16 | : Genericwrapper() { |
16 | account = a; | 17 | account = a; |
17 | m_nntp = NULL; | 18 | m_nntp = NULL; |
18 | msgTempName = a->getFileName()+"_msg_cache"; | 19 | msgTempName = a->getFileName()+"_msg_cache"; |
19 | last_msg_id = 0; | 20 | last_msg_id = 0; |
20 | } | 21 | } |
21 | 22 | ||
@@ -91,17 +92,17 @@ RecBody NNTPwrapper::fetchBody( const RecMailP &mail ) { | |||
91 | mailmessage_free(mailmsg); | 92 | mailmessage_free(mailmsg); |
92 | if (message) | 93 | if (message) |
93 | free(message); | 94 | free(message); |
94 | 95 | ||
95 | return body; | 96 | return body; |
96 | } | 97 | } |
97 | 98 | ||
98 | 99 | ||
99 | void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::OSmartPointer<RecMail> > &target ) | 100 | void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) |
100 | { | 101 | { |
101 | login(); | 102 | login(); |
102 | if (!m_nntp) | 103 | if (!m_nntp) |
103 | return; | 104 | return; |
104 | uint32_t res_messages,res_recent,res_unseen; | 105 | uint32_t res_messages,res_recent,res_unseen; |
105 | mailsession_status_folder(m_nntp->sto_session,(char*)which.latin1(),&res_messages,&res_recent,&res_unseen); | 106 | mailsession_status_folder(m_nntp->sto_session,(char*)which.latin1(),&res_messages,&res_recent,&res_unseen); |
106 | parseList(target,m_nntp->sto_session,which,true); | 107 | parseList(target,m_nntp->sto_session,which,true); |
107 | } | 108 | } |
@@ -183,19 +184,19 @@ void NNTPwrapper::logout() | |||
183 | { | 184 | { |
184 | int err = NEWSNNTP_NO_ERROR; | 185 | int err = NEWSNNTP_NO_ERROR; |
185 | if ( m_nntp == NULL ) | 186 | if ( m_nntp == NULL ) |
186 | return; | 187 | return; |
187 | mailstorage_free(m_nntp); | 188 | mailstorage_free(m_nntp); |
188 | m_nntp = 0; | 189 | m_nntp = 0; |
189 | } | 190 | } |
190 | 191 | ||
191 | QValueList<Opie::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { | 192 | QValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { |
192 | 193 | ||
193 | QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<Opie::OSmartPointer<Folder> >(); | 194 | QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); |
194 | QStringList groups; | 195 | QStringList groups; |
195 | if (account) { | 196 | if (account) { |
196 | groups = account->getGroups(); | 197 | groups = account->getGroups(); |
197 | } | 198 | } |
198 | for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) { | 199 | for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) { |
199 | folders->append(new Folder((*it),".")); | 200 | folders->append(new Folder((*it),".")); |
200 | } | 201 | } |
201 | return folders; | 202 | return folders; |
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.h b/noncore/net/mail/libmailwrapper/nntpwrapper.h index a7e4b95..a87a8e8 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.h +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.h | |||
@@ -15,25 +15,25 @@ class NNTPwrapper : public Genericwrapper | |||
15 | 15 | ||
16 | Q_OBJECT | 16 | Q_OBJECT |
17 | 17 | ||
18 | public: | 18 | public: |
19 | NNTPwrapper( NNTPaccount *a ); | 19 | NNTPwrapper( NNTPaccount *a ); |
20 | virtual ~NNTPwrapper(); | 20 | virtual ~NNTPwrapper(); |
21 | 21 | ||
22 | /* mailbox will be ignored */ | 22 | /* mailbox will be ignored */ |
23 | virtual void listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ); | 23 | virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ); |
24 | /* should only get the subscribed one */ | 24 | /* should only get the subscribed one */ |
25 | virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); | 25 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
26 | /* mailbox will be ignored */ | 26 | /* mailbox will be ignored */ |
27 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 27 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
28 | QStringList listAllNewsgroups(const QString&mask = QString::null); | 28 | QStringList listAllNewsgroups(const QString&mask = QString::null); |
29 | virtual void deleteMail(const RecMailP&mail); | 29 | virtual void deleteMail(const RecMailP&mail); |
30 | virtual void answeredMail(const RecMailP&mail); | 30 | virtual void answeredMail(const RecMailP&mail); |
31 | virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&); | 31 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); |
32 | 32 | ||
33 | virtual RecBody fetchBody( const RecMailP &mail ); | 33 | virtual RecBody fetchBody( const RecMailP &mail ); |
34 | virtual encodedString* fetchRawBody(const RecMailP&mail); | 34 | virtual encodedString* fetchRawBody(const RecMailP&mail); |
35 | virtual void logout(); | 35 | virtual void logout(); |
36 | virtual MAILLIB::ATYPE getType()const; | 36 | virtual MAILLIB::ATYPE getType()const; |
37 | virtual const QString&getName()const; | 37 | virtual const QString&getName()const; |
38 | static void nntp_progress( size_t current, size_t maximum ); | 38 | static void nntp_progress( size_t current, size_t maximum ); |
39 | 39 | ||
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 6737d6c..f5694fe 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp | |||
@@ -5,16 +5,17 @@ | |||
5 | #include <libetpan/libetpan.h> | 5 | #include <libetpan/libetpan.h> |
6 | #include <qpe/global.h> | 6 | #include <qpe/global.h> |
7 | #include <qfile.h> | 7 | #include <qfile.h> |
8 | //#include <qstring.h> | 8 | //#include <qstring.h> |
9 | 9 | ||
10 | /* we don't fetch messages larger than 5 MB */ | 10 | /* we don't fetch messages larger than 5 MB */ |
11 | #define HARD_MSG_SIZE_LIMIT 5242880 | 11 | #define HARD_MSG_SIZE_LIMIT 5242880 |
12 | 12 | ||
13 | using namespace Opie::Core; | ||
13 | POP3wrapper::POP3wrapper( POP3account *a ) | 14 | POP3wrapper::POP3wrapper( POP3account *a ) |
14 | : Genericwrapper() { | 15 | : Genericwrapper() { |
15 | account = a; | 16 | account = a; |
16 | m_pop3 = NULL; | 17 | m_pop3 = NULL; |
17 | msgTempName = a->getFileName()+"_msg_cache"; | 18 | msgTempName = a->getFileName()+"_msg_cache"; |
18 | last_msg_id = 0; | 19 | last_msg_id = 0; |
19 | } | 20 | } |
20 | 21 | ||
@@ -88,17 +89,17 @@ RecBody POP3wrapper::fetchBody( const RecMailP &mail ) { | |||
88 | if (mailmsg) | 89 | if (mailmsg) |
89 | mailmessage_free(mailmsg); | 90 | mailmessage_free(mailmsg); |
90 | if (message) | 91 | if (message) |
91 | free(message); | 92 | free(message); |
92 | 93 | ||
93 | return body; | 94 | return body; |
94 | } | 95 | } |
95 | 96 | ||
96 | void POP3wrapper::listMessages(const QString &, QValueList<Opie::OSmartPointer<RecMail> > &target ) | 97 | void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) |
97 | { | 98 | { |
98 | login(); | 99 | login(); |
99 | if (!m_pop3) | 100 | if (!m_pop3) |
100 | return; | 101 | return; |
101 | uint32_t res_messages,res_recent,res_unseen; | 102 | uint32_t res_messages,res_recent,res_unseen; |
102 | mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); | 103 | mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); |
103 | parseList(target,m_pop3->sto_session,"INBOX"); | 104 | parseList(target,m_pop3->sto_session,"INBOX"); |
104 | Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages)); | 105 | Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages)); |
@@ -171,18 +172,18 @@ void POP3wrapper::logout() | |||
171 | { | 172 | { |
172 | if ( m_pop3 == NULL ) | 173 | if ( m_pop3 == NULL ) |
173 | return; | 174 | return; |
174 | mailstorage_free(m_pop3); | 175 | mailstorage_free(m_pop3); |
175 | m_pop3 = 0; | 176 | m_pop3 = 0; |
176 | } | 177 | } |
177 | 178 | ||
178 | 179 | ||
179 | QValueList<Opie::OSmartPointer<Folder> >* POP3wrapper::listFolders() { | 180 | QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { |
180 | QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); | 181 | QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); |
181 | FolderP inb=new Folder("INBOX","/"); | 182 | FolderP inb=new Folder("INBOX","/"); |
182 | folders->append(inb); | 183 | folders->append(inb); |
183 | return folders; | 184 | return folders; |
184 | } | 185 | } |
185 | 186 | ||
186 | void POP3wrapper::deleteMail(const RecMailP&mail) { | 187 | void POP3wrapper::deleteMail(const RecMailP&mail) { |
187 | login(); | 188 | login(); |
188 | if (!m_pop3) | 189 | if (!m_pop3) |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.h b/noncore/net/mail/libmailwrapper/pop3wrapper.h index 31eb6f1..c46b941 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.h +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.h | |||
@@ -12,24 +12,24 @@ struct mailfolder; | |||
12 | class POP3wrapper : public Genericwrapper | 12 | class POP3wrapper : public Genericwrapper |
13 | { | 13 | { |
14 | Q_OBJECT | 14 | Q_OBJECT |
15 | 15 | ||
16 | public: | 16 | public: |
17 | POP3wrapper( POP3account *a ); | 17 | POP3wrapper( POP3account *a ); |
18 | virtual ~POP3wrapper(); | 18 | virtual ~POP3wrapper(); |
19 | /* mailbox will be ignored */ | 19 | /* mailbox will be ignored */ |
20 | virtual void listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ); | 20 | virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ); |
21 | virtual QValueList<Opie::OSmartPointer<Folder> >* listFolders(); | 21 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
22 | /* mailbox will be ignored */ | 22 | /* mailbox will be ignored */ |
23 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 23 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
24 | 24 | ||
25 | virtual void deleteMail(const RecMailP&mail); | 25 | virtual void deleteMail(const RecMailP&mail); |
26 | virtual void answeredMail(const RecMailP&mail); | 26 | virtual void answeredMail(const RecMailP&mail); |
27 | virtual int deleteAllMail(const Opie::OSmartPointer<Folder>&); | 27 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); |
28 | 28 | ||
29 | virtual RecBody fetchBody( const RecMailP &mail ); | 29 | virtual RecBody fetchBody( const RecMailP &mail ); |
30 | virtual encodedString* fetchRawBody(const RecMailP&mail); | 30 | virtual encodedString* fetchRawBody(const RecMailP&mail); |
31 | virtual void logout(); | 31 | virtual void logout(); |
32 | virtual MAILLIB::ATYPE getType()const; | 32 | virtual MAILLIB::ATYPE getType()const; |
33 | virtual const QString&getName()const; | 33 | virtual const QString&getName()const; |
34 | static void pop3_progress( size_t current, size_t maximum ); | 34 | static void pop3_progress( size_t current, size_t maximum ); |
35 | 35 | ||
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index 86673aa..e2cea7a 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -8,16 +8,17 @@ | |||
8 | #include <qt.h> | 8 | #include <qt.h> |
9 | 9 | ||
10 | #include <qpe/config.h> | 10 | #include <qpe/config.h> |
11 | #include <qpe/qcopenvelope_qws.h> | 11 | #include <qpe/qcopenvelope_qws.h> |
12 | 12 | ||
13 | #include <libetpan/libetpan.h> | 13 | #include <libetpan/libetpan.h> |
14 | 14 | ||
15 | 15 | ||
16 | using namespace Opie::Core; | ||
16 | progressMailSend*SMTPwrapper::sendProgress = 0; | 17 | progressMailSend*SMTPwrapper::sendProgress = 0; |
17 | 18 | ||
18 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) | 19 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) |
19 | : Generatemail() | 20 | : Generatemail() |
20 | { | 21 | { |
21 | m_SmtpAccount = aSmtp; | 22 | m_SmtpAccount = aSmtp; |
22 | Config cfg( "mail" ); | 23 | Config cfg( "mail" ); |
23 | cfg.setGroup( "Status" ); | 24 | cfg.setGroup( "Status" ); |
@@ -307,17 +308,17 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) | |||
307 | storeFailedMail(data,size,failuretext); | 308 | storeFailedMail(data,size,failuretext); |
308 | } else { | 309 | } else { |
309 | qDebug( "Mail sent." ); | 310 | qDebug( "Mail sent." ); |
310 | storeMail(data,size,"Sent"); | 311 | storeMail(data,size,"Sent"); |
311 | } | 312 | } |
312 | return result; | 313 | return result; |
313 | } | 314 | } |
314 | 315 | ||
315 | void SMTPwrapper::sendMail(const Opie::OSmartPointer<Mail>&mail,bool later ) | 316 | void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later ) |
316 | { | 317 | { |
317 | mailmime * mimeMail; | 318 | mailmime * mimeMail; |
318 | 319 | ||
319 | mimeMail = createMimeMail(mail ); | 320 | mimeMail = createMimeMail(mail ); |
320 | if ( mimeMail == NULL ) { | 321 | if ( mimeMail == NULL ) { |
321 | qDebug( "sendMail: error creating mime mail" ); | 322 | qDebug( "sendMail: error creating mime mail" ); |
322 | } else { | 323 | } else { |
323 | sendProgress = new progressMailSend(); | 324 | sendProgress = new progressMailSend(); |
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h index 71ae35c..6c5bbe8 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.h +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h | |||
@@ -18,17 +18,17 @@ class AbstractMail; | |||
18 | 18 | ||
19 | class SMTPwrapper : public Generatemail | 19 | class SMTPwrapper : public Generatemail |
20 | { | 20 | { |
21 | Q_OBJECT | 21 | Q_OBJECT |
22 | 22 | ||
23 | public: | 23 | public: |
24 | SMTPwrapper(SMTPaccount * aSmtp); | 24 | SMTPwrapper(SMTPaccount * aSmtp); |
25 | virtual ~SMTPwrapper(); | 25 | virtual ~SMTPwrapper(); |
26 | void sendMail(const Opie::OSmartPointer<Mail>& mail,bool later=false ); | 26 | void sendMail(const Opie::Core::OSmartPointer<Mail>& mail,bool later=false ); |
27 | bool flushOutbox(); | 27 | bool flushOutbox(); |
28 | 28 | ||
29 | static progressMailSend*sendProgress; | 29 | static progressMailSend*sendProgress; |
30 | 30 | ||
31 | signals: | 31 | signals: |
32 | void queuedMails( int ); | 32 | void queuedMails( int ); |
33 | 33 | ||
34 | protected: | 34 | protected: |
@@ -45,17 +45,17 @@ protected: | |||
45 | static void storeMail(const char*mail, size_t length, const QString&box); | 45 | static void storeMail(const char*mail, size_t length, const QString&box); |
46 | static QString mailsmtpError( int err ); | 46 | static QString mailsmtpError( int err ); |
47 | static void progress( size_t current, size_t maximum ); | 47 | static void progress( size_t current, size_t maximum ); |
48 | 48 | ||
49 | int smtpSend(char*from,clist*rcpts,const char*data,size_t size); | 49 | int smtpSend(char*from,clist*rcpts,const char*data,size_t size); |
50 | 50 | ||
51 | void storeMail(mailmime*mail, const QString&box); | 51 | void storeMail(mailmime*mail, const QString&box); |
52 | 52 | ||
53 | int sendQueuedMail(AbstractMail*wrap,const Opie::OSmartPointer<RecMail>&which); | 53 | int sendQueuedMail(AbstractMail*wrap,const Opie::Core::OSmartPointer<RecMail>&which); |
54 | void storeFailedMail(const char*data,unsigned int size, const char*failuremessage); | 54 | void storeFailedMail(const char*data,unsigned int size, const char*failuremessage); |
55 | 55 | ||
56 | int m_queuedMail; | 56 | int m_queuedMail; |
57 | 57 | ||
58 | protected slots: | 58 | protected slots: |
59 | void emitQCop( int queued ); | 59 | void emitQCop( int queued ); |
60 | 60 | ||
61 | }; | 61 | }; |
diff --git a/noncore/net/mail/libmailwrapper/storemail.cpp b/noncore/net/mail/libmailwrapper/storemail.cpp index 595e7fc..914a11d 100644 --- a/noncore/net/mail/libmailwrapper/storemail.cpp +++ b/noncore/net/mail/libmailwrapper/storemail.cpp | |||
@@ -4,16 +4,17 @@ | |||
4 | #include "abstractmail.h" | 4 | #include "abstractmail.h" |
5 | 5 | ||
6 | #include <libetpan/libetpan.h> | 6 | #include <libetpan/libetpan.h> |
7 | 7 | ||
8 | #include <qstring.h> | 8 | #include <qstring.h> |
9 | 9 | ||
10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
11 | 11 | ||
12 | using namespace Opie::Core; | ||
12 | Storemail::Storemail(Account*aAccount,const QString&aFolder) | 13 | Storemail::Storemail(Account*aAccount,const QString&aFolder) |
13 | : Generatemail() | 14 | : Generatemail() |
14 | { | 15 | { |
15 | wrapper = 0; | 16 | wrapper = 0; |
16 | m_Account = aAccount; | 17 | m_Account = aAccount; |
17 | m_tfolder = aFolder; | 18 | m_tfolder = aFolder; |
18 | wrapper = AbstractMail::getWrapper(m_Account); | 19 | wrapper = AbstractMail::getWrapper(m_Account); |
19 | if (wrapper) { | 20 | if (wrapper) { |
@@ -44,17 +45,17 @@ Storemail::Storemail(const QString&aFolder) | |||
44 | wrapper->createMbox(m_tfolder); | 45 | wrapper->createMbox(m_tfolder); |
45 | } | 46 | } |
46 | } | 47 | } |
47 | 48 | ||
48 | Storemail::~Storemail() | 49 | Storemail::~Storemail() |
49 | { | 50 | { |
50 | } | 51 | } |
51 | 52 | ||
52 | int Storemail::storeMail(const Opie::OSmartPointer<Mail>&mail) | 53 | int Storemail::storeMail(const Opie::Core::OSmartPointer<Mail>&mail) |
53 | { | 54 | { |
54 | if (!wrapper) return 0; | 55 | if (!wrapper) return 0; |
55 | int ret = 1; | 56 | int ret = 1; |
56 | 57 | ||
57 | mailmime * mimeMail = 0; | 58 | mailmime * mimeMail = 0; |
58 | mimeMail = createMimeMail(mail ); | 59 | mimeMail = createMimeMail(mail ); |
59 | if ( mimeMail == NULL ) { | 60 | if ( mimeMail == NULL ) { |
60 | qDebug( "storeMail: error creating mime mail" ); | 61 | qDebug( "storeMail: error creating mime mail" ); |
diff --git a/noncore/net/mail/libmailwrapper/storemail.h b/noncore/net/mail/libmailwrapper/storemail.h index 80c7431..4433de0 100644 --- a/noncore/net/mail/libmailwrapper/storemail.h +++ b/noncore/net/mail/libmailwrapper/storemail.h | |||
@@ -13,17 +13,17 @@ class Storemail : public Generatemail | |||
13 | { | 13 | { |
14 | Q_OBJECT | 14 | Q_OBJECT |
15 | public: | 15 | public: |
16 | Storemail(Account*aAccount,const QString&aFolder); | 16 | Storemail(Account*aAccount,const QString&aFolder); |
17 | Storemail(const QString&dir,const QString&aFolder); | 17 | Storemail(const QString&dir,const QString&aFolder); |
18 | Storemail(const QString&aFolder); | 18 | Storemail(const QString&aFolder); |
19 | virtual ~Storemail(); | 19 | virtual ~Storemail(); |
20 | 20 | ||
21 | int storeMail(const Opie::OSmartPointer<Mail>&mail); | 21 | int storeMail(const Opie::Core::OSmartPointer<Mail>&mail); |
22 | 22 | ||
23 | protected: | 23 | protected: |
24 | Account* m_Account; | 24 | Account* m_Account; |
25 | QString m_tfolder; | 25 | QString m_tfolder; |
26 | AbstractMail*wrapper; | 26 | AbstractMail*wrapper; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | #endif | 29 | #endif |
diff --git a/noncore/net/mail/mail.pro b/noncore/net/mail/mail.pro index 005a839..926cdbd 100644 --- a/noncore/net/mail/mail.pro +++ b/noncore/net/mail/mail.pro | |||
@@ -47,17 +47,17 @@ INTERFACES = editaccountsui.ui \ | |||
47 | composemailui.ui \ | 47 | composemailui.ui \ |
48 | settingsdialogui.ui \ | 48 | settingsdialogui.ui \ |
49 | statuswidgetui.ui \ | 49 | statuswidgetui.ui \ |
50 | newmaildirui.ui \ | 50 | newmaildirui.ui \ |
51 | selectstoreui.ui \ | 51 | selectstoreui.ui \ |
52 | nntpgroupsui.ui | 52 | nntpgroupsui.ui |
53 | 53 | ||
54 | 54 | ||
55 | INCLUDEPATH += $(OPIEDIR)/include | 55 | INCLUDEPATH += $(OPIEDIR)/include /usr/local/include |
56 | 56 | ||
57 | CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) | 57 | CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) |
58 | contains( CONFTEST, y ){ | 58 | contains( CONFTEST, y ){ |
59 | LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 -lopiedb2 -lmailwrapper -liconv | 59 | LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 -lopiedb2 -lmailwrapper -liconv |
60 | }else{ | 60 | }else{ |
61 | LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 -lopiedb2 -lmailwrapper | 61 | LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 -lopiedb2 -lmailwrapper |
62 | } | 62 | } |
63 | 63 | ||
diff --git a/noncore/net/mail/main.cpp b/noncore/net/mail/main.cpp index 54ac7fb..4942083 100644 --- a/noncore/net/mail/main.cpp +++ b/noncore/net/mail/main.cpp | |||
@@ -1,5 +1,7 @@ | |||
1 | #include <opie2/oapplicationfactory.h> | 1 | #include <opie2/oapplicationfactory.h> |
2 | 2 | ||
3 | #include "opiemail.h" | 3 | #include "opiemail.h" |
4 | 4 | ||
5 | using namespace Opie::Core; | ||
6 | using namespace Opie::Core; | ||
5 | OPIE_EXPORT_APP( OApplicationFactory<OpieMail> ) | 7 | OPIE_EXPORT_APP( OApplicationFactory<OpieMail> ) |
diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index de32007..f672a36 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp | |||
@@ -7,17 +7,17 @@ | |||
7 | #include <qpe/applnk.h> | 7 | #include <qpe/applnk.h> |
8 | 8 | ||
9 | #include <opie2/odevice.h> | 9 | #include <opie2/odevice.h> |
10 | 10 | ||
11 | #include <libmailwrapper/settings.h> | 11 | #include <libmailwrapper/settings.h> |
12 | 12 | ||
13 | #include "mailapplet.h" | 13 | #include "mailapplet.h" |
14 | 14 | ||
15 | using namespace Opie; | 15 | using namespace Opie::Core; |
16 | 16 | ||
17 | MailApplet::MailApplet( QWidget *parent ) | 17 | MailApplet::MailApplet( QWidget *parent ) |
18 | : QWidget( parent ) { | 18 | : QWidget( parent ) { |
19 | 19 | ||
20 | m_config = new Config( "mail" ); | 20 | m_config = new Config( "mail" ); |
21 | m_config->setGroup( "Applet" ); | 21 | m_config->setGroup( "Applet" ); |
22 | 22 | ||
23 | setFixedWidth( AppLnk::smallIconSize() ); | 23 | setFixedWidth( AppLnk::smallIconSize() ); |
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index 894a386..f00d2cb 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp | |||
@@ -13,16 +13,17 @@ | |||
13 | /* QT */ | 13 | /* QT */ |
14 | #include <qtextbrowser.h> | 14 | #include <qtextbrowser.h> |
15 | #include <qmessagebox.h> | 15 | #include <qmessagebox.h> |
16 | #include <qtextstream.h> | 16 | #include <qtextstream.h> |
17 | #include <qaction.h> | 17 | #include <qaction.h> |
18 | #include <qpopupmenu.h> | 18 | #include <qpopupmenu.h> |
19 | #include <qfile.h> | 19 | #include <qfile.h> |
20 | 20 | ||
21 | using namespace Opie::Ui; | ||
21 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 22 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
22 | const QString&fsize,int num,const QValueList<int>&path) | 23 | const QString&fsize,int num,const QValueList<int>&path) |
23 | : QListViewItem(parent,after),_partNum(num) | 24 | : QListViewItem(parent,after),_partNum(num) |
24 | { | 25 | { |
25 | _path=path; | 26 | _path=path; |
26 | setText(0, mime); | 27 | setText(0, mime); |
27 | setText(1, desc); | 28 | setText(1, desc); |
28 | setText(2, file); | 29 | setText(2, file); |
@@ -215,17 +216,17 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int | |||
215 | ret = menu->exec( point, 0 ); | 216 | ret = menu->exec( point, 0 ); |
216 | 217 | ||
217 | switch(ret) | 218 | switch(ret) |
218 | { | 219 | { |
219 | case 0: | 220 | case 0: |
220 | { | 221 | { |
221 | MimeTypes types; | 222 | MimeTypes types; |
222 | types.insert( "all", "*" ); | 223 | types.insert( "all", "*" ); |
223 | QString str = Opie::OFileDialog::getSaveFileName( 1, | 224 | QString str = OFileDialog::getSaveFileName( 1, |
224 | "/", item->text( 2 ) , types, 0 ); | 225 | "/", item->text( 2 ) , types, 0 ); |
225 | 226 | ||
226 | if( !str.isEmpty() ) | 227 | if( !str.isEmpty() ) |
227 | { | 228 | { |
228 | encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); | 229 | encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); |
229 | if (content) | 230 | if (content) |
230 | { | 231 | { |
231 | QFile output(str); | 232 | QFile output(str); |
diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp index c2bf08c..cbb98cc 100644 --- a/noncore/net/mail/viewmailbase.cpp +++ b/noncore/net/mail/viewmailbase.cpp | |||
@@ -1,15 +1,15 @@ | |||
1 | #include <qtextbrowser.h> | 1 | #include <qtextbrowser.h> |
2 | #include <qlistview.h> | 2 | #include <qlistview.h> |
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qlabel.h> | 4 | #include <qlabel.h> |
5 | #include <qvbox.h> | 5 | #include <qvbox.h> |
6 | 6 | ||
7 | #include <qpe/qpetoolbar.h> | 7 | #include <qtoolbar.h> |
8 | #include <qmenubar.h> | 8 | #include <qmenubar.h> |
9 | #include <qpe/resource.h> | 9 | #include <qpe/resource.h> |
10 | 10 | ||
11 | #include "viewmailbase.h" | 11 | #include "viewmailbase.h" |
12 | //#include "opendiag.h" | 12 | //#include "opendiag.h" |
13 | 13 | ||
14 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) | 14 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) |
15 | : QMainWindow(parent, name, fl) | 15 | : QMainWindow(parent, name, fl) |