summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp17
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.h2
3 files changed, 17 insertions, 6 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 77f5829..1a3f827 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,775 +1,779 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.7 ************ 3********** VERSION 2.0.7 ************
4 4
5Added global application font settings 5Added global application font settings
6(for all KDE-Pim/Pi apps) to the general settings. 6(for all KDE-Pim/Pi apps) to the general settings.
7 7
8Fixed a problem in OM/Pi when trying to login to some IMAP servers
9(like the IMAP server of Apple: mail.mac.com )
10
11
8********** VERSION 2.0.6 ************ 12********** VERSION 2.0.6 ************
9 13
10Some bugfixes in the pi-sync mode. 14Some bugfixes in the pi-sync mode.
11Added German translation for pi-sync mode. 15Added German translation for pi-sync mode.
12 16
13KO/Pi: 17KO/Pi:
14Made the todolist using alternate background. 18Made the todolist using alternate background.
15 19
16Other minor fixes in KO/Pi. 20Other minor fixes in KO/Pi.
17 21
18 22
19********** VERSION 2.0.5 ************ 23********** VERSION 2.0.5 ************
20 24
21Bugfixes in KO/Pi. 25Bugfixes in KO/Pi.
22 26
23********** VERSION 2.0.4 ************ 27********** VERSION 2.0.4 ************
24 28
25KO/Pi: 29KO/Pi:
26Fixed problem loading translations for summary/location edit boxes in event/todo editor. 30Fixed problem loading translations for summary/location edit boxes in event/todo editor.
27 31
28Added a general "select week number" to the toolbar. 32Added a general "select week number" to the toolbar.
29 33
30Fixed some small problem of the new features introduced in version 2.0.3. 34Fixed some small problem of the new features introduced in version 2.0.3.
31 35
32Made it possible to specify one specific category as category color, 36Made it possible to specify one specific category as category color,
33if more than one categories are selected. 37if more than one categories are selected.
34 38
35Fixed a bug in saving colors for categories with non-ascii characters. 39Fixed a bug in saving colors for categories with non-ascii characters.
36(Like, e.g. German Umlauts). 40(Like, e.g. German Umlauts).
37Propably you have to set your colors again for those categories. 41Propably you have to set your colors again for those categories.
38 42
39 43
40********** VERSION 2.0.3 ************ 44********** VERSION 2.0.3 ************
41 45
42KO/Pi: 46KO/Pi:
43Added feature for changing alarm settings for many items at once: 47Added feature for changing alarm settings for many items at once:
44Open list view (or search dialog), select the desired items and choose in 48Open list view (or search dialog), select the desired items and choose in
45the popup menu: Set alarm for selected... 49the popup menu: Set alarm for selected...
46 50
47Added to the event/todo viewer the option to send an email to 51Added to the event/todo viewer the option to send an email to
48all attendees or all selected (with RSVP) attendees. 52all attendees or all selected (with RSVP) attendees.
49 53
50Made the week-month mode changing in month view faster. 54Made the week-month mode changing in month view faster.
51 55
52Made month view better useable with keyboard. 56Made month view better useable with keyboard.
53Now TAB key jumps to next cell with an event/todo. 57Now TAB key jumps to next cell with an event/todo.
54Scroll in cell with coursor keys, scroll in time (next week) with 58Scroll in cell with coursor keys, scroll in time (next week) with
55Shift/Control + coursorkeys. 59Shift/Control + coursorkeys.
56 60
57Fixed bug that the todo view flat mode was reset after first view update. 61Fixed bug that the todo view flat mode was reset after first view update.
58 62
59If a todo is displayed closed in the todo view, 63If a todo is displayed closed in the todo view,
60it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. 64it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties.
61 65
62Added info about the numbers of years to the caption (title) information about a birthday event. 66Added info about the numbers of years to the caption (title) information about a birthday event.
63 67
64Made completion date in todo editor editable. 68Made completion date in todo editor editable.
65 69
66Added possibility to save/load templates for journals. 70Added possibility to save/load templates for journals.
67(Which is just a simple "save text to file" or "insert text from file". 71(Which is just a simple "save text to file" or "insert text from file".
68 72
69********** VERSION 2.0.2 ************ 73********** VERSION 2.0.2 ************
70 74
71KO/Pi: 75KO/Pi:
72Fixed the layout problem of the day label buttons 76Fixed the layout problem of the day label buttons
73of the agenda view introduced in version 2.0.1. 77of the agenda view introduced in version 2.0.1.
74 78
75Added WhatsThis support for the todo view and the list view. 79Added WhatsThis support for the todo view and the list view.
76 80
77Added a quite useful feature to the montview. 81Added a quite useful feature to the montview.
78Just click on the week numbers on the left. 82Just click on the week numbers on the left.
79And in the top right corner of month view/agenda view 83And in the top right corner of month view/agenda view
80there is now a "week number quick selector". 84there is now a "week number quick selector".
81(Click on the black triangle). 85(Click on the black triangle).
82 86
83Made the quite difficult timezone change in KO/Pi easy. 87Made the quite difficult timezone change in KO/Pi easy.
84 88
85OM/Pi: 89OM/Pi:
86Fixed too small icons on desktop. 90Fixed too small icons on desktop.
87Fixed non visible icons in mainwindow on Z with fastload enabled. 91Fixed non visible icons in mainwindow on Z with fastload enabled.
88Added signature file setting to smtp account config. 92Added signature file setting to smtp account config.
89And the signature can be edited and saved in the edit mail dialog. 93And the signature can be edited and saved in the edit mail dialog.
90That does mean: 94That does mean:
91Simply edit the signature for the selected smtp account in the 95Simply edit the signature for the selected smtp account in the
92edit new mail dialog and press the "save signature" button there. 96edit new mail dialog and press the "save signature" button there.
93Then the signature is saved to the file specified in the smtp account settings. 97Then the signature is saved to the file specified in the smtp account settings.
94If there is no file specified, it is saved automatically to the file 98If there is no file specified, it is saved automatically to the file
95kdepim/apps/kopiemail/<accountname>.sig. 99kdepim/apps/kopiemail/<accountname>.sig.
96 100
97 101
98 102
99********** VERSION 2.0.1 ************ 103********** VERSION 2.0.1 ************
100 104
101Oooops ... I forgot to test on the Zaurus 5500 ... 105Oooops ... I forgot to test on the Zaurus 5500 ...
102 106
103Fixed many problems of new (english) strings (and german translations) 107Fixed many problems of new (english) strings (and german translations)
104introduced in the latest versions, where the text was not fitting on the 108introduced in the latest versions, where the text was not fitting on the
105240x320 display of the Zaurus 5500. 109240x320 display of the Zaurus 5500.
106 110
107KO/Pi: 111KO/Pi:
108Added a popup menu ( press pen and hold to get popup ) to the agenda view 112Added a popup menu ( press pen and hold to get popup ) to the agenda view
109with many useful items (add event/todo, show next week, two weeks, month, journal). 113with many useful items (add event/todo, show next week, two weeks, month, journal).
110 114
111Added items to the todolist popup menu for: 115Added items to the todolist popup menu for:
112Display all opened, all closed or all todos flat. 116Display all opened, all closed or all todos flat.
113The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 117The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
114Made the reparenting of todos on the desktop possible via Drag&Drop. 118Made the reparenting of todos on the desktop possible via Drag&Drop.
115Fixed several bugs in setting the completed datetime for todos. 119Fixed several bugs in setting the completed datetime for todos.
116Added info about completed datetime of todos to the todo viewer. 120Added info about completed datetime of todos to the todo viewer.
117Now displaying a completed todo (with completed datetime set) in the agenda view 121Now displaying a completed todo (with completed datetime set) in the agenda view
118at the time of the completion. Such that now it is possible to see in the agenda view 122at the time of the completion. Such that now it is possible to see in the agenda view
119when what todo was completed. 123when what todo was completed.
120Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 124Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
121Now the behaviour is: 125Now the behaviour is:
122Setting a parent to complete sets all (sub)childs to complete. 126Setting a parent to complete sets all (sub)childs to complete.
123Setting a parent to uncomplete does not change the childs. 127Setting a parent to uncomplete does not change the childs.
124Setting a child to uncomplete sets all parent to uncomplete. 128Setting a child to uncomplete sets all parent to uncomplete.
125Setting a child to complete does not change the parents. 129Setting a child to complete does not change the parents.
126 130
127Smart updating and double buffering of the daymatrix. 131Smart updating and double buffering of the daymatrix.
128Showing holidays in the day matrix. 132Showing holidays in the day matrix.
129Many other small performance updates. 133Many other small performance updates.
130 134
131Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 135Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
132 136
133Now the translation file usertranslation.txt is supposed to be in utf8 format. 137Now the translation file usertranslation.txt is supposed to be in utf8 format.
134If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu. 138If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
135 139
136 140
137********** VERSION 2.0.0 ************ 141********** VERSION 2.0.0 ************
138 142
139Stable release 2.0.0! 143Stable release 2.0.0!
140 144
141KO/Pi: 145KO/Pi:
142Fixed problem in edit dialog recreation at startup. 146Fixed problem in edit dialog recreation at startup.
143Made "toggle view*" menu items enabled context sensitive. 147Made "toggle view*" menu items enabled context sensitive.
144Changed agenda size menu to items 1-10. 148Changed agenda size menu to items 1-10.
145Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 149Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
146Usebility enhancements in the KO/Pi menus. 150Usebility enhancements in the KO/Pi menus.
147Birthday import now adds year to summary. 151Birthday import now adds year to summary.
148What's Next view shows age in years for birthday. 152What's Next view shows age in years for birthday.
149 153
150OM/Pi: 154OM/Pi:
151Added three info lines to display subject, from and to of selected mails. 155Added three info lines to display subject, from and to of selected mails.
152 156
153KA/Pi: 157KA/Pi:
154Fixed jump bar behaviour on Zaurus. 158Fixed jump bar behaviour on Zaurus.
155Now KA/Pi search field supports searching for a range of starting characters. 159Now KA/Pi search field supports searching for a range of starting characters.
156E.g. to search for all contact beginning with b to n, type 160E.g. to search for all contact beginning with b to n, type
157b-n 161b-n
158in the search field. 162in the search field.
159 163
160********** VERSION 1.9.20 ************ 164********** VERSION 1.9.20 ************
161 165
162KO/Pi: 166KO/Pi:
163Added for the "dislplay one day" agenda mode 167Added for the "dislplay one day" agenda mode
164info in the caption and in the day lables: 168info in the caption and in the day lables:
165Now it is displayed, if the selected day is from "day before yesterday" 169Now it is displayed, if the selected day is from "day before yesterday"
166to "day after tomorrow". 170to "day after tomorrow".
167Made it possible to delete a Todo, which has sub-todos. 171Made it possible to delete a Todo, which has sub-todos.
168Fixed two small problems in the todo view. 172Fixed two small problems in the todo view.
169Added missing German translation for filter edit and print dialog. 173Added missing German translation for filter edit and print dialog.
170Made search dialog closeable by cancel key. 174Made search dialog closeable by cancel key.
171 175
172Made it possible to select in the date picker the (ligt grey ) 176Made it possible to select in the date picker the (ligt grey )
173dates of the prev./next month with the mouse. 177dates of the prev./next month with the mouse.
174 178
175OM/Pi: 179OM/Pi:
176"Delete mail" icon in main window now deletes all selected mails. 180"Delete mail" icon in main window now deletes all selected mails.
177Fixed the problem, that the state flag of imap mails was ignored. 181Fixed the problem, that the state flag of imap mails was ignored.
178Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 182Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
179to indecate that they are already seen. 183to indecate that they are already seen.
180Fixed the problem that the body of some mails was not displayed in the 184Fixed the problem that the body of some mails was not displayed in the
181mail viewer when fetching them from the imap server directly to read them. 185mail viewer when fetching them from the imap server directly to read them.
182Made it (configurable) possible to show the "To:" field in the list view. 186Made it (configurable) possible to show the "To:" field in the list view.
183Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 187Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
184Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 188Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
185local storage folder (specified in account settings) of the account of the mail. 189local storage folder (specified in account settings) of the account of the mail.
186Removed some memory leaks in OM/Pi. 190Removed some memory leaks in OM/Pi.
187 191
188 192
189********** VERSION 1.9.19 ************ 193********** VERSION 1.9.19 ************
190 194
191Added a lot of missing translations to KA/Pi, 195Added a lot of missing translations to KA/Pi,
192Added some missing translations to KO/Pi and OM/Pi. 196Added some missing translations to KO/Pi and OM/Pi.
193 197
194Fixed some minor problems in KA/Pi + KO/Pi. 198Fixed some minor problems in KA/Pi + KO/Pi.
195 199
196Fixed a crash when closing PwM/Pi. 200Fixed a crash when closing PwM/Pi.
197Added German translation for PwM/Pi. 201Added German translation for PwM/Pi.
198 202
199Made view change and Month View update faster in KO/Pi. 203Made view change and Month View update faster in KO/Pi.
200 204
201 205
202********** VERSION 1.9.18 ************ 206********** VERSION 1.9.18 ************
203 207
204FYI: The VERSION 1.9.17 was a testing release only. 208FYI: The VERSION 1.9.17 was a testing release only.
205Please read the changelog of VERSION 1.9.17 as well. 209Please read the changelog of VERSION 1.9.17 as well.
206 210
207Cleaned up the syncing config dialog. 211Cleaned up the syncing config dialog.
208Added sync config options for date range for events. 212Added sync config options for date range for events.
209Added sync config options for filters on incoming data. 213Added sync config options for filters on incoming data.
210Added sync config options for filters on outgoing data. 214Added sync config options for filters on outgoing data.
211Please read the updated SyncHowTo about the new filter settings. 215Please read the updated SyncHowTo about the new filter settings.
212These filter settings make it now possible to sync with shared 216These filter settings make it now possible to sync with shared
213calendars without writing back private or confidential data 217calendars without writing back private or confidential data
214(via the outgoing filters). 218(via the outgoing filters).
215To sync only with particular parts of a shared calendar, 219To sync only with particular parts of a shared calendar,
216the incoming filter settings can be used. 220the incoming filter settings can be used.
217An example can be found in the SyncHowTo. 221An example can be found in the SyncHowTo.
218Same for shared addressbooks. 222Same for shared addressbooks.
219 223
220Added a setting for the global kdepim data storage. 224Added a setting for the global kdepim data storage.
221Usually the data is stored in (yourhomedir/kdepim). 225Usually the data is stored in (yourhomedir/kdepim).
222Now you can set in the Global config dialog TAB, subTAB "Data storage path" 226Now you can set in the Global config dialog TAB, subTAB "Data storage path"
223a directory where all the kdepim data is stored. 227a directory where all the kdepim data is stored.
224That makes it easy to save all kdepim data on a SD card on the Z, for example. 228That makes it easy to save all kdepim data on a SD card on the Z, for example.
225 229
226KO/Pi: 230KO/Pi:
227The timeedit input has a pulldown list for times. 231The timeedit input has a pulldown list for times.
228If opened, this pulldown list should now has the right time highlighted. 232If opened, this pulldown list should now has the right time highlighted.
229Added the possibility to exclude events/todos/journals in a filter. 233Added the possibility to exclude events/todos/journals in a filter.
230You should exclude journals, if you do not want them to sync with a public calendar. 234You should exclude journals, if you do not want them to sync with a public calendar.
231 235
232KA/Pi: 236KA/Pi:
233Added the possibility to in/exclude public/private/confidential contacts to a filter. 237Added the possibility to in/exclude public/private/confidential contacts to a filter.
234If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 238If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
235Added printing of card view and details view on desktop. 239Added printing of card view and details view on desktop.
236Printing of list view is not working... 240Printing of list view is not working...
237Added button for removing pictures in contact editor. 241Added button for removing pictures in contact editor.
238Parsing data fix of KA/Pi version 1.9.17. 242Parsing data fix of KA/Pi version 1.9.17.
239Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 243Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
240Fixed some syncing merging problems. 244Fixed some syncing merging problems.
241 245
242 246
243********** VERSION 1.9.17 ************ 247********** VERSION 1.9.17 ************
244 248
245KO/Pi: 249KO/Pi:
246Fixed that tooltips were not updated after moving an item in agenda view. 250Fixed that tooltips were not updated after moving an item in agenda view.
247Fixed a bug in sorting start date for recurring events in list view. 251Fixed a bug in sorting start date for recurring events in list view.
248Changed the left button in todo viewer from "Agenda" to "Set completed". 252Changed the left button in todo viewer from "Agenda" to "Set completed".
249This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. 253This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
250Added more info in the todo viewer: Startdate, parent/sub todos. 254Added more info in the todo viewer: Startdate, parent/sub todos.
251 255
252 256
253KA/Pi: 257KA/Pi:
254All fields search does now actually search all the (possible) fields, 258All fields search does now actually search all the (possible) fields,
255not only those listed in the contact list. 259not only those listed in the contact list.
256Made is possible to inline a picture in a vcard on the Z. 260Made is possible to inline a picture in a vcard on the Z.
257This was only possible on the desktop, now is it possible on the Z as well. 261This was only possible on the desktop, now is it possible on the Z as well.
258Fixed of missing save settings after filter configuration. 262Fixed of missing save settings after filter configuration.
259Made saving of addressbook much faster. 263Made saving of addressbook much faster.
260Fixed extension widget layout problem. 264Fixed extension widget layout problem.
261Fixed saving of default formatted name settings. 265Fixed saving of default formatted name settings.
262Fixed formatted name handling in edit dialog. 266Fixed formatted name handling in edit dialog.
263Added an option for changing formatted names of many contacts 267Added an option for changing formatted names of many contacts
264(menu: File - Change - Set formatted name). 268(menu: File - Change - Set formatted name).
265 269
266QWhatsThis was not working on the Z ( only black rectangle was shown). 270QWhatsThis was not working on the Z ( only black rectangle was shown).
267This is Fixed. 271This is Fixed.
268 272
269KDE-Sync: 273KDE-Sync:
270Now readonly KDE resources are synced as well. 274Now readonly KDE resources are synced as well.
271(They are not changed in KDE itself, of course). 275(They are not changed in KDE itself, of course).
272 276
273 277
274 278
275********** VERSION 1.9.16 ************ 279********** VERSION 1.9.16 ************
276 280
277KO/Pi: 281KO/Pi:
278Fixed search dialog size on Z 6000 (480x640 display). 282Fixed search dialog size on Z 6000 (480x640 display).
279Added setting to hide/show time in agenda items. 283Added setting to hide/show time in agenda items.
280Added setting to hide not running todos in todo view. 284Added setting to hide not running todos in todo view.
281Added columns for start date/time in todo view. 285Added columns for start date/time in todo view.
282Replaced the solid half-hour lines in agenda view by dot lines. 286Replaced the solid half-hour lines in agenda view by dot lines.
283Added possibility of printing the What's Next View on the desktop 287Added possibility of printing the What's Next View on the desktop
284(i.e. Windows and Linux). 288(i.e. Windows and Linux).
285Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 289Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
286Added tooltips in month view.(Tooltips only available on desktop) 290Added tooltips in month view.(Tooltips only available on desktop)
287 291
288Fixed a strange problem in KO/Pi alarm applet. 292Fixed a strange problem in KO/Pi alarm applet.
289Did not find the actual problem, 293Did not find the actual problem,
290such that now Qtopia reboots again if deinstalling the alarm applet. 294such that now Qtopia reboots again if deinstalling the alarm applet.
291But the alarm applet should work again. 295But the alarm applet should work again.
292 296
293KA/Pi: 297KA/Pi:
294Fixed the problem, that internal pictures were not saved. 298Fixed the problem, that internal pictures were not saved.
295 299
296Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 300Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
297 301
298Fixed some minor problems. (Like word wrap in help text windows). 302Fixed some minor problems. (Like word wrap in help text windows).
299 303
300Fixed a compiling problem in microkde/kresources. 304Fixed a compiling problem in microkde/kresources.
301 305
302KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 306KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
303This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 307This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
304such that now syncing KO/Pi with Sharp DTM should work on the 308such that now syncing KO/Pi with Sharp DTM should work on the
305Zaurus C 3000 model. 309Zaurus C 3000 model.
306 310
307********** VERSION 1.9.15 ************ 311********** VERSION 1.9.15 ************
308 312
309Usebilty enhancements in KO/Pi: 313Usebilty enhancements in KO/Pi:
310When clicking on the date in a month view cell, the day view is shown. 314When clicking on the date in a month view cell, the day view is shown.
311Old behaviour was, that the "new event" dialog popped up. 315Old behaviour was, that the "new event" dialog popped up.
312 316
313Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 317Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
314That means, you can restore the latest 318That means, you can restore the latest
315event/todo/journal you have deleted. 319event/todo/journal you have deleted.
316A journal is deleted, if you clear all the text of the journal. 320A journal is deleted, if you clear all the text of the journal.
317 321
318Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 322Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
319 323
320KA/Pi starting in 480x640 resolution: 324KA/Pi starting in 480x640 resolution:
321Hide the filter action in toolbar 325Hide the filter action in toolbar
322and added icons for undo/delete/redo in toolbar. 326and added icons for undo/delete/redo in toolbar.
323 327
324Change in OM/Pi ViewMail dialog: 328Change in OM/Pi ViewMail dialog:
325When clicking on the "delete" icon the mail is deleted after confirmation as usual. 329When clicking on the "delete" icon the mail is deleted after confirmation as usual.
326But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 330But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
327 331
328Fixed a crash when deleting mail-accounts in OM/Pi. 332Fixed a crash when deleting mail-accounts in OM/Pi.
329 333
330 334
331********** VERSION 1.9.14 ************ 335********** VERSION 1.9.14 ************
332 336
333Fixed some problems with the dialog sizes when switching 337Fixed some problems with the dialog sizes when switching
334portrait/landscape mode on 640x480 PDA display. 338portrait/landscape mode on 640x480 PDA display.
335 339
336Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 340Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
337 341
338Fixed an ugly bug in KOpieMail: 342Fixed an ugly bug in KOpieMail:
339KOpieMail was not able to write files (mails) to MSDOS file system, 343KOpieMail was not able to write files (mails) to MSDOS file system,
340like on an usual preformatted SD card. That should work now. 344like on an usual preformatted SD card. That should work now.
341To save your mail data on the Sd card do the following: 345To save your mail data on the Sd card do the following:
342Create a dir on the SD card: 346Create a dir on the SD card:
343mkdir /mnt/card/localmail 347mkdir /mnt/card/localmail
344Go to your home dir: 348Go to your home dir:
345cd 349cd
346Go to kopiemail data storage dir: 350Go to kopiemail data storage dir:
347cd kdepim/apps/kopiemail 351cd kdepim/apps/kopiemail
348Create a symlink to the SD card: 352Create a symlink to the SD card:
349ls -s /mnt/card/localmail 353ls -s /mnt/card/localmail
350Now KOpieMail will store all mails on the SD card. 354Now KOpieMail will store all mails on the SD card.
351 355
352KO/Pi Monthview: 356KO/Pi Monthview:
353Now "Go to Today" selects the current month from day 1-end, 357Now "Go to Today" selects the current month from day 1-end,
354not the current date + some days. 358not the current date + some days.
355I.e. "Go to Today" shows now always 359I.e. "Go to Today" shows now always
356the current month with first day of month in the first row. 360the current month with first day of month in the first row.
357 361
358Added missing German translation. 362Added missing German translation.
359 363
360Fixed icons of executeable on Wintendo. 364Fixed icons of executeable on Wintendo.
361 365
362Added a "Show next Mail" button to the OM/Pi 366Added a "Show next Mail" button to the OM/Pi
363mail viewer such that the mail below the current mail 367mail viewer such that the mail below the current mail
364in the mail list view of the current folder 368in the mail list view of the current folder
365can be read with a single click. 369can be read with a single click.
366 370
367 371
368********** VERSION 1.9.13 ************ 372********** VERSION 1.9.13 ************
369 373
370Fixed nasty PwM/Pi file reading bug, when 374Fixed nasty PwM/Pi file reading bug, when
371the used hash algo of file is different then the global 375the used hash algo of file is different then the global
372hash algo. 376hash algo.
373 377
374Added KA/Pi support for opie mailit mailapplication. 378Added KA/Pi support for opie mailit mailapplication.
375 379
376Fixed some bugs in OM/Pi. 380Fixed some bugs in OM/Pi.
377Now character conversion tables are available for the Zaurus 381Now character conversion tables are available for the Zaurus
378to make OM/Pi working properly. 382to make OM/Pi working properly.
379To get the character conversion in OM/Pi working, please download 383To get the character conversion in OM/Pi working, please download
380at the sourceforge project site the package 384at the sourceforge project site the package
381sr-character-conversion_SharpROM_arm.ipk.zip 385sr-character-conversion_SharpROM_arm.ipk.zip
382(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 386(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
383from the section "general files for KDE/Pim" 387from the section "general files for KDE/Pim"
384Instructions how to install this package are in a ReadMe in this file. 388Instructions how to install this package are in a ReadMe in this file.
385 389
386 390
387Fixed the orientation change problem in KA/Pi when switching 391Fixed the orientation change problem in KA/Pi when switching
388portrait/landscape mode. 392portrait/landscape mode.
389 393
390French translation available for KA/Pi and OM/Pi. 394French translation available for KA/Pi and OM/Pi.
391 395
392Fixed some problems with categories in KO/Pi in DTM sync. 396Fixed some problems with categories in KO/Pi in DTM sync.
393 397
394Added selection dialog for export to phone in KA/Pi. 398Added selection dialog for export to phone in KA/Pi.
395 399
396If in KO/Pi is an attendee selected to add to a meeting and this 400If in KO/Pi is an attendee selected to add to a meeting and this
397attendee is already in the list of attendees, this person is not added 401attendee is already in the list of attendees, this person is not added
398again. 402again.
399 403
400Some menu cleanup in KA/Pi. 404Some menu cleanup in KA/Pi.
401 405
402********** VERSION 1.9.12 ************ 406********** VERSION 1.9.12 ************
403 407
404Fix for the bug in KO/Pi What's Next view of version 1.9.11. 408Fix for the bug in KO/Pi What's Next view of version 1.9.11.
405 409
406Bugfix: Licence file is now shown again. 410Bugfix: Licence file is now shown again.
407 411
408OM/Pi now supports Unicode (utf8 charset). 412OM/Pi now supports Unicode (utf8 charset).
409Fixed some bugs in OM/Pi. 413Fixed some bugs in OM/Pi.
410 414
411KA/Pi has more German translation. 415KA/Pi has more German translation.
412 416
413 417
414********** VERSION 1.9.11 ************ 418********** VERSION 1.9.11 ************
415 419
416Fixed several problems in PWM/Pi, like 420Fixed several problems in PWM/Pi, like
417asking the user, if unsaved changed are pending 421asking the user, if unsaved changed are pending
418when closing the app. 422when closing the app.
419And PwM/Pi handles now different texts for the 423And PwM/Pi handles now different texts for the
420fields Description, Username, Password, configurable per category. 424fields Description, Username, Password, configurable per category.
421 425
422Fixed a crash in KO/Pi , when importing/loading vcs files 426Fixed a crash in KO/Pi , when importing/loading vcs files
423which have an entry with an attendee with state: 427which have an entry with an attendee with state:
424NEEDS ACTION 428NEEDS ACTION
425 429
426Fixed some problems in the German translation of OM/Pi, 430Fixed some problems in the German translation of OM/Pi,
427which makes some dialogs not fitting on the screen 431which makes some dialogs not fitting on the screen
428of the Z 5500. 432of the Z 5500.
429 433
430Fixed Qtopia crash, when disabling/deinstalling 434Fixed Qtopia crash, when disabling/deinstalling
431KO/Pi alarm applet. 435KO/Pi alarm applet.
432 436
433Implemented direct KDE<->KA/Pi sync for KA/Pi running 437Implemented direct KDE<->KA/Pi sync for KA/Pi running
434on Linux desktop. 438on Linux desktop.
435 439
436Added feature "remove sync info" to sync menu. 440Added feature "remove sync info" to sync menu.
437 441
438Tweaked the KO/Pi What's next view a bit, added 442Tweaked the KO/Pi What's next view a bit, added
439setting to hide events that are done. 443setting to hide events that are done.
440 444
441Disabled "beam receive enabled" on startup to 445Disabled "beam receive enabled" on startup to
442avoid problems if Fastload is enabled. 446avoid problems if Fastload is enabled.
443Please set "beam receive enabled", 447Please set "beam receive enabled",
444if you want to receive data via IR. 448if you want to receive data via IR.
445 449
446Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 450Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
447on Linux desktop. 451on Linux desktop.
448 452
449Made in KA/Pi scrolling possible, if details view is selected. 453Made in KA/Pi scrolling possible, if details view is selected.
450(The keyboard focus is set automatically to the search line) 454(The keyboard focus is set automatically to the search line)
451 455
452Fixed a bug in DMT sync, that a new entry in DTM was added 456Fixed a bug in DMT sync, that a new entry in DTM was added
453on every sync to Kx/Pi. 457on every sync to Kx/Pi.
454 458
455Fixed missing writing of KA/Pi categories to DMT entries when syncing. 459Fixed missing writing of KA/Pi categories to DMT entries when syncing.
456 460
457Fixed a bug in DMT sync with todos created in KO/Pi containing 461Fixed a bug in DMT sync with todos created in KO/Pi containing
458non-latin1 characters. 462non-latin1 characters.
459 463
460Rearranged package contents of Sharp-ipks and made all 464Rearranged package contents of Sharp-ipks and made all
461packages installable on SD again. 465packages installable on SD again.
462 466
463Fixed the writing of addressbook data in DTM sync. 467Fixed the writing of addressbook data in DTM sync.
464Empty fields in KA/Pi were not removed. 468Empty fields in KA/Pi were not removed.
465 469
466Added better category handling in KA/Pi: 470Added better category handling in KA/Pi:
467Added item 471Added item
468Edit Categories and 472Edit Categories and
469Manage new categories 473Manage new categories
470to the settings menu. 474to the settings menu.
471Possible to configure a view to display categories. 475Possible to configure a view to display categories.
472 476
473Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 477Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
474 478
475Fixed displaying of "free" days and time in KO Monthview and Agendaview. 479Fixed displaying of "free" days and time in KO Monthview and Agendaview.
476 480
477... and many other bugfixes. 481... and many other bugfixes.
478 482
479********** VERSION 1.9.10 ************ 483********** VERSION 1.9.10 ************
480 484
481Many internal small bugfixes. 485Many internal small bugfixes.
482And fix of the "big" bug in KO/Pi, 486And fix of the "big" bug in KO/Pi,
483that after Syncing the appointments had an offset by several hours. 487that after Syncing the appointments had an offset by several hours.
484That was a problem with the internal timezone setting, 488That was a problem with the internal timezone setting,
485introduced by the changed timezone configuration settings. 489introduced by the changed timezone configuration settings.
486 490
487German translation for OM/Pi is now available. 491German translation for OM/Pi is now available.
488 492
489 493
490********** VERSION 1.9.9 ************ 494********** VERSION 1.9.9 ************
491 495
492KDE-Pim/Pi has a new Member! 496KDE-Pim/Pi has a new Member!
493It is called PWM/Pi (Passwordmanager/platform-independent) 497It is called PWM/Pi (Passwordmanager/platform-independent)
494and it is available for the Zaurus. 498and it is available for the Zaurus.
495It is planned, that it will be available later for Windows. 499It is planned, that it will be available later for Windows.
496(And for Linux, of course). 500(And for Linux, of course).
497It is a port of the Passwordmanager of KDE. 501It is a port of the Passwordmanager of KDE.
498It will need the MicroKDElibs to run. 502It will need the MicroKDElibs to run.
499 503
500Made loading of addressbooks in KA/Pi up to 7 times faster! 504Made loading of addressbooks in KA/Pi up to 7 times faster!
501The bigger your addressbook file, the more starting speed 505The bigger your addressbook file, the more starting speed
502will you gain. (relatively) 506will you gain. (relatively)
503 507
504The Qtopia addressbook connector is now platform independend 508The Qtopia addressbook connector is now platform independend
505as well and should work on any platform for importing/exporting 509as well and should work on any platform for importing/exporting
506Qtopia and Opie XML files. 510Qtopia and Opie XML files.
507 511
508Added a +30min feature to the timezone settings to make 512Added a +30min feature to the timezone settings to make
509KDE-Pim/Pi useable in Australia and other parts on the 513KDE-Pim/Pi useable in Australia and other parts on the
510world with strange timezones ;-) 514world with strange timezones ;-)
511 515
512German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 516German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
513 517
514It is now possible to disable the 518It is now possible to disable the
515"receive data via infrared" feature, such that syncing with 519"receive data via infrared" feature, such that syncing with
516Outlook is now possible again with Kx/Pi runing. 520Outlook is now possible again with Kx/Pi runing.
517Please disable it, before syncing Sharp DTM with Outlook. 521Please disable it, before syncing Sharp DTM with Outlook.
518For your convenience, the "receive data via infrared" feature 522For your convenience, the "receive data via infrared" feature
519is disabled automatically, if you sync Kx/Pi with DTM. 523is disabled automatically, if you sync Kx/Pi with DTM.
520You have to enable it again manually after syncing. 524You have to enable it again manually after syncing.
521Enabling this feature makes it impossible to start the 525Enabling this feature makes it impossible to start the
522Sharp DTM apps. If this feature is enabled, you will only get the 526Sharp DTM apps. If this feature is enabled, you will only get the
523alarm notification from KO/Pi and not from the Sharp calendar. 527alarm notification from KO/Pi and not from the Sharp calendar.
524This is very useful if you sync KO/Pi with Sharp DTM, 528This is very useful if you sync KO/Pi with Sharp DTM,
525because after syncing you usually would get notified about 529because after syncing you usually would get notified about
526an alarm by KO/Pi and the Sharp Calendar. 530an alarm by KO/Pi and the Sharp Calendar.
527 531
528Together with the Linux desktop version of KO/Pi 532Together with the Linux desktop version of KO/Pi
529it is now possible to sync KO/Pi on the Zaurus 533it is now possible to sync KO/Pi on the Zaurus
530with the complete KDE-desktop (3.3 or later) 534with the complete KDE-desktop (3.3 or later)
531calendar data easily. 535calendar data easily.
532That makes it possible to sync the Z with one 536That makes it possible to sync the Z with one
533click of a mouse with the KDE-Desktop. 537click of a mouse with the KDE-Desktop.
534This feature it available for all Zaurus platforms KO/Pi 538This feature it available for all Zaurus platforms KO/Pi
535is running on. 539is running on.
536The only thing needed is a running KO/Pi on Linux and 540The only thing needed is a running KO/Pi on Linux and
537a compiled version of the small 541a compiled version of the small
538KDE-Pim/Pi<->KDE-Desktop access command line program, 542KDE-Pim/Pi<->KDE-Desktop access command line program,
539which is in the KDE-Pim/Pi sources available. 543which is in the KDE-Pim/Pi sources available.
540 544
541The "KDE-desktop" syncing feature for KA/Pi will follow 545The "KDE-desktop" syncing feature for KA/Pi will follow
542in the next releases. 546in the next releases.
543 547
544Fixed the vcard export bug, which had the version 1.9.8. 548Fixed the vcard export bug, which had the version 1.9.8.
545 549
546Added missing GERMAN translation to KO/Pi. 550Added missing GERMAN translation to KO/Pi.
547Hi PsionX, could you add the missing french translation?Thx! 551Hi PsionX, could you add the missing french translation?Thx!
548 552
549Translation files for KA/Pi are available as well. 553Translation files for KA/Pi are available as well.
550GERMAN translation will be available in the next release. 554GERMAN translation will be available in the next release.
551PsionX ( yres, you again ;-) ), could you start translating 555PsionX ( yres, you again ;-) ), could you start translating
552KA/Pi? Thx! 556KA/Pi? Thx!
553 557
554You can download the version 1.9.9 at 558You can download the version 1.9.9 at
555 559
556http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 560http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
557 561
558Note: 562Note:
559To run the mail program OM/Pi you need libopenssl. 563To run the mail program OM/Pi you need libopenssl.
560A link to a download loaction is available at 564A link to a download loaction is available at
561ZSI at www.killefiz.de 565ZSI at www.killefiz.de
562 566
563 567
564********** VERSION 1.9.8 ************ 568********** VERSION 1.9.8 ************
565 569
566Fixed character decoding in OM/Pi. 570Fixed character decoding in OM/Pi.
567(e.g. German "Umlaute" were not displayed properly.) 571(e.g. German "Umlaute" were not displayed properly.)
568 572
569Made is possible to reparent todos in KO/Pi. 573Made is possible to reparent todos in KO/Pi.
570Use contextmenu or keys (look at Help-Keys + Colors) for that. 574Use contextmenu or keys (look at Help-Keys + Colors) for that.
571 575
572Added the missing Sync-Howto and WhatsNew to the packages. 576Added the missing Sync-Howto and WhatsNew to the packages.
573 577
574KO/Pi on Linux desktop can now sync with KDE desktop. 578KO/Pi on Linux desktop can now sync with KDE desktop.
575That means: When using KO/Pi on Linux desktop for syncing with 579That means: When using KO/Pi on Linux desktop for syncing with
576KDE desktop and the Zaurus, the Zaurus can be synced now 580KDE desktop and the Zaurus, the Zaurus can be synced now
577with all KDE-Calendar resources, not only with one local file. 581with all KDE-Calendar resources, not only with one local file.
578(That makes it possible to sync the Zaurus with the 582(That makes it possible to sync the Zaurus with the
579calendar data on a Kolab server) 583calendar data on a Kolab server)
580 584
581KA/Pi syncing with KDE desktop will be available in the next version. 585KA/Pi syncing with KDE desktop will be available in the next version.
582 586
583 587
584********** VERSION 1.9.7 ************ 588********** VERSION 1.9.7 ************
585 589
586KO/Pi - KA/Pi on Windows: 590KO/Pi - KA/Pi on Windows:
587Now a directory can be defined by the user, where the 591Now a directory can be defined by the user, where the
588application/config data should be saved. 592application/config data should be saved.
589 Define your desired path in the evironment variable 593 Define your desired path in the evironment variable
590 MICROKDEHOME 594 MICROKDEHOME
591 before starting KO/Pi or KA/Pi. 595 before starting KO/Pi or KA/Pi.
592 596
593An easy Kx/Pi to Kx/Pi syncing is now possible 597An easy Kx/Pi to Kx/Pi syncing is now possible
594(it is called Pi-Sync) via network. 598(it is called Pi-Sync) via network.
595Please look at the Sync Howto. 599Please look at the Sync Howto.
596 600
597Exporting of calendar data and contacts to mobile phones is now possible. 601Exporting of calendar data and contacts to mobile phones is now possible.
598The SyncHowto is updated with information howto 602The SyncHowto is updated with information howto
599access/sync mobile phones. 603access/sync mobile phones.
600Please look at the Sync Howto. 604Please look at the Sync Howto.
601 605
602Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 606Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
603Please disable Fastload for the original contact/calendar applications 607Please disable Fastload for the original contact/calendar applications
604and close them. 608and close them.
605KO/Pi and KA/Pi must be running in order to receive the data. 609KO/Pi and KA/Pi must be running in order to receive the data.
606(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 610(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
607 611
608In the KA/Pi details view are now the preferred tel. numbers displayed on top 612In the KA/Pi details view are now the preferred tel. numbers displayed on top
609of the other data ( emails/tel.numbers/addresses) 613of the other data ( emails/tel.numbers/addresses)
610 614
611Fixed some syncing problems in KA/Pi. 615Fixed some syncing problems in KA/Pi.
612 616
613Added font settings for the KA/Pi details view. 617Added font settings for the KA/Pi details view.
614Added fields "children's name" and "gender" to KA/Pi. 618Added fields "children's name" and "gender" to KA/Pi.
615 619
616Made searching in KA/Pi better: 620Made searching in KA/Pi better:
617Now the first item in a view is selected after a search automatically and 621Now the first item in a view is selected after a search automatically and
618the views can be scrolled up/down when the search input field has the keyboard focus. 622the views can be scrolled up/down when the search input field has the keyboard focus.
619 623
620And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 624And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
621 625
622 626
623********** VERSION 1.9.6 ************ 627********** VERSION 1.9.6 ************
624 628
625Changes in the external application communication on the Zaurus 629Changes in the external application communication on the Zaurus
626in order to use less RAM when the apps are running. 630in order to use less RAM when the apps are running.
627First syncing of addressbooks (KA/Pi) is possible. 631First syncing of addressbooks (KA/Pi) is possible.
628 632
629 633
630********** VERSION 1.9.5a ************ 634********** VERSION 1.9.5a ************
631 635
632Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 636Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
633Fixed some small bugs. 637Fixed some small bugs.
634KA/Pi shows now the birthday in summary view. 638KA/Pi shows now the birthday in summary view.
635Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 639Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
636for displaying dates. 640for displaying dates.
637 641
638 642
639********** VERSION 1.9.5 ************ 643********** VERSION 1.9.5 ************
640 644
641There is still no Addressbook syncing! 645There is still no Addressbook syncing!
642 646
643New in 1.9.5: 647New in 1.9.5:
644 648
645Many bugfixes. 649Many bugfixes.
646Better searching in KA/Pi. 650Better searching in KA/Pi.
647You can configure in KA/Pi if you want to search only after 651You can configure in KA/Pi if you want to search only after
648<return> key pressed. 652<return> key pressed.
649 653
650Better mail downloading in OM/Pi. 654Better mail downloading in OM/Pi.
651 655
652First experimental alpha version of sync of KO/Pi with mobile phones. 656First experimental alpha version of sync of KO/Pi with mobile phones.
653See gammu documentation for supported phones. 657See gammu documentation for supported phones.
654You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. 658You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp.
655Quick hint how to use: 659Quick hint how to use:
656NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 660NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
657Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 661Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
658Create syncprofile - mobile device 662Create syncprofile - mobile device
659Remove entry for model. (Leave empty ). 663Remove entry for model. (Leave empty ).
660Enable infrared on Zaurus and your Phone. 664Enable infrared on Zaurus and your Phone.
661Sync. 665Sync.
662To get a more detailed log, start kopi from konsole. 666To get a more detailed log, start kopi from konsole.
663 667
664********** VERSION 1.9.4 ************ 668********** VERSION 1.9.4 ************
665 669
666This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 670This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
667 671
668WARNING: 672WARNING:
669PLEASE BACKUP ALL YOUR DATA! 673PLEASE BACKUP ALL YOUR DATA!
670We have changed a lot and maybe there are some unknown problems. 674We have changed a lot and maybe there are some unknown problems.
671 675
672SYNC HANDLING HAS CHANGED! 676SYNC HANDLING HAS CHANGED!
673Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 677Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
674(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 678(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
675 679
676You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 680You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
677If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. 681If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well.
678 682
679As programs are available: 683As programs are available:
680KO/Pi (korganizer ipk) - a calendar program. 684KO/Pi (korganizer ipk) - a calendar program.
681KA/Pi (kaddressbook ipk ) - an addressbook 685KA/Pi (kaddressbook ipk ) - an addressbook
682OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 686OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
683 687
684An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 688An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
685(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 689(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
686 690
687All the applications are installed in a "Pim" TAB. 691All the applications are installed in a "Pim" TAB.
688If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk 692If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk
689 693
690All the application are integrated. 694All the application are integrated.
691Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. 695Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail.
692 696
693HINT: 697HINT:
694If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 698If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
695 699
696What's new? 700What's new?
697 701
698SYNC HANDLING HAS CHANGED! 702SYNC HANDLING HAS CHANGED!
699Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 703Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
700(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 704(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
701 705
702New in OM/Pi: 706New in OM/Pi:
703When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. 707When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails.
704 708
705New in KO/Pi: 709New in KO/Pi:
706French is now available for KO/Pi. 710French is now available for KO/Pi.
707Choose menu:Actions - Configure:TAB locale 711Choose menu:Actions - Configure:TAB locale
708Syncing has changed. 712Syncing has changed.
709Phone sync available soon. 713Phone sync available soon.
710Not much changes, I cannot remember them ... 714Not much changes, I cannot remember them ...
711 715
712New in KA/Pi: 716New in KA/Pi:
713Beaming possible. 717Beaming possible.
714Sharp DTM readonly access possible( create a new DTM resource ); 718Sharp DTM readonly access possible( create a new DTM resource );
715Better searching possible. 719Better searching possible.
716Search is performed only after pressing the return key. 720Search is performed only after pressing the return key.
717Use wildcard * to specify parts of a name. 721Use wildcard * to specify parts of a name.
718 722
719Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . 723Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * .
720 724
721A big improvement is the new management of the contact access. 725A big improvement is the new management of the contact access.
722In version 1.9.3, every application was using their own addressbook access data. 726In version 1.9.3, every application was using their own addressbook access data.
723That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 727That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
724That was wasting of memory, if you had several hundreds of contacts. 728That was wasting of memory, if you had several hundreds of contacts.
725 729
726Now only KA/Pi accesses the addressbook. 730Now only KA/Pi accesses the addressbook.
727If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. 731If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them.
728If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 732If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
729That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 733That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
730 734
731New in the KO/Pi alarm applet: 735New in the KO/Pi alarm applet:
732Configure your own timer popup menu! 736Configure your own timer popup menu!
733(Text and minutes for timer countdown) 737(Text and minutes for timer countdown)
734Just edit the file 738Just edit the file
735(yourhomedir)/.kopialarmtimerrc 739(yourhomedir)/.kopialarmtimerrc
736and start/stop a timer to get a new menu with the data of this file. 740and start/stop a timer to get a new menu with the data of this file.
737 741
738********** VERSION 1.9.3 ************ 742********** VERSION 1.9.3 ************
7391) 7431)
740Now KO/Pi on Windows imports directly the calendar data of 744Now KO/Pi on Windows imports directly the calendar data of
741an installed Outlook. Should work with OL version >= 2000. 745an installed Outlook. Should work with OL version >= 2000.
742 746
743********** VERSION 1.9.2 ************ 747********** VERSION 1.9.2 ************
7441) 7481)
745KDE-Pim/Pi has got a new member: 749KDE-Pim/Pi has got a new member:
746KmicroMail (KM/Pi) is a mail program, 750KmicroMail (KM/Pi) is a mail program,
747which can handle IMAP and POP mail access. 751which can handle IMAP and POP mail access.
748It is based on Opie-Mail v3. 752It is based on Opie-Mail v3.
749All dependencies to the Opie libraries ar removed, 753All dependencies to the Opie libraries ar removed,
750such that no additional Opie lib is needed. 754such that no additional Opie lib is needed.
751It is already integrated in KO/Pi and KA/Pi. 755It is already integrated in KO/Pi and KA/Pi.
752It it now available for the Zaurus,probably it 756It it now available for the Zaurus,probably it
753will be available for other platforms later. 757will be available for other platforms later.
754Hint: 758Hint:
755Create your own contact (name + email) 759Create your own contact (name + email)
756in KA/Pi, select this contact and choose menu: 760in KA/Pi, select this contact and choose menu:
757Settings - Set Who Am I. 761Settings - Set Who Am I.
758Now the settings of this contact are used as 762Now the settings of this contact are used as
759the sender data in KM/Pi. 763the sender data in KM/Pi.
7602) 7642)
761KDE-Pim/Pi is split up in five different 765KDE-Pim/Pi is split up in five different
762packages now precompiled for Sharp Zaurus: 766packages now precompiled for Sharp Zaurus:
763--kmicrokdelibs_1.9.2_arm.ipk 767--kmicrokdelibs_1.9.2_arm.ipk
764The libs are needed for any 768The libs are needed for any
765of the following programs: 769of the following programs:
766--kaddressbook_1.9.2_arm.ipk 770--kaddressbook_1.9.2_arm.ipk
767--kmicromail_1.9.2_arm.ipk 771--kmicromail_1.9.2_arm.ipk
768--korganizer_1.9.2_arm.ipk 772--korganizer_1.9.2_arm.ipk
769Independ from that, there is the alarm applet 773Independ from that, there is the alarm applet
770available for KO/Pi, which also offers 774available for KO/Pi, which also offers
771quick access for a new mail or 775quick access for a new mail or
772showing the addressbook.: 776showing the addressbook.:
773--korganizer-alarm_1.9.2_arm.ipk 777--korganizer-alarm_1.9.2_arm.ipk
774Independend means, that the alarm applet 778Independend means, that the alarm applet
775does not need any of the libs or programs above to run. 779does not need any of the libs or programs above to run.
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 93fb7de..09e52b8 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -1,982 +1,989 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2#include <stdlib.h> 2#include <stdlib.h>
3#include <libetpan/libetpan.h> 3#include <libetpan/libetpan.h>
4#include <qpe/global.h> 4#include <qpe/global.h>
5#include <qapplication.h> 5#include <qapplication.h>
6#include "imapwrapper.h" 6#include "imapwrapper.h"
7#include "mailtypes.h" 7#include "mailtypes.h"
8#include "logindialog.h" 8#include "logindialog.h"
9#include <qprogressbar.h> 9#include <qprogressbar.h>
10#include "genericwrapper.h" 10#include "genericwrapper.h"
11#include <kglobal.h> 11#include <kglobal.h>
12 12
13using namespace Opie::Core; 13using namespace Opie::Core;
14int IMAPwrapper::mMax = 0; 14int IMAPwrapper::mMax = 0;
15int IMAPwrapper::mCurrent = 0; 15int IMAPwrapper::mCurrent = 0;
16 16
17IMAPwrapper::IMAPwrapper( IMAPaccount *a ) 17IMAPwrapper::IMAPwrapper( IMAPaccount *a )
18 : AbstractMail() 18 : AbstractMail()
19{ 19{
20 account = a; 20 account = a;
21 m_imap = 0; 21 m_imap = 0;
22 m_Lastmbox = ""; 22 m_Lastmbox = "";
23 mCurrent = 0; 23 mCurrent = 0;
24 mMax = 0; 24 mMax = 0;
25} 25}
26 26
27IMAPwrapper::~IMAPwrapper() 27IMAPwrapper::~IMAPwrapper()
28{ 28{
29 logout(); 29 logout();
30} 30}
31 31
32/* to avoid to often select statements in loops etc. 32/* to avoid to often select statements in loops etc.
33 we trust that we are logged in and connection is established!*/ 33 we trust that we are logged in and connection is established!*/
34int IMAPwrapper::selectMbox(const QString&mbox) 34int IMAPwrapper::selectMbox(const QString&mbox)
35{ 35{
36 if (mbox == m_Lastmbox) { 36 if (mbox == m_Lastmbox) {
37 return MAILIMAP_NO_ERROR; 37 return MAILIMAP_NO_ERROR;
38 } 38 }
39 int err = mailimap_select( m_imap, (char*)mbox.latin1()); 39 int err = mailimap_select( m_imap, (char*)mbox.latin1());
40 if ( err != MAILIMAP_NO_ERROR ) { 40 if ( err != MAILIMAP_NO_ERROR ) {
41 m_Lastmbox = ""; 41 m_Lastmbox = "";
42 return err; 42 return err;
43 } 43 }
44 m_Lastmbox = mbox; 44 m_Lastmbox = mbox;
45 return err; 45 return err;
46} 46}
47 47
48void IMAPwrapper::imap_progress( size_t current, size_t maximum ) 48void IMAPwrapper::imap_progress( size_t current, size_t maximum )
49{ 49{
50 qApp->processEvents(); 50 qApp->processEvents();
51 return; 51 return;
52 //qDebug("imap progress %d of %d ",current,maximum ); 52 //qDebug("imap progress %d of %d ",current,maximum );
53 //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum)); 53 //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum));
54 //qApp->processEvents() 54 //qApp->processEvents()
55 static unsigned int last = 0; 55 static unsigned int last = 0;
56 if ( last != current ) 56 if ( last != current )
57 IMAPwrapper::progress(); 57 IMAPwrapper::progress();
58 last = current; 58 last = current;
59} 59}
60void IMAPwrapper::progress( QString m ) 60void IMAPwrapper::progress( QString m )
61{ 61{
62 static QString mProgrMess; 62 static QString mProgrMess;
63 if ( m != QString::null ) { 63 if ( m != QString::null ) {
64 mProgrMess = m; 64 mProgrMess = m;
65 mCurrent = 1; 65 mCurrent = 1;
66 return; 66 return;
67 } 67 }
68 QString mess; 68 QString mess;
69 //qDebug("progress "); 69 //qDebug("progress ");
70 if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax); 70 if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax);
71 else mess = mProgrMess +i18n(" message %1").arg( mCurrent++); 71 else mess = mProgrMess +i18n(" message %1").arg( mCurrent++);
72 Global::statusMessage(mess); 72 Global::statusMessage(mess);
73 //qDebug("Progress %s %s", mess.latin1(), m.latin1()); 73 //qDebug("Progress %s %s", mess.latin1(), m.latin1());
74 qApp->processEvents(); 74 qApp->processEvents();
75} 75}
76bool IMAPwrapper::start_tls(bool force_tls) 76bool IMAPwrapper::start_tls(bool force_tls)
77{ 77{
78 int err; 78 int err;
79 bool try_tls = force_tls; 79 bool try_tls = force_tls;
80 mailimap_capability_data * cap_data = 0; 80 mailimap_capability_data * cap_data = 0;
81 81
82 err = mailimap_capability(m_imap,&cap_data); 82 err = mailimap_capability(m_imap,&cap_data);
83 if (err != MAILIMAP_NO_ERROR) { 83 if (err != MAILIMAP_NO_ERROR) {
84 Global::statusMessage("error getting capabilities!"); 84 Global::statusMessage("error getting capabilities!");
85 return false; 85 return false;
86 } 86 }
87 clistiter * cur; 87 clistiter * cur;
88 for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) { 88 for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) {
89 struct mailimap_capability * cap; 89 struct mailimap_capability * cap;
90 cap = (struct mailimap_capability *)clist_content(cur); 90 cap = (struct mailimap_capability *)clist_content(cur);
91 if (cap->cap_type == MAILIMAP_CAPABILITY_NAME) { 91 if (cap->cap_type == MAILIMAP_CAPABILITY_NAME) {
92 if (strcasecmp(cap->cap_data.cap_name, "STARTTLS") == 0) { 92 if (strcasecmp(cap->cap_data.cap_name, "STARTTLS") == 0) {
93 try_tls = true; 93 try_tls = true;
94 break; 94 break;
95 } 95 }
96 } 96 }
97 } 97 }
98 if (cap_data) { 98 if (cap_data) {
99 mailimap_capability_data_free(cap_data); 99 mailimap_capability_data_free(cap_data);
100 } 100 }
101 if (try_tls) { 101 if (try_tls) {
102 err = mailimap_starttls(m_imap); 102 err = mailimap_starttls(m_imap);
103 if (err != MAILIMAP_NO_ERROR && force_tls) { 103 if (err != MAILIMAP_NO_ERROR && force_tls) {
104 Global::statusMessage(i18n("Server has no TLS support!")); 104 Global::statusMessage(i18n("Server has no TLS support!"));
105 try_tls = false; 105 try_tls = false;
106 } else { 106 } else {
107 mailstream_low * low; 107 mailstream_low * low;
108 mailstream_low * new_low; 108 mailstream_low * new_low;
109 low = mailstream_get_low(m_imap->imap_stream); 109 low = mailstream_get_low(m_imap->imap_stream);
110 if (!low) { 110 if (!low) {
111 try_tls = false; 111 try_tls = false;
112 } else { 112 } else {
113 int fd = mailstream_low_get_fd(low); 113 int fd = mailstream_low_get_fd(low);
114 if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) { 114 if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) {
115 mailstream_low_free(low); 115 mailstream_low_free(low);
116 mailstream_set_low(m_imap->imap_stream, new_low); 116 mailstream_set_low(m_imap->imap_stream, new_low);
117 } else { 117 } else {
118 try_tls = false; 118 try_tls = false;
119 } 119 }
120 } 120 }
121 } 121 }
122 } 122 }
123 return try_tls; 123 return try_tls;
124} 124}
125 125
126void IMAPwrapper::login() 126void IMAPwrapper::login(bool tryTLS) // = true)
127{ 127{
128 QString server, user, pass; 128 QString server, user, pass;
129 uint16_t port; 129 uint16_t port;
130 int err = MAILIMAP_NO_ERROR; 130 int err = MAILIMAP_NO_ERROR;
131 131
132 if (account->getOffline()) return; 132 if (account->getOffline()) return;
133 /* we are connected this moment */ 133 /* we are connected this moment */
134 /* TODO: setup a timer holding the line or if connection closed - delete the value */ 134 /* TODO: setup a timer holding the line or if connection closed - delete the value */
135 if (m_imap) { 135 if (m_imap) {
136 err = mailimap_noop(m_imap); 136 err = mailimap_noop(m_imap);
137 if (err!=MAILIMAP_NO_ERROR) { 137 if (err!=MAILIMAP_NO_ERROR) {
138 logout(); 138 logout();
139 } else { 139 } else {
140 mailstream_flush(m_imap->imap_stream); 140 mailstream_flush(m_imap->imap_stream);
141 return; 141 return;
142 } 142 }
143 } 143 }
144 server = account->getServer(); 144 server = account->getServer();
145 port = account->getPort().toUInt(); 145 port = account->getPort().toUInt();
146 if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { 146 if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) {
147 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); 147 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true );
148 login.show(); 148 login.show();
149 if ( QDialog::Accepted == login.exec() ) { 149 if ( QDialog::Accepted == login.exec() ) {
150 // ok 150 // ok
151 user = login.getUser(); 151 user = login.getUser();
152 pass = login.getPassword(); 152 pass = login.getPassword();
153 } else { 153 } else {
154 // cancel 154 // cancel
155 return; 155 return;
156 } 156 }
157 } else { 157 } else {
158 user = account->getUser(); 158 user = account->getUser();
159 pass = account->getPassword(); 159 pass = account->getPassword();
160 } 160 }
161 161
162 m_imap = mailimap_new( 20, &imap_progress ); 162 m_imap = mailimap_new( 20, &imap_progress );
163 163
164 /* connect */ 164 /* connect */
165 bool ssl = false; 165 bool ssl = false;
166 bool try_tls = false; 166 bool try_tls = false;
167 bool force_tls = false; 167 bool force_tls = false;
168 168
169 if ( account->ConnectionType() == 2 ) { 169 if ( account->ConnectionType() == 2 ) {
170 ssl = true; 170 ssl = true;
171 } 171 }
172 if (account->ConnectionType()==1) { 172 if (account->ConnectionType()==1) {
173 force_tls = true; 173 force_tls = true;
174 } 174 }
175 175
176 if ( ssl ) { 176 if ( ssl ) {
177 qDebug("using ssl "); 177 qDebug("using ssl ");
178 err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port ); 178 err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port );
179 qDebug("back "); 179 qDebug("back ");
180 } else { 180 } else {
181 err = mailimap_socket_connect( m_imap, (char*)server.latin1(), port ); 181 err = mailimap_socket_connect( m_imap, (char*)server.latin1(), port );
182 } 182 }
183 183
184 if ( err != MAILIMAP_NO_ERROR && 184 if ( err != MAILIMAP_NO_ERROR &&
185 err != MAILIMAP_NO_ERROR_AUTHENTICATED && 185 err != MAILIMAP_NO_ERROR_AUTHENTICATED &&
186 err != MAILIMAP_NO_ERROR_NON_AUTHENTICATED ) { 186 err != MAILIMAP_NO_ERROR_NON_AUTHENTICATED ) {
187 QString failure = ""; 187 QString failure = "";
188 if (err == MAILIMAP_ERROR_CONNECTION_REFUSED) { 188 if (err == MAILIMAP_ERROR_CONNECTION_REFUSED) {
189 failure="Connection refused"; 189 failure="Connection refused";
190 } else { 190 } else {
191 failure="Unknown failure"; 191 failure="Unknown failure";
192 } 192 }
193 Global::statusMessage(i18n("error connecting imap server: %1").arg(failure)); 193 Global::statusMessage(i18n("error connecting imap server: %1").arg(failure));
194 mailimap_free( m_imap ); 194 mailimap_free( m_imap );
195 m_imap = 0; 195 m_imap = 0;
196 return; 196 return;
197 } 197 }
198 198 if ( tryTLS ) {
199 if (!ssl) { 199 if (!ssl) {
200 try_tls = start_tls(force_tls); 200 try_tls = start_tls(force_tls);
201 }
201 } 202 }
202
203 bool ok = true; 203 bool ok = true;
204 if (force_tls && !try_tls) { 204 if (force_tls && !try_tls) {
205 Global::statusMessage(i18n("Server has no TLS support!")); 205 Global::statusMessage(i18n("Server has no TLS support!"));
206 ok = false; 206 ok = false;
207 } 207 }
208 208
209 209
210 /* login */ 210 /* login */
211 211
212 if (ok) { 212 if (ok) {
213 err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() ); 213 err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() );
214 if ( err != MAILIMAP_NO_ERROR ) { 214 if ( err != MAILIMAP_NO_ERROR ) {
215 if ( tryTLS && !force_tls && !try_tls ) {
216 err = mailimap_close( m_imap );
217 mailimap_free( m_imap );
218 m_imap = 0;
219 login( false );
220 return;
221 }
215 Global::statusMessage(i18n("error logging in imap server: %1").arg(m_imap->imap_response)); 222 Global::statusMessage(i18n("error logging in imap server: %1").arg(m_imap->imap_response));
216 ok = false; 223 ok = false;
217 } 224 }
218 } 225 }
219 if (!ok) { 226 if (!ok) {
220 err = mailimap_close( m_imap ); 227 err = mailimap_close( m_imap );
221 mailimap_free( m_imap ); 228 mailimap_free( m_imap );
222 m_imap = 0; 229 m_imap = 0;
223 } 230 }
224} 231}
225 232
226void IMAPwrapper::logout() 233void IMAPwrapper::logout()
227{ 234{
228 int err = MAILIMAP_NO_ERROR; 235 int err = MAILIMAP_NO_ERROR;
229 if (!m_imap) return; 236 if (!m_imap) return;
230 err = mailimap_logout( m_imap ); 237 err = mailimap_logout( m_imap );
231 err = mailimap_close( m_imap ); 238 err = mailimap_close( m_imap );
232 mailimap_free( m_imap ); 239 mailimap_free( m_imap );
233 m_imap = 0; 240 m_imap = 0;
234 m_Lastmbox = ""; 241 m_Lastmbox = "";
235} 242}
236 243
237void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) 244void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb)
238{ 245{
239 246
240 int tryAgain = 1; 247 int tryAgain = 1;
241 while ( tryAgain >= 0 ) { 248 while ( tryAgain >= 0 ) {
242 int err = MAILIMAP_NO_ERROR; 249 int err = MAILIMAP_NO_ERROR;
243 clist *result = 0; 250 clist *result = 0;
244 clistcell *current; 251 clistcell *current;
245 mailimap_fetch_type *fetchType = 0; 252 mailimap_fetch_type *fetchType = 0;
246 mailimap_set *set = 0; 253 mailimap_set *set = 0;
247 254
248 login(); 255 login();
249 if (!m_imap) { 256 if (!m_imap) {
250 return; 257 return;
251 } 258 }
252 /* select mailbox READONLY for operations */ 259 /* select mailbox READONLY for operations */
253 err = selectMbox(mailbox); 260 err = selectMbox(mailbox);
254 if ( err != MAILIMAP_NO_ERROR ) { 261 if ( err != MAILIMAP_NO_ERROR ) {
255 return; 262 return;
256 } 263 }
257 264
258 int last = m_imap->imap_selection_info->sel_exists; 265 int last = m_imap->imap_selection_info->sel_exists;
259 266
260 if (last == 0) { 267 if (last == 0) {
261 Global::statusMessage(i18n("Mailbox has no mails")); 268 Global::statusMessage(i18n("Mailbox has no mails"));
262 return; 269 return;
263 } else { 270 } else {
264 } 271 }
265 progress( i18n("Fetch ")); 272 progress( i18n("Fetch "));
266 mMax = last; 273 mMax = last;
267 //qDebug("last %d ", last); 274 //qDebug("last %d ", last);
268 Global::statusMessage(i18n("Fetching header list")); 275 Global::statusMessage(i18n("Fetching header list"));
269 qApp->processEvents(); 276 qApp->processEvents();
270 /* the range has to start at 1!!! not with 0!!!! */ 277 /* the range has to start at 1!!! not with 0!!!! */
271 //LR the access to web.de imap server is no working with value 1 278 //LR the access to web.de imap server is no working with value 1
272 //qDebug("interval %d - %d ", tryAgain, last-1+tryAgain ); 279 //qDebug("interval %d - %d ", tryAgain, last-1+tryAgain );
273 set = mailimap_set_new_interval( tryAgain, last ); 280 set = mailimap_set_new_interval( tryAgain, last );
274 fetchType = mailimap_fetch_type_new_fetch_att_list_empty(); 281 fetchType = mailimap_fetch_type_new_fetch_att_list_empty();
275 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_envelope()); 282 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_envelope());
276 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_flags()); 283 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_flags());
277 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_internaldate()); 284 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_internaldate());
278 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_rfc822_size()); 285 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_rfc822_size());
279 286
280 err = mailimap_fetch( m_imap, set, fetchType, &result ); 287 err = mailimap_fetch( m_imap, set, fetchType, &result );
281 mailimap_set_free( set ); 288 mailimap_set_free( set );
282 mailimap_fetch_type_free( fetchType ); 289 mailimap_fetch_type_free( fetchType );
283 290
284 QString date,subject,from; 291 QString date,subject,from;
285 292
286 if ( err == MAILIMAP_NO_ERROR ) { 293 if ( err == MAILIMAP_NO_ERROR ) {
287 tryAgain = -1; 294 tryAgain = -1;
288 mailimap_msg_att * msg_att; 295 mailimap_msg_att * msg_att;
289 int i = 0; 296 int i = 0;
290 for (current = clist_begin(result); current != 0; current=clist_next(current)) { 297 for (current = clist_begin(result); current != 0; current=clist_next(current)) {
291 ++i; 298 ++i;
292 //qDebug("iii %d ",i); 299 //qDebug("iii %d ",i);
293 msg_att = (mailimap_msg_att*)current->data; 300 msg_att = (mailimap_msg_att*)current->data;
294 RecMail*m = parse_list_result(msg_att); 301 RecMail*m = parse_list_result(msg_att);
295 if (m) { 302 if (m) {
296 if ( maxSizeInKb == 0 || m->Msgsize()<=(unsigned int ) maxSizeInKb*1024 ) { 303 if ( maxSizeInKb == 0 || m->Msgsize()<=(unsigned int ) maxSizeInKb*1024 ) {
297 m->setNumber(i); 304 m->setNumber(i);
298 m->setMbox(mailbox); 305 m->setMbox(mailbox);
299 m->setWrapper(this); 306 m->setWrapper(this);
300 target.append(m); 307 target.append(m);
301 } 308 }
302 } 309 }
303 } 310 }
304 Global::statusMessage(i18n("Mailbox has %1 mails").arg(target.count())); 311 Global::statusMessage(i18n("Mailbox has %1 mails").arg(target.count()));
305 } else { 312 } else {
306 --tryAgain; 313 --tryAgain;
307 --tryAgain;//disabled tryagain by adding this line 314 --tryAgain;//disabled tryagain by adding this line
308 if ( tryAgain < 0 ) 315 if ( tryAgain < 0 )
309 Global::statusMessage(i18n("Error fetching headers: %1").arg(m_imap->imap_response)); 316 Global::statusMessage(i18n("Error fetching headers: %1").arg(m_imap->imap_response));
310 else 317 else
311 qDebug("try again... "); 318 qDebug("try again... ");
312 } 319 }
313 320
314 if (result) mailimap_fetch_list_free(result); 321 if (result) mailimap_fetch_list_free(result);
315 } 322 }
316} 323}
317 324
318QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() 325QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders()
319{ 326{
320 const char *path, *mask; 327 const char *path, *mask;
321 int err = MAILIMAP_NO_ERROR; 328 int err = MAILIMAP_NO_ERROR;
322 clist *result = 0; 329 clist *result = 0;
323 clistcell *current = 0; 330 clistcell *current = 0;
324 clistcell*cur_flag = 0; 331 clistcell*cur_flag = 0;
325 mailimap_mbx_list_flags*bflags = 0; 332 mailimap_mbx_list_flags*bflags = 0;
326 333
327 QValueList<FolderP>* folders = new QValueList<FolderP>(); 334 QValueList<FolderP>* folders = new QValueList<FolderP>();
328 login(); 335 login();
329 if (!m_imap) { 336 if (!m_imap) {
330 return folders; 337 return folders;
331 } 338 }
332 339
333/* 340/*
334 * First we have to check for INBOX 'cause it sometimes it's not inside the path. 341 * First we have to check for INBOX 'cause it sometimes it's not inside the path.
335 * We must not forget to filter them out in next loop! 342 * We must not forget to filter them out in next loop!
336 * it seems like ugly code. and yes - it is ugly code. but the best way. 343 * it seems like ugly code. and yes - it is ugly code. but the best way.
337 */ 344 */
338 Global::statusMessage(i18n("Fetching folder list")); 345 Global::statusMessage(i18n("Fetching folder list"));
339 qApp->processEvents(); 346 qApp->processEvents();
340 QString temp; 347 QString temp;
341 mask = "INBOX" ; 348 mask = "INBOX" ;
342 mailimap_mailbox_list *list; 349 mailimap_mailbox_list *list;
343 err = mailimap_list( m_imap, (char*)"", (char*)mask, &result ); 350 err = mailimap_list( m_imap, (char*)"", (char*)mask, &result );
344 QString del; 351 QString del;
345 bool selectable = true; 352 bool selectable = true;
346 bool no_inferiors = false; 353 bool no_inferiors = false;
347 if ( err == MAILIMAP_NO_ERROR ) { 354 if ( err == MAILIMAP_NO_ERROR ) {
348 current = result->first; 355 current = result->first;
349 for ( int i = result->count; i > 0; i-- ) { 356 for ( int i = result->count; i > 0; i-- ) {
350 list = (mailimap_mailbox_list *) current->data; 357 list = (mailimap_mailbox_list *) current->data;
351 // it is better use the deep copy mechanism of qt itself 358 // it is better use the deep copy mechanism of qt itself
352 // instead of using strdup! 359 // instead of using strdup!
353 temp = list->mb_name; 360 temp = list->mb_name;
354 del = list->mb_delimiter; 361 del = list->mb_delimiter;
355 current = current->next; 362 current = current->next;
356 if ( (bflags = list->mb_flag) ) { 363 if ( (bflags = list->mb_flag) ) {
357 selectable = !(bflags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG&& 364 selectable = !(bflags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG&&
358 bflags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT); 365 bflags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT);
359 for(cur_flag=clist_begin(bflags->mbf_oflags);cur_flag;cur_flag=clist_next(cur_flag)) { 366 for(cur_flag=clist_begin(bflags->mbf_oflags);cur_flag;cur_flag=clist_next(cur_flag)) {
360 if ( ((mailimap_mbx_list_oflag*)cur_flag->data)->of_type==MAILIMAP_MBX_LIST_OFLAG_NOINFERIORS) { 367 if ( ((mailimap_mbx_list_oflag*)cur_flag->data)->of_type==MAILIMAP_MBX_LIST_OFLAG_NOINFERIORS) {
361 no_inferiors = true; 368 no_inferiors = true;
362 } 369 }
363 } 370 }
364 } 371 }
365 folders->append( new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); 372 folders->append( new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix()));
366 } 373 }
367 } else { 374 } else {
368 qDebug("error fetching folders: "); 375 qDebug("error fetching folders: ");
369 376
370 } 377 }
371 mailimap_list_result_free( result ); 378 mailimap_list_result_free( result );
372 379
373/* 380/*
374 * second stage - get the other then inbox folders 381 * second stage - get the other then inbox folders
375 */ 382 */
376 mask = "*" ; 383 mask = "*" ;
377 path = account->getPrefix().latin1(); 384 path = account->getPrefix().latin1();
378 if (!path) path = ""; 385 if (!path) path = "";
379 err = mailimap_list( m_imap, (char*)path, (char*)mask, &result ); 386 err = mailimap_list( m_imap, (char*)path, (char*)mask, &result );
380 if ( err == MAILIMAP_NO_ERROR ) { 387 if ( err == MAILIMAP_NO_ERROR ) {
381 current = result->first; 388 current = result->first;
382 for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) { 389 for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) {
383 no_inferiors = false; 390 no_inferiors = false;
384 list = (mailimap_mailbox_list *) current->data; 391 list = (mailimap_mailbox_list *) current->data;
385 // it is better use the deep copy mechanism of qt itself 392 // it is better use the deep copy mechanism of qt itself
386 // instead of using strdup! 393 // instead of using strdup!
387 temp = list->mb_name; 394 temp = list->mb_name;
388 if (temp.lower()=="inbox") 395 if (temp.lower()=="inbox")
389 continue; 396 continue;
390 if (temp.lower()==account->getPrefix().lower()) 397 if (temp.lower()==account->getPrefix().lower())
391 continue; 398 continue;
392 if ( (bflags = list->mb_flag) ) { 399 if ( (bflags = list->mb_flag) ) {
393 selectable = !(bflags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG&& 400 selectable = !(bflags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG&&
394 bflags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT); 401 bflags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT);
395 for(cur_flag=clist_begin(bflags->mbf_oflags);cur_flag;cur_flag=clist_next(cur_flag)) { 402 for(cur_flag=clist_begin(bflags->mbf_oflags);cur_flag;cur_flag=clist_next(cur_flag)) {
396 if ( ((mailimap_mbx_list_oflag*)cur_flag->data)->of_type==MAILIMAP_MBX_LIST_OFLAG_NOINFERIORS) { 403 if ( ((mailimap_mbx_list_oflag*)cur_flag->data)->of_type==MAILIMAP_MBX_LIST_OFLAG_NOINFERIORS) {
397 no_inferiors = true; 404 no_inferiors = true;
398 } 405 }
399 } 406 }
400 } 407 }
401 del = list->mb_delimiter; 408 del = list->mb_delimiter;
402 folders->append(new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); 409 folders->append(new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix()));
403 } 410 }
404 } else { 411 } else {
405 qDebug("error fetching folders "); 412 qDebug("error fetching folders ");
406 413
407 } 414 }
408 if (result) mailimap_list_result_free( result ); 415 if (result) mailimap_list_result_free( result );
409 return folders; 416 return folders;
410} 417}
411 418
412RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) 419RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
413{ 420{
414 RecMail * m = 0; 421 RecMail * m = 0;
415 mailimap_msg_att_item *item=0; 422 mailimap_msg_att_item *item=0;
416 clistcell *current,*c,*cf; 423 clistcell *current,*c,*cf;
417 mailimap_msg_att_dynamic*flist; 424 mailimap_msg_att_dynamic*flist;
418 mailimap_flag_fetch*cflag; 425 mailimap_flag_fetch*cflag;
419 int size = 0; 426 int size = 0;
420 QBitArray mFlags(7); 427 QBitArray mFlags(7);
421 QStringList addresslist; 428 QStringList addresslist;
422 429
423 if (!m_att) { 430 if (!m_att) {
424 return m; 431 return m;
425 } 432 }
426 m = new RecMail(); 433 m = new RecMail();
427 for (c = clist_begin(m_att->att_list); c!=NULL;c=clist_next(c) ) { 434 for (c = clist_begin(m_att->att_list); c!=NULL;c=clist_next(c) ) {
428 current = c; 435 current = c;
429 size = 0; 436 size = 0;
430 item = (mailimap_msg_att_item*)current->data; 437 item = (mailimap_msg_att_item*)current->data;
431 if ( !item ) 438 if ( !item )
432 continue; 439 continue;
433 if (item->att_type!=MAILIMAP_MSG_ATT_ITEM_STATIC) { 440 if (item->att_type!=MAILIMAP_MSG_ATT_ITEM_STATIC) {
434 flist = (mailimap_msg_att_dynamic*)item->att_data.att_dyn; 441 flist = (mailimap_msg_att_dynamic*)item->att_data.att_dyn;
435 if (!flist || !flist->att_list) { 442 if (!flist || !flist->att_list) {
436 continue; 443 continue;
437 } 444 }
438 cf = flist->att_list->first; 445 cf = flist->att_list->first;
439 if( cf ) { 446 if( cf ) {
440 for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) { 447 for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) {
441 cflag = (mailimap_flag_fetch*)cf->data; 448 cflag = (mailimap_flag_fetch*)cf->data;
442 if( ! cflag ) 449 if( ! cflag )
443 qDebug("imap:NO cflag "); 450 qDebug("imap:NO cflag ");
444 else { 451 else {
445 if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) { 452 if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) {
446 switch (cflag->fl_flag->fl_type) { 453 switch (cflag->fl_flag->fl_type) {
447 case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */ 454 case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */
448 mFlags.setBit(FLAG_ANSWERED); 455 mFlags.setBit(FLAG_ANSWERED);
449 break; 456 break;
450 case MAILIMAP_FLAG_FLAGGED: /* \Flagged flag */ 457 case MAILIMAP_FLAG_FLAGGED: /* \Flagged flag */
451 mFlags.setBit(FLAG_FLAGGED); 458 mFlags.setBit(FLAG_FLAGGED);
452 break; 459 break;
453 case MAILIMAP_FLAG_DELETED: /* \Deleted flag */ 460 case MAILIMAP_FLAG_DELETED: /* \Deleted flag */
454 mFlags.setBit(FLAG_DELETED); 461 mFlags.setBit(FLAG_DELETED);
455 break; 462 break;
456 case MAILIMAP_FLAG_SEEN: /* \Seen flag */ 463 case MAILIMAP_FLAG_SEEN: /* \Seen flag */
457 mFlags.setBit(FLAG_SEEN); 464 mFlags.setBit(FLAG_SEEN);
458 break; 465 break;
459 case MAILIMAP_FLAG_DRAFT: /* \Draft flag */ 466 case MAILIMAP_FLAG_DRAFT: /* \Draft flag */
460 mFlags.setBit(FLAG_DRAFT); 467 mFlags.setBit(FLAG_DRAFT);
461 break; 468 break;
462 case MAILIMAP_FLAG_KEYWORD: /* keyword flag */ 469 case MAILIMAP_FLAG_KEYWORD: /* keyword flag */
463 break; 470 break;
464 case MAILIMAP_FLAG_EXTENSION: /* \extension flag */ 471 case MAILIMAP_FLAG_EXTENSION: /* \extension flag */
465 break; 472 break;
466 default: 473 default:
467 break; 474 break;
468 } 475 }
469 } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) { 476 } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) {
470 mFlags.setBit(FLAG_RECENT); 477 mFlags.setBit(FLAG_RECENT);
471 } 478 }
472 } 479 }
473 } 480 }
474 } 481 }
475 //qDebug(" continue"); 482 //qDebug(" continue");
476 continue; 483 continue;
477 } 484 }
478 if ( item->att_data.att_static == NULL ) 485 if ( item->att_data.att_static == NULL )
479 continue; 486 continue;
480 if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { 487 if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) {
481 mailimap_envelope * head = item->att_data.att_static->att_data.att_env; 488 mailimap_envelope * head = item->att_data.att_static->att_data.att_env;
482 if ( head == NULL ) 489 if ( head == NULL )
483 continue; 490 continue;
484 if ( head->env_date != NULL ) { 491 if ( head->env_date != NULL ) {
485 m->setDate(head->env_date); 492 m->setDate(head->env_date);
486 //struct mailimf_date_time result; 493 //struct mailimf_date_time result;
487 struct mailimf_date_time* date;// = &result; 494 struct mailimf_date_time* date;// = &result;
488 struct mailimf_date_time **re = &date; 495 struct mailimf_date_time **re = &date;
489 size_t length = m->getDate().length(); 496 size_t length = m->getDate().length();
490 size_t index = 0; 497 size_t index = 0;
491 if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) { 498 if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) {
492 //qDebug("parseDateTime "); 499 //qDebug("parseDateTime ");
493 QDateTime dt = Genericwrapper::parseDateTime( date ); 500 QDateTime dt = Genericwrapper::parseDateTime( date );
494 QString ret; 501 QString ret;
495 if ( dt.date() == QDate::currentDate () ) 502 if ( dt.date() == QDate::currentDate () )
496 ret = KGlobal::locale()->formatTime( dt.time(),true); 503 ret = KGlobal::locale()->formatTime( dt.time(),true);
497 else { 504 else {
498 ret = KGlobal::locale()->formatDateTime( dt,true,true); 505 ret = KGlobal::locale()->formatDateTime( dt,true,true);
499 } 506 }
500 m->setDate( ret ); 507 m->setDate( ret );
501 char tmp[20]; 508 char tmp[20];
502 snprintf( tmp, 20, "%04i-%02i-%02i %02i:%02i:%02i", 509 snprintf( tmp, 20, "%04i-%02i-%02i %02i:%02i:%02i",
503 dt.date().year(),dt.date().month(), dt.date().day(), dt.time().hour(), dt.time().minute(), dt.time().second() ); 510 dt.date().year(),dt.date().month(), dt.date().day(), dt.time().hour(), dt.time().minute(), dt.time().second() );
504 //qDebug("%d iso %s %s ", date->dt_zone, tmp, head->env_date); 511 //qDebug("%d iso %s %s ", date->dt_zone, tmp, head->env_date);
505 m->setIsoDate( QString( tmp ) ); 512 m->setIsoDate( QString( tmp ) );
506 mailimf_date_time_free ( date ); 513 mailimf_date_time_free ( date );
507 } else { 514 } else {
508 m->setIsoDate(head->env_date); 515 m->setIsoDate(head->env_date);
509 } 516 }
510 } 517 }
511 if ( head->env_subject != NULL ) 518 if ( head->env_subject != NULL )
512 m->setSubject(convert_String((const char*)head->env_subject)); 519 m->setSubject(convert_String((const char*)head->env_subject));
513 //m->setSubject(head->env_subject); 520 //m->setSubject(head->env_subject);
514 if (head->env_from!=NULL) { 521 if (head->env_from!=NULL) {
515 addresslist = address_list_to_stringlist(head->env_from->frm_list); 522 addresslist = address_list_to_stringlist(head->env_from->frm_list);
516 if (addresslist.count()) { 523 if (addresslist.count()) {
517 m->setFrom(addresslist.first()); 524 m->setFrom(addresslist.first());
518 } 525 }
519 } 526 }
520 if (head->env_to!=NULL) { 527 if (head->env_to!=NULL) {
521 addresslist = address_list_to_stringlist(head->env_to->to_list); 528 addresslist = address_list_to_stringlist(head->env_to->to_list);
522 m->setTo(addresslist); 529 m->setTo(addresslist);
523 } 530 }
524 if (head->env_cc!=NULL) { 531 if (head->env_cc!=NULL) {
525 addresslist = address_list_to_stringlist(head->env_cc->cc_list); 532 addresslist = address_list_to_stringlist(head->env_cc->cc_list);
526 m->setCC(addresslist); 533 m->setCC(addresslist);
527 } 534 }
528 if (head->env_bcc!=NULL) { 535 if (head->env_bcc!=NULL) {
529 addresslist = address_list_to_stringlist(head->env_bcc->bcc_list); 536 addresslist = address_list_to_stringlist(head->env_bcc->bcc_list);
530 m->setBcc(addresslist); 537 m->setBcc(addresslist);
531 } 538 }
532 /* reply to address, eg. email. */ 539 /* reply to address, eg. email. */
533 if (head->env_reply_to!=NULL) { 540 if (head->env_reply_to!=NULL) {
534 addresslist = address_list_to_stringlist(head->env_reply_to->rt_list); 541 addresslist = address_list_to_stringlist(head->env_reply_to->rt_list);
535 if (addresslist.count()) { 542 if (addresslist.count()) {
536 m->setReplyto(addresslist.first()); 543 m->setReplyto(addresslist.first());
537 } 544 }
538 } 545 }
539 if (head->env_in_reply_to!=NULL) { 546 if (head->env_in_reply_to!=NULL) {
540 QString h(head->env_in_reply_to); 547 QString h(head->env_in_reply_to);
541 while (h.length()>0 && h[0]=='<') { 548 while (h.length()>0 && h[0]=='<') {
542 h.remove(0,1); 549 h.remove(0,1);
543 } 550 }
544 while (h.length()>0 && h[h.length()-1]=='>') { 551 while (h.length()>0 && h[h.length()-1]=='>') {
545 h.remove(h.length()-1,1); 552 h.remove(h.length()-1,1);
546 } 553 }
547 if (h.length()>0) { 554 if (h.length()>0) {
548 m->setInreply(QStringList(h)); 555 m->setInreply(QStringList(h));
549 } 556 }
550 } 557 }
551 if (head->env_message_id != NULL) { 558 if (head->env_message_id != NULL) {
552 m->setMsgid(QString(head->env_message_id)); 559 m->setMsgid(QString(head->env_message_id));
553 } 560 }
554 } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { 561 } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) {
555#if 0 562#if 0
556 mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; 563 mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date;
557 QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); 564 QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec));
558 qDebug("time %s ",da.toString().latin1() ); 565 qDebug("time %s ",da.toString().latin1() );
559#endif 566#endif
560 } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { 567 } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) {
561 size = item->att_data.att_static->att_data.att_rfc822_size; 568 size = item->att_data.att_static->att_data.att_rfc822_size;
562 } 569 }
563 } 570 }
564 /* msg is already deleted */ 571 /* msg is already deleted */
565 if (mFlags.testBit(FLAG_DELETED) && m) { 572 if (mFlags.testBit(FLAG_DELETED) && m) {
566 delete m; 573 delete m;
567 m = 0; 574 m = 0;
568 } 575 }
569 if (m) { 576 if (m) {
570 m->setFlags(mFlags); 577 m->setFlags(mFlags);
571 m->setMsgsize(size); 578 m->setMsgsize(size);
572 } 579 }
573 return m; 580 return m;
574} 581}
575 582
576RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) 583RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail)
577{ 584{
578 RecBodyP body = new RecBody(); 585 RecBodyP body = new RecBody();
579 const char *mb; 586 const char *mb;
580 int err = MAILIMAP_NO_ERROR; 587 int err = MAILIMAP_NO_ERROR;
581 clist *result = 0; 588 clist *result = 0;
582 clistcell *current; 589 clistcell *current;
583 mailimap_fetch_att *fetchAtt = 0; 590 mailimap_fetch_att *fetchAtt = 0;
584 mailimap_fetch_type *fetchType = 0; 591 mailimap_fetch_type *fetchType = 0;
585 mailimap_set *set = 0; 592 mailimap_set *set = 0;
586 mailimap_body*body_desc = 0; 593 mailimap_body*body_desc = 0;
587 594
588 mb = mail->getMbox().latin1(); 595 mb = mail->getMbox().latin1();
589 596
590 login(); 597 login();
591 if (!m_imap) { 598 if (!m_imap) {
592 return body; 599 return body;
593 } 600 }
594 err = selectMbox(mail->getMbox()); 601 err = selectMbox(mail->getMbox());
595 if ( err != MAILIMAP_NO_ERROR ) { 602 if ( err != MAILIMAP_NO_ERROR ) {
596 return body; 603 return body;
597 } 604 }
598 605
599 /* the range has to start at 1!!! not with 0!!!! */ 606 /* the range has to start at 1!!! not with 0!!!! */
600 set = mailimap_set_new_interval( mail->getNumber(),mail->getNumber() ); 607 set = mailimap_set_new_interval( mail->getNumber(),mail->getNumber() );
601 fetchAtt = mailimap_fetch_att_new_bodystructure(); 608 fetchAtt = mailimap_fetch_att_new_bodystructure();
602 fetchType = mailimap_fetch_type_new_fetch_att(fetchAtt); 609 fetchType = mailimap_fetch_type_new_fetch_att(fetchAtt);
603 err = mailimap_fetch( m_imap, set, fetchType, &result ); 610 err = mailimap_fetch( m_imap, set, fetchType, &result );
604 mailimap_set_free( set ); 611 mailimap_set_free( set );
605 mailimap_fetch_type_free( fetchType ); 612 mailimap_fetch_type_free( fetchType );
606 613
607 if (err == MAILIMAP_NO_ERROR && (current=clist_begin(result)) ) { 614 if (err == MAILIMAP_NO_ERROR && (current=clist_begin(result)) ) {
608 mailimap_msg_att * msg_att; 615 mailimap_msg_att * msg_att;
609 msg_att = (mailimap_msg_att*)current->data; 616 msg_att = (mailimap_msg_att*)current->data;
610 mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data; 617 mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data;
611 QValueList<int> path; 618 QValueList<int> path;
612 body_desc = item->att_data.att_static->att_data.att_body; 619 body_desc = item->att_data.att_static->att_data.att_body;
613 traverseBody(mail,body_desc,body,0,path); 620 traverseBody(mail,body_desc,body,0,path);
614 } else { 621 } else {
615 qDebug("error fetching body %d (%d): %s", err, MAILIMAP_NO_ERROR, m_imap->imap_response ); 622 qDebug("error fetching body %d (%d): %s", err, MAILIMAP_NO_ERROR, m_imap->imap_response );
616 } 623 }
617 if (result) mailimap_fetch_list_free(result); 624 if (result) mailimap_fetch_list_free(result);
618 return body; 625 return body;
619} 626}
620 627
621QStringList IMAPwrapper::address_list_to_stringlist(clist*list) 628QStringList IMAPwrapper::address_list_to_stringlist(clist*list)
622{ 629{
623 QStringList l; 630 QStringList l;
624 QString from; 631 QString from;
625 bool named_from; 632 bool named_from;
626 clistcell *current = NULL; 633 clistcell *current = NULL;
627 mailimap_address * current_address=NULL; 634 mailimap_address * current_address=NULL;
628 if (!list) { 635 if (!list) {
629 return l; 636 return l;
630 } 637 }
631 unsigned int count = 0; 638 unsigned int count = 0;
632 for (current=clist_begin(list);current!= NULL;current=clist_next(current)) { 639 for (current=clist_begin(list);current!= NULL;current=clist_next(current)) {
633 from = ""; 640 from = "";
634 named_from = false; 641 named_from = false;
635 current_address=(mailimap_address*)current->data; 642 current_address=(mailimap_address*)current->data;
636 if (current_address->ad_personal_name){ 643 if (current_address->ad_personal_name){
637 from+=convert_String((const char*)current_address->ad_personal_name); 644 from+=convert_String((const char*)current_address->ad_personal_name);
638 from+=" "; 645 from+=" ";
639 named_from = true; 646 named_from = true;
640 } 647 }
641 if (named_from && (current_address->ad_mailbox_name || current_address->ad_host_name)) { 648 if (named_from && (current_address->ad_mailbox_name || current_address->ad_host_name)) {
642 from+="<"; 649 from+="<";
643 } 650 }
644 if (current_address->ad_mailbox_name) { 651 if (current_address->ad_mailbox_name) {
645 from+=QString(current_address->ad_mailbox_name); 652 from+=QString(current_address->ad_mailbox_name);
646 from+="@"; 653 from+="@";
647 } 654 }
648 if (current_address->ad_host_name) { 655 if (current_address->ad_host_name) {
649 from+=QString(current_address->ad_host_name); 656 from+=QString(current_address->ad_host_name);
650 } 657 }
651 if (named_from && (current_address->ad_mailbox_name || current_address->ad_host_name)) { 658 if (named_from && (current_address->ad_mailbox_name || current_address->ad_host_name)) {
652 from+=">"; 659 from+=">";
653 } 660 }
654 l.append(QString(from)); 661 l.append(QString(from));
655 if (++count > 99) { 662 if (++count > 99) {
656 break; 663 break;
657 } 664 }
658 } 665 }
659 return l; 666 return l;
660} 667}
661 668
662encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call) 669encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call)
663{ 670{
664 encodedString*res=new encodedString; 671 encodedString*res=new encodedString;
665 int err; 672 int err;
666 mailimap_fetch_type *fetchType; 673 mailimap_fetch_type *fetchType;
667 mailimap_set *set; 674 mailimap_set *set;
668 clistcell*current,*cur; 675 clistcell*current,*cur;
669 mailimap_section_part * section_part = 0; 676 mailimap_section_part * section_part = 0;
670 mailimap_section_spec * section_spec = 0; 677 mailimap_section_spec * section_spec = 0;
671 mailimap_section * section = 0; 678 mailimap_section * section = 0;
672 mailimap_fetch_att * fetch_att = 0; 679 mailimap_fetch_att * fetch_att = 0;
673 680
674 login(); 681 login();
675 if (!m_imap) { 682 if (!m_imap) {
676 return res; 683 return res;
677 } 684 }
678 if (!internal_call) { 685 if (!internal_call) {
679 err = selectMbox(mail->getMbox()); 686 err = selectMbox(mail->getMbox());
680 if ( err != MAILIMAP_NO_ERROR ) { 687 if ( err != MAILIMAP_NO_ERROR ) {
681 return res; 688 return res;
682 } 689 }
683 } 690 }
684 set = mailimap_set_new_single(mail->getNumber()); 691 set = mailimap_set_new_single(mail->getNumber());
685 692
686 clist*id_list = 0; 693 clist*id_list = 0;
687 694
688 /* if path == empty then its a request for the whole rfc822 mail and generates 695 /* if path == empty then its a request for the whole rfc822 mail and generates
689 a "fetch <id> (body[])" statement on imap server */ 696 a "fetch <id> (body[])" statement on imap server */
690 if (path.count()>0 ) { 697 if (path.count()>0 ) {
691 id_list = clist_new(); 698 id_list = clist_new();
692 for (unsigned j=0; j < path.count();++j) { 699 for (unsigned j=0; j < path.count();++j) {
693 uint32_t * p_id = (uint32_t *)malloc(sizeof(*p_id)); 700 uint32_t * p_id = (uint32_t *)malloc(sizeof(*p_id));
694 *p_id = path[j]; 701 *p_id = path[j];
695 clist_append(id_list,p_id); 702 clist_append(id_list,p_id);
696 } 703 }
697 section_part = mailimap_section_part_new(id_list); 704 section_part = mailimap_section_part_new(id_list);
698 section_spec = mailimap_section_spec_new(MAILIMAP_SECTION_SPEC_SECTION_PART, NULL, section_part, NULL); 705 section_spec = mailimap_section_spec_new(MAILIMAP_SECTION_SPEC_SECTION_PART, NULL, section_part, NULL);
699 } 706 }
700 707
701 section = mailimap_section_new(section_spec); 708 section = mailimap_section_new(section_spec);
702 fetch_att = mailimap_fetch_att_new_body_section(section); 709 fetch_att = mailimap_fetch_att_new_body_section(section);
703 fetchType = mailimap_fetch_type_new_fetch_att(fetch_att); 710 fetchType = mailimap_fetch_type_new_fetch_att(fetch_att);
704 711
705 clist*result = 0; 712 clist*result = 0;
706 713
707 err = mailimap_fetch( m_imap, set, fetchType, &result ); 714 err = mailimap_fetch( m_imap, set, fetchType, &result );
708 mailimap_set_free( set ); 715 mailimap_set_free( set );
709 mailimap_fetch_type_free( fetchType ); 716 mailimap_fetch_type_free( fetchType );
710 717
711 if (err == MAILIMAP_NO_ERROR && (current=clist_begin(result)) ) { 718 if (err == MAILIMAP_NO_ERROR && (current=clist_begin(result)) ) {
712 mailimap_msg_att * msg_att; 719 mailimap_msg_att * msg_att;
713 msg_att = (mailimap_msg_att*)current->data; 720 msg_att = (mailimap_msg_att*)current->data;
714 mailimap_msg_att_item*msg_att_item; 721 mailimap_msg_att_item*msg_att_item;
715 for(cur = clist_begin(msg_att->att_list) ; cur != NULL ; cur = clist_next(cur)) { 722 for(cur = clist_begin(msg_att->att_list) ; cur != NULL ; cur = clist_next(cur)) {
716 msg_att_item = (mailimap_msg_att_item*)clist_content(cur); 723 msg_att_item = (mailimap_msg_att_item*)clist_content(cur);
717 if (msg_att_item->att_type == MAILIMAP_MSG_ATT_ITEM_STATIC) { 724 if (msg_att_item->att_type == MAILIMAP_MSG_ATT_ITEM_STATIC) {
718 if (msg_att_item->att_data.att_static->att_type == MAILIMAP_MSG_ATT_BODY_SECTION) { 725 if (msg_att_item->att_data.att_static->att_type == MAILIMAP_MSG_ATT_BODY_SECTION) {
719 char*text = msg_att_item->att_data.att_static->att_data.att_body_section->sec_body_part; 726 char*text = msg_att_item->att_data.att_static->att_data.att_body_section->sec_body_part;
720 /* detach - we take over the content */ 727 /* detach - we take over the content */
721 msg_att_item->att_data.att_static->att_data.att_body_section->sec_body_part = 0L; 728 msg_att_item->att_data.att_static->att_data.att_body_section->sec_body_part = 0L;
722 res->setContent(text,msg_att_item->att_data.att_static->att_data.att_body_section->sec_length); 729 res->setContent(text,msg_att_item->att_data.att_static->att_data.att_body_section->sec_length);
723 } 730 }
724 } 731 }
725 } 732 }
726 } else { 733 } else {
727 ;//odebug << "error fetching text: " << m_imap->imap_response << "" << oendl; 734 ;//odebug << "error fetching text: " << m_imap->imap_response << "" << oendl;
728 } 735 }
729 if (result) mailimap_fetch_list_free(result); 736 if (result) mailimap_fetch_list_free(result);
730 return res; 737 return res;
731} 738}
732 739
733/* current_recursion is for recursive calls. 740/* current_recursion is for recursive calls.
734 current_count means the position inside the internal loop! */ 741 current_count means the position inside the internal loop! */
735void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body, 742void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,
736 int current_recursion,QValueList<int>recList,int current_count) 743 int current_recursion,QValueList<int>recList,int current_count)
737{ 744{
738 if (!body || current_recursion>=10) { 745 if (!body || current_recursion>=10) {
739 return; 746 return;
740 } 747 }
741 switch (body->bd_type) { 748 switch (body->bd_type) {
742 case MAILIMAP_BODY_1PART: 749 case MAILIMAP_BODY_1PART:
743 { 750 {
744 QValueList<int>countlist = recList; 751 QValueList<int>countlist = recList;
745 countlist.append(current_count); 752 countlist.append(current_count);
746 RecPartP currentPart = new RecPart(); 753 RecPartP currentPart = new RecPart();
747 mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part; 754 mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part;
748 QString id(""); 755 QString id("");
749 currentPart->setPositionlist(countlist); 756 currentPart->setPositionlist(countlist);
750 for (unsigned int j = 0; j < countlist.count();++j) { 757 for (unsigned int j = 0; j < countlist.count();++j) {
751 id+=(j>0?" ":""); 758 id+=(j>0?" ":"");
752 id+=QString("%1").arg(countlist[j]); 759 id+=QString("%1").arg(countlist[j]);
753 } 760 }
754 //odebug << "ID = " << id.latin1() << "" << oendl; 761 //odebug << "ID = " << id.latin1() << "" << oendl;
755 currentPart->setIdentifier(id); 762 currentPart->setIdentifier(id);
756 fillSinglePart(currentPart,part1); 763 fillSinglePart(currentPart,part1);
757 /* important: Check for is NULL 'cause a body can be empty! 764 /* important: Check for is NULL 'cause a body can be empty!
758 And we put it only into the mail if it is the FIRST part */ 765 And we put it only into the mail if it is the FIRST part */
759 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_TEXT && target_body->Bodytext().isNull() && countlist[0]==1) { 766 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_TEXT && target_body->Bodytext().isNull() && countlist[0]==1) {
760 QString body_text = fetchTextPart(mail,countlist,true,currentPart->Encoding()); 767 QString body_text = fetchTextPart(mail,countlist,true,currentPart->Encoding());
761 768
762 size_t index = 0; 769 size_t index = 0;
763 char*res = 0; 770 char*res = 0;
764 int err = MAILIMF_NO_ERROR; 771 int err = MAILIMF_NO_ERROR;
765 772
766 QString charset = currentPart->searchParamter( "charset"); 773 QString charset = currentPart->searchParamter( "charset");
767 qDebug("CHARSET %s ",charset.latin1() ); 774 qDebug("CHARSET %s ",charset.latin1() );
768 if ( false ) { 775 if ( false ) {
769 //if ( !charset.isEmpty() ) { 776 //if ( !charset.isEmpty() ) {
770 target_body->setCharset( charset ); 777 target_body->setCharset( charset );
771 //err = mailmime_encoded_phrase_parse("iso-8859-1", 778 //err = mailmime_encoded_phrase_parse("iso-8859-1",
772 // text, strlen(text),&index, "iso-8859-1",&res); 779 // text, strlen(text),&index, "iso-8859-1",&res);
773 err = mailmime_encoded_phrase_parse(charset.latin1(), 780 err = mailmime_encoded_phrase_parse(charset.latin1(),
774 body_text.latin1(), body_text.length(),&index, "utf-8",&res); 781 body_text.latin1(), body_text.length(),&index, "utf-8",&res);
775 if (err == MAILIMF_NO_ERROR && res && strlen(res)) { 782 if (err == MAILIMF_NO_ERROR && res && strlen(res)) {
776 //qDebug("res %d %s ", index, res); 783 //qDebug("res %d %s ", index, res);
777 body_text = QString::fromUtf8(res); 784 body_text = QString::fromUtf8(res);
778 } 785 }
779 if (res) free(res); 786 if (res) free(res);
780 } 787 }
781 //qDebug("encoding %d text %s ",currentPart->Encoding().latin1(), body_text.latin1() ); 788 //qDebug("encoding %d text %s ",currentPart->Encoding().latin1(), body_text.latin1() );
782 target_body->setDescription(currentPart); 789 target_body->setDescription(currentPart);
783 target_body->setBodytext(body_text); 790 target_body->setBodytext(body_text);
784 if (countlist.count()>1) { 791 if (countlist.count()>1) {
785 target_body->addPart(currentPart); 792 target_body->addPart(currentPart);
786 } 793 }
787 } else { 794 } else {
788 target_body->addPart(currentPart); 795 target_body->addPart(currentPart);
789 } 796 }
790 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_MSG) { 797 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_MSG) {
791 traverseBody(mail,part1->bd_data.bd_type_msg->bd_body,target_body,current_recursion+1,countlist); 798 traverseBody(mail,part1->bd_data.bd_type_msg->bd_body,target_body,current_recursion+1,countlist);
792 } 799 }
793 } 800 }
794 break; 801 break;
795 case MAILIMAP_BODY_MPART: 802 case MAILIMAP_BODY_MPART:
796 { 803 {
797 QValueList<int>countlist = recList; 804 QValueList<int>countlist = recList;
798 clistcell*current=0; 805 clistcell*current=0;
799 mailimap_body*current_body=0; 806 mailimap_body*current_body=0;
800 unsigned int ccount = 1; 807 unsigned int ccount = 1;
801 mailimap_body_type_mpart*mailDescription = body->bd_data.bd_body_mpart; 808 mailimap_body_type_mpart*mailDescription = body->bd_data.bd_body_mpart;
802 for (current=clist_begin(mailDescription->bd_list);current!=0;current=clist_next(current)) { 809 for (current=clist_begin(mailDescription->bd_list);current!=0;current=clist_next(current)) {
803 current_body = (mailimap_body*)current->data; 810 current_body = (mailimap_body*)current->data;
804 if (current_body->bd_type==MAILIMAP_BODY_MPART) { 811 if (current_body->bd_type==MAILIMAP_BODY_MPART) {
805 RecPartP targetPart = new RecPart(); 812 RecPartP targetPart = new RecPart();
806 targetPart->setType("multipart"); 813 targetPart->setType("multipart");
807 fillMultiPart(targetPart,mailDescription); 814 fillMultiPart(targetPart,mailDescription);
808 countlist.append(current_count); 815 countlist.append(current_count);
809 targetPart->setPositionlist(countlist); 816 targetPart->setPositionlist(countlist);
810 target_body->addPart(targetPart); 817 target_body->addPart(targetPart);
811 QString id(""); 818 QString id("");
812 for (unsigned int j = 0; j < countlist.count();++j) { 819 for (unsigned int j = 0; j < countlist.count();++j) {
813 id+=(j>0?" ":""); 820 id+=(j>0?" ":"");
814 id+=QString("%1").arg(countlist[j]); 821 id+=QString("%1").arg(countlist[j]);
815 } 822 }
816 // odebug << "ID(mpart) = " << id.latin1() << "" << oendl; 823 // odebug << "ID(mpart) = " << id.latin1() << "" << oendl;
817 } 824 }
818 traverseBody(mail,current_body,target_body,current_recursion+1,countlist,ccount); 825 traverseBody(mail,current_body,target_body,current_recursion+1,countlist,ccount);
819 if (current_body->bd_type==MAILIMAP_BODY_MPART) { 826 if (current_body->bd_type==MAILIMAP_BODY_MPART) {
820 countlist = recList; 827 countlist = recList;
821 } 828 }
822 ++ccount; 829 ++ccount;
823 } 830 }
824 } 831 }
825 break; 832 break;
826 default: 833 default:
827 break; 834 break;
828 } 835 }
829} 836}
830 837
831void IMAPwrapper::fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description) 838void IMAPwrapper::fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description)
832{ 839{
833 if (!Description) { 840 if (!Description) {
834 return; 841 return;
835 } 842 }
836 switch (Description->bd_type) { 843 switch (Description->bd_type) {
837 case MAILIMAP_BODY_TYPE_1PART_TEXT: 844 case MAILIMAP_BODY_TYPE_1PART_TEXT:
838 target_part->setType("text"); 845 target_part->setType("text");
839 fillSingleTextPart(target_part,Description->bd_data.bd_type_text); 846 fillSingleTextPart(target_part,Description->bd_data.bd_type_text);
840 break; 847 break;
841 case MAILIMAP_BODY_TYPE_1PART_BASIC: 848 case MAILIMAP_BODY_TYPE_1PART_BASIC:
842 fillSingleBasicPart(target_part,Description->bd_data.bd_type_basic); 849 fillSingleBasicPart(target_part,Description->bd_data.bd_type_basic);
843 break; 850 break;
844 case MAILIMAP_BODY_TYPE_1PART_MSG: 851 case MAILIMAP_BODY_TYPE_1PART_MSG:
845 target_part->setType("message"); 852 target_part->setType("message");
846 fillSingleMsgPart(target_part,Description->bd_data.bd_type_msg); 853 fillSingleMsgPart(target_part,Description->bd_data.bd_type_msg);
847 break; 854 break;
848 default: 855 default:
849 break; 856 break;
850 } 857 }
851} 858}
852 859
853void IMAPwrapper::fillSingleTextPart(RecPartP&target_part,mailimap_body_type_text*which) 860void IMAPwrapper::fillSingleTextPart(RecPartP&target_part,mailimap_body_type_text*which)
854{ 861{
855 if (!which) { 862 if (!which) {
856 return; 863 return;
857 } 864 }
858 QString sub; 865 QString sub;
859 sub = which->bd_media_text; 866 sub = which->bd_media_text;
860 //odebug << "Type= text/" << which->bd_media_text << "" << oendl; 867 //odebug << "Type= text/" << which->bd_media_text << "" << oendl;
861 target_part->setSubtype(sub.lower()); 868 target_part->setSubtype(sub.lower());
862 target_part->setLines(which->bd_lines); 869 target_part->setLines(which->bd_lines);
863 fillBodyFields(target_part,which->bd_fields); 870 fillBodyFields(target_part,which->bd_fields);
864} 871}
865 872
866void IMAPwrapper::fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which) 873void IMAPwrapper::fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which)
867{ 874{
868 if (!which) { 875 if (!which) {
869 return; 876 return;
870 } 877 }
871 target_part->setSubtype("rfc822"); 878 target_part->setSubtype("rfc822");
872 //odebug << "Message part" << oendl; 879 //odebug << "Message part" << oendl;
873 /* we set this type to text/plain */ 880 /* we set this type to text/plain */
874 target_part->setLines(which->bd_lines); 881 target_part->setLines(which->bd_lines);
875 fillBodyFields(target_part,which->bd_fields); 882 fillBodyFields(target_part,which->bd_fields);
876} 883}
877 884
878void IMAPwrapper::fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which) 885void IMAPwrapper::fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which)
879{ 886{
880 if (!which) return; 887 if (!which) return;
881 QString sub = which->bd_media_subtype; 888 QString sub = which->bd_media_subtype;
882 target_part->setSubtype(sub.lower()); 889 target_part->setSubtype(sub.lower());
883 if (which->bd_ext_mpart && which->bd_ext_mpart->bd_parameter && which->bd_ext_mpart->bd_parameter->pa_list) { 890 if (which->bd_ext_mpart && which->bd_ext_mpart->bd_parameter && which->bd_ext_mpart->bd_parameter->pa_list) {
884 clistcell*cur = 0; 891 clistcell*cur = 0;
885 mailimap_single_body_fld_param*param=0; 892 mailimap_single_body_fld_param*param=0;
886 for (cur = clist_begin(which->bd_ext_mpart->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) { 893 for (cur = clist_begin(which->bd_ext_mpart->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) {
887 param = (mailimap_single_body_fld_param*)cur->data; 894 param = (mailimap_single_body_fld_param*)cur->data;
888 if (param) { 895 if (param) {
889 target_part->addParameter(QString(param->pa_name).lower(),QString(param->pa_value)); 896 target_part->addParameter(QString(param->pa_name).lower(),QString(param->pa_value));
890 } 897 }
891 } 898 }
892 } 899 }
893} 900}
894 901
895void IMAPwrapper::fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which) 902void IMAPwrapper::fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which)
896{ 903{
897 if (!which) { 904 if (!which) {
898 return; 905 return;
899 } 906 }
900 QString type,sub; 907 QString type,sub;
901 switch (which->bd_media_basic->med_type) { 908 switch (which->bd_media_basic->med_type) {
902 case MAILIMAP_MEDIA_BASIC_APPLICATION: 909 case MAILIMAP_MEDIA_BASIC_APPLICATION:
903 type = "application"; 910 type = "application";
904 break; 911 break;
905 case MAILIMAP_MEDIA_BASIC_AUDIO: 912 case MAILIMAP_MEDIA_BASIC_AUDIO:
906 type = "audio"; 913 type = "audio";
907 break; 914 break;
908 case MAILIMAP_MEDIA_BASIC_IMAGE: 915 case MAILIMAP_MEDIA_BASIC_IMAGE:
909 type = "image"; 916 type = "image";
910 break; 917 break;
911 case MAILIMAP_MEDIA_BASIC_MESSAGE: 918 case MAILIMAP_MEDIA_BASIC_MESSAGE:
912 type = "message"; 919 type = "message";
913 break; 920 break;
914 case MAILIMAP_MEDIA_BASIC_VIDEO: 921 case MAILIMAP_MEDIA_BASIC_VIDEO:
915 type = "video"; 922 type = "video";
916 break; 923 break;
917 case MAILIMAP_MEDIA_BASIC_OTHER: 924 case MAILIMAP_MEDIA_BASIC_OTHER:
918 default: 925 default:
919 if (which->bd_media_basic->med_basic_type) { 926 if (which->bd_media_basic->med_basic_type) {
920 type = which->bd_media_basic->med_basic_type; 927 type = which->bd_media_basic->med_basic_type;
921 } else { 928 } else {
922 type = ""; 929 type = "";
923 } 930 }
924 break; 931 break;
925 } 932 }
926 if (which->bd_media_basic->med_subtype) { 933 if (which->bd_media_basic->med_subtype) {
927 sub = which->bd_media_basic->med_subtype; 934 sub = which->bd_media_basic->med_subtype;
928 } else { 935 } else {
929 sub = ""; 936 sub = "";
930 } 937 }
931 // odebug << "Type = " << type.latin1() << "/" << sub.latin1() << "" << oendl; 938 // odebug << "Type = " << type.latin1() << "/" << sub.latin1() << "" << oendl;
932 target_part->setType(type.lower()); 939 target_part->setType(type.lower());
933 target_part->setSubtype(sub.lower()); 940 target_part->setSubtype(sub.lower());
934 fillBodyFields(target_part,which->bd_fields); 941 fillBodyFields(target_part,which->bd_fields);
935} 942}
936 943
937void IMAPwrapper::fillBodyFields(RecPartP&target_part,mailimap_body_fields*which) 944void IMAPwrapper::fillBodyFields(RecPartP&target_part,mailimap_body_fields*which)
938{ 945{
939 if (!which) return; 946 if (!which) return;
940 if (which->bd_parameter && which->bd_parameter->pa_list && which->bd_parameter->pa_list->count>0) { 947 if (which->bd_parameter && which->bd_parameter->pa_list && which->bd_parameter->pa_list->count>0) {
941 clistcell*cur; 948 clistcell*cur;
942 mailimap_single_body_fld_param*param=0; 949 mailimap_single_body_fld_param*param=0;
943 for (cur = clist_begin(which->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) { 950 for (cur = clist_begin(which->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) {
944 param = (mailimap_single_body_fld_param*)cur->data; 951 param = (mailimap_single_body_fld_param*)cur->data;
945 if (param) { 952 if (param) {
946 target_part->addParameter(QString(param->pa_name).lower(),QString(param->pa_value)); 953 target_part->addParameter(QString(param->pa_name).lower(),QString(param->pa_value));
947 } 954 }
948 } 955 }
949 } 956 }
950 mailimap_body_fld_enc*enc = which->bd_encoding; 957 mailimap_body_fld_enc*enc = which->bd_encoding;
951 QString encoding(""); 958 QString encoding("");
952 switch (enc->enc_type) { 959 switch (enc->enc_type) {
953 case MAILIMAP_BODY_FLD_ENC_7BIT: 960 case MAILIMAP_BODY_FLD_ENC_7BIT:
954 encoding = "7bit"; 961 encoding = "7bit";
955 break; 962 break;
956 case MAILIMAP_BODY_FLD_ENC_8BIT: 963 case MAILIMAP_BODY_FLD_ENC_8BIT:
957 encoding = "8bit"; 964 encoding = "8bit";
958 break; 965 break;
959 case MAILIMAP_BODY_FLD_ENC_BINARY: 966 case MAILIMAP_BODY_FLD_ENC_BINARY:
960 encoding="binary"; 967 encoding="binary";
961 break; 968 break;
962 case MAILIMAP_BODY_FLD_ENC_BASE64: 969 case MAILIMAP_BODY_FLD_ENC_BASE64:
963 encoding="base64"; 970 encoding="base64";
964 break; 971 break;
965 case MAILIMAP_BODY_FLD_ENC_QUOTED_PRINTABLE: 972 case MAILIMAP_BODY_FLD_ENC_QUOTED_PRINTABLE:
966 encoding="quoted-printable"; 973 encoding="quoted-printable";
967 break; 974 break;
968 case MAILIMAP_BODY_FLD_ENC_OTHER: 975 case MAILIMAP_BODY_FLD_ENC_OTHER:
969 default: 976 default:
970 if (enc->enc_value) { 977 if (enc->enc_value) {
971 char*t=enc->enc_value; 978 char*t=enc->enc_value;
972 encoding=QString(enc->enc_value); 979 encoding=QString(enc->enc_value);
973 enc->enc_value=0L; 980 enc->enc_value=0L;
974 free(t); 981 free(t);
975 } 982 }
976 } 983 }
977 if (which->bd_description) { 984 if (which->bd_description) {
978 target_part->setDescription(QString(which->bd_description)); 985 target_part->setDescription(QString(which->bd_description));
979 } 986 }
980 target_part->setEncoding(encoding); 987 target_part->setEncoding(encoding);
981 target_part->setSize(which->bd_size); 988 target_part->setSize(which->bd_size);
982} 989}
diff --git a/kmicromail/libmailwrapper/imapwrapper.h b/kmicromail/libmailwrapper/imapwrapper.h
index 5535d8d..31c60a8 100644
--- a/kmicromail/libmailwrapper/imapwrapper.h
+++ b/kmicromail/libmailwrapper/imapwrapper.h
@@ -1,85 +1,85 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2#ifndef __IMAPWRAPPER 2#ifndef __IMAPWRAPPER
3#define __IMAPWRAPPER 3#define __IMAPWRAPPER
4 4
5#include <qlist.h> 5#include <qlist.h>
6#include "mailwrapper.h" 6#include "mailwrapper.h"
7#include "abstractmail.h" 7#include "abstractmail.h"
8#include <libetpan/clist.h> 8#include <libetpan/clist.h>
9 9
10struct mailimap; 10struct mailimap;
11struct mailimap_body; 11struct mailimap_body;
12struct mailimap_body_type_1part; 12struct mailimap_body_type_1part;
13struct mailimap_body_type_text; 13struct mailimap_body_type_text;
14struct mailimap_body_type_basic; 14struct mailimap_body_type_basic;
15struct mailimap_body_type_msg; 15struct mailimap_body_type_msg;
16struct mailimap_body_type_mpart; 16struct mailimap_body_type_mpart;
17struct mailimap_body_fields; 17struct mailimap_body_fields;
18struct mailimap_msg_att; 18struct mailimap_msg_att;
19class encodedString; 19class encodedString;
20 20
21class IMAPwrapper : public AbstractMail 21class IMAPwrapper : public AbstractMail
22{ 22{
23 Q_OBJECT 23 Q_OBJECT
24public: 24public:
25 IMAPwrapper( IMAPaccount *a ); 25 IMAPwrapper( IMAPaccount *a );
26 virtual ~IMAPwrapper(); 26 virtual ~IMAPwrapper();
27 virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); 27 virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders();
28 virtual void listMessages(const QString & mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0); 28 virtual void listMessages(const QString & mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0);
29 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 29 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX");
30 30
31 virtual void deleteMail(const RecMailP&mail); 31 virtual void deleteMail(const RecMailP&mail);
32 void deleteMailList(const QValueList<RecMailP>&target); 32 void deleteMailList(const QValueList<RecMailP>&target);
33 virtual void answeredMail(const RecMailP&mail); 33 virtual void answeredMail(const RecMailP&mail);
34 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder); 34 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder);
35 virtual void storeMessage(const char*msg,size_t length, const QString&folder); 35 virtual void storeMessage(const char*msg,size_t length, const QString&folder);
36 virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, 36 virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,
37 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit,int sizeInKb = 0); 37 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit,int sizeInKb = 0);
38 virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); 38 virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit);
39 39
40 virtual RecBodyP fetchBody(const RecMailP&mail); 40 virtual RecBodyP fetchBody(const RecMailP&mail);
41 virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part); 41 virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part);
42 virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPartP&part); 42 virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPartP&part);
43 virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPartP&part); 43 virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPartP&part);
44 virtual encodedString* fetchRawBody(const RecMailP&mail); 44 virtual encodedString* fetchRawBody(const RecMailP&mail);
45 45
46 virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0, 46 virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0,
47 const QString& delemiter="/",bool getsubfolder=false); 47 const QString& delemiter="/",bool getsubfolder=false);
48 virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&folder); 48 virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&folder);
49 49
50 static void imap_progress( size_t current, size_t maximum ); 50 static void imap_progress( size_t current, size_t maximum );
51 51
52 virtual void logout(); 52 virtual void logout();
53 virtual MAILLIB::ATYPE getType()const; 53 virtual MAILLIB::ATYPE getType()const;
54 virtual const QString&getName()const; 54 virtual const QString&getName()const;
55 virtual Account* getAccount() { return account; }; 55 virtual Account* getAccount() { return account; };
56 56
57protected: 57protected:
58 RecMail*parse_list_result(mailimap_msg_att*); 58 RecMail*parse_list_result(mailimap_msg_att*);
59 void login(); 59 void login(bool tryTLS = true);
60 bool start_tls(bool force=true); 60 bool start_tls(bool force=true);
61 61
62 virtual QString fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call=false,const QString&enc=""); 62 virtual QString fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call=false,const QString&enc="");
63 virtual encodedString*fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call); 63 virtual encodedString*fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call);
64 int selectMbox(const QString&mbox); 64 int selectMbox(const QString&mbox);
65 65
66 void fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description); 66 void fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description);
67 void fillSingleTextPart(RecPartP&target_part,mailimap_body_type_text*which); 67 void fillSingleTextPart(RecPartP&target_part,mailimap_body_type_text*which);
68 void fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which); 68 void fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which);
69 void fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which); 69 void fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which);
70 void fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which); 70 void fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which);
71 void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,QValueList<int>recList,int current_count=1); 71 void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,QValueList<int>recList,int current_count=1);
72 72
73 /* just helpers */ 73 /* just helpers */
74 static void fillBodyFields(RecPartP&target_part,mailimap_body_fields*which); 74 static void fillBodyFields(RecPartP&target_part,mailimap_body_fields*which);
75 static QStringList address_list_to_stringlist(clist*list); 75 static QStringList address_list_to_stringlist(clist*list);
76 76
77 static void progress(QString mess = QString::null); 77 static void progress(QString mess = QString::null);
78 static int mCurrent; 78 static int mCurrent;
79 static int mMax; 79 static int mMax;
80 IMAPaccount *account; 80 IMAPaccount *account;
81 mailimap *m_imap; 81 mailimap *m_imap;
82 QString m_Lastmbox; 82 QString m_Lastmbox;
83}; 83};
84 84
85#endif 85#endif