Diffstat (limited to 'noncore/net/mail/libmailwrapper/mboxwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mboxwrapper.cpp | 126 |
1 files changed, 100 insertions, 26 deletions
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index 6d69263..162a0c9 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp | |||
@@ -1,76 +1,71 @@ | |||
1 | #include "mboxwrapper.h" | 1 | #include "mboxwrapper.h" |
2 | #include "mailtypes.h" | 2 | #include "mailtypes.h" |
3 | #include "mailwrapper.h" | 3 | #include "mailwrapper.h" |
4 | #include <libetpan/libetpan.h> | 4 | #include <libetpan/libetpan.h> |
5 | #include <libetpan/mailstorage.h> | ||
6 | #include <qdir.h> | 5 | #include <qdir.h> |
7 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <qpe/global.h> | ||
8 | 8 | ||
9 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir) | 9 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir) |
10 | : Genericwrapper(),MBOXPath(mbox_dir) | 10 | : Genericwrapper(),MBOXPath(mbox_dir) |
11 | { | 11 | { |
12 | QDir dir(MBOXPath); | 12 | QDir dir(MBOXPath); |
13 | if (!dir.exists()) { | 13 | if (!dir.exists()) { |
14 | dir.mkdir(MBOXPath); | 14 | dir.mkdir(MBOXPath); |
15 | } | 15 | } |
16 | } | 16 | } |
17 | 17 | ||
18 | MBOXwrapper::~MBOXwrapper() | 18 | MBOXwrapper::~MBOXwrapper() |
19 | { | 19 | { |
20 | } | 20 | } |
21 | 21 | ||
22 | void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) | 22 | void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) |
23 | { | 23 | { |
24 | mailstorage*storage = mailstorage_new(NULL); | 24 | mailstorage*storage = mailstorage_new(NULL); |
25 | QString p = MBOXPath+"/"; | 25 | QString p = MBOXPath+"/"; |
26 | p+=mailbox; | 26 | p+=mailbox; |
27 | char*fname = 0; | 27 | |
28 | 28 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); | |
29 | fname = strdup(p.latin1()); | ||
30 | |||
31 | int r = mbox_mailstorage_init(storage,fname,0,0,0); | ||
32 | mailfolder*folder; | 29 | mailfolder*folder; |
33 | folder = mailfolder_new( storage,fname,NULL); | 30 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); |
34 | r = mailfolder_connect(folder); | 31 | r = mailfolder_connect(folder); |
35 | if (r != MAIL_NO_ERROR) { | 32 | if (r != MAIL_NO_ERROR) { |
36 | qDebug("Error initializing mbox"); | 33 | qDebug("Error initializing mbox"); |
37 | mailfolder_free(folder); | 34 | mailfolder_free(folder); |
38 | mailstorage_free(storage); | 35 | mailstorage_free(storage); |
39 | free(fname); | ||
40 | return; | 36 | return; |
41 | } | 37 | } |
42 | mailmessage_list * env_list = 0; | 38 | mailmessage_list * env_list = 0; |
43 | r = mailsession_get_messages_list(folder->fld_session,&env_list); | 39 | r = mailsession_get_messages_list(folder->fld_session,&env_list); |
44 | if (r != MAIL_NO_ERROR) { | 40 | if (r != MAIL_NO_ERROR) { |
45 | qDebug("Error message list"); | 41 | qDebug("Error message list"); |
46 | mailfolder_free(folder); | 42 | mailfolder_free(folder); |
47 | mailstorage_free(storage); | 43 | mailstorage_free(storage); |
48 | free(fname); | ||
49 | return; | 44 | return; |
50 | } | 45 | } |
51 | r = mailsession_get_envelopes_list(folder->fld_session, env_list); | 46 | r = mailsession_get_envelopes_list(folder->fld_session, env_list); |
52 | if (r != MAIL_NO_ERROR) { | 47 | if (r != MAIL_NO_ERROR) { |
53 | qDebug("Error filling message list"); | 48 | qDebug("Error filling message list"); |
54 | if (env_list) { | 49 | if (env_list) { |
55 | mailmessage_list_free(env_list); | 50 | mailmessage_list_free(env_list); |
56 | } | 51 | } |
57 | mailfolder_free(folder); | 52 | mailfolder_free(folder); |
58 | mailstorage_free(storage); | 53 | mailstorage_free(storage); |
59 | free(fname); | ||
60 | return; | 54 | return; |
61 | } | 55 | } |
62 | mailimf_references * refs; | 56 | mailimf_references * refs; |
63 | 57 | ||
64 | for(int i = 0 ; i < carray_count(env_list->msg_tab) ; ++i) { | 58 | uint32_t i = 0; |
59 | for(; i < carray_count(env_list->msg_tab) ; ++i) { | ||
65 | mailmessage * msg; | 60 | mailmessage * msg; |
66 | QBitArray mFlags(7); | 61 | QBitArray mFlags(7); |
67 | msg = (mailmessage*)carray_get(env_list->msg_tab, i); | 62 | msg = (mailmessage*)carray_get(env_list->msg_tab, i); |
68 | if (msg->msg_fields == NULL) { | 63 | if (msg->msg_fields == NULL) { |
69 | qDebug("could not fetch envelope of message %i", i); | 64 | qDebug("could not fetch envelope of message %i", i); |
70 | continue; | 65 | continue; |
71 | } | 66 | } |
72 | RecMail * mail = new RecMail(); | 67 | RecMail * mail = new RecMail(); |
73 | mail->setWrapper(this); | 68 | mail->setWrapper(this); |
74 | mail_flags * flag_result = 0; | 69 | mail_flags * flag_result = 0; |
75 | r = mailmessage_get_flags(msg,&flag_result); | 70 | r = mailmessage_get_flags(msg,&flag_result); |
76 | if (r == MAIL_ERROR_NOT_IMPLEMENTED) { | 71 | if (r == MAIL_ERROR_NOT_IMPLEMENTED) { |
@@ -101,52 +96,51 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) | |||
101 | char * text = (char*)refs->mid_list->first->data; | 96 | char * text = (char*)refs->mid_list->first->data; |
102 | mail->setReplyto(QString(text)); | 97 | mail->setReplyto(QString(text)); |
103 | } | 98 | } |
104 | 99 | ||
105 | target.append(mail); | 100 | target.append(mail); |
106 | } | 101 | } |
107 | if (env_list) { | 102 | if (env_list) { |
108 | mailmessage_list_free(env_list); | 103 | mailmessage_list_free(env_list); |
109 | } | 104 | } |
110 | mailfolder_disconnect(folder); | 105 | mailfolder_disconnect(folder); |
111 | mailfolder_free(folder); | 106 | mailfolder_free(folder); |
112 | mailstorage_free(storage); | 107 | mailstorage_free(storage); |
113 | free(fname); | 108 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(i)); |
114 | } | 109 | } |
115 | 110 | ||
116 | QList<Folder>* MBOXwrapper::listFolders() | 111 | QList<Folder>* MBOXwrapper::listFolders() |
117 | { | 112 | { |
118 | QList<Folder> * folders = new QList<Folder>(); | 113 | QList<Folder> * folders = new QList<Folder>(); |
119 | folders->setAutoDelete( false ); | 114 | folders->setAutoDelete( false ); |
120 | QDir dir(MBOXPath); | 115 | QDir dir(MBOXPath); |
121 | if (!dir.exists()) return folders; | 116 | if (!dir.exists()) return folders; |
122 | dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); | 117 | dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); |
123 | QStringList entries = dir.entryList(); | 118 | QStringList entries = dir.entryList(); |
124 | QStringList::ConstIterator it = entries.begin(); | 119 | QStringList::ConstIterator it = entries.begin(); |
125 | for (;it!=entries.end();++it) { | 120 | for (;it!=entries.end();++it) { |
126 | Folder*inb=new Folder(*it,"/"); | 121 | Folder*inb=new Folder(*it,"/"); |
127 | folders->append(inb); | 122 | folders->append(inb); |
128 | } | 123 | } |
129 | return folders; | 124 | return folders; |
130 | } | 125 | } |
131 | 126 | ||
132 | void MBOXwrapper::deleteMail(const RecMail&mail) | 127 | void MBOXwrapper::deleteMail(const RecMail&mail) |
133 | { | 128 | { |
134 | mailstorage*storage = mailstorage_new(NULL); | 129 | mailstorage*storage = mailstorage_new(NULL); |
135 | QString p = MBOXPath+"/"; | 130 | QString p = MBOXPath+"/"; |
136 | p+=mail.getMbox(); | 131 | p+=mail.getMbox(); |
137 | mailmessage * msg; | 132 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); |
138 | int r = mbox_mailstorage_init(storage,strdup(p.latin1()),0,0,0); | ||
139 | mailfolder*folder; | 133 | mailfolder*folder; |
140 | folder = mailfolder_new( storage,strdup(p.latin1()),NULL); | 134 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); |
141 | r = mailfolder_connect(folder); | 135 | r = mailfolder_connect(folder); |
142 | if (r != MAIL_NO_ERROR) { | 136 | if (r != MAIL_NO_ERROR) { |
143 | qDebug("Error initializing mbox"); | 137 | qDebug("Error initializing mbox"); |
144 | mailfolder_free(folder); | 138 | mailfolder_free(folder); |
145 | mailstorage_free(storage); | 139 | mailstorage_free(storage); |
146 | return; | 140 | return; |
147 | } | 141 | } |
148 | r = mailsession_remove_message(folder->fld_session,mail.getNumber()); | 142 | r = mailsession_remove_message(folder->fld_session,mail.getNumber()); |
149 | if (r != MAIL_NO_ERROR) { | 143 | if (r != MAIL_NO_ERROR) { |
150 | qDebug("error deleting mail"); | 144 | qDebug("error deleting mail"); |
151 | } | 145 | } |
152 | mailfolder_free(folder); | 146 | mailfolder_free(folder); |
@@ -158,27 +152,27 @@ void MBOXwrapper::answeredMail(const RecMail&) | |||
158 | } | 152 | } |
159 | 153 | ||
160 | RecBody MBOXwrapper::fetchBody( const RecMail &mail ) | 154 | RecBody MBOXwrapper::fetchBody( const RecMail &mail ) |
161 | { | 155 | { |
162 | RecBody body; | 156 | RecBody body; |
163 | mailstorage*storage = mailstorage_new(NULL); | 157 | mailstorage*storage = mailstorage_new(NULL); |
164 | QString p = MBOXPath+"/"; | 158 | QString p = MBOXPath+"/"; |
165 | p+=mail.getMbox(); | 159 | p+=mail.getMbox(); |
166 | mailmessage * msg; | 160 | mailmessage * msg; |
167 | char*data=0; | 161 | char*data=0; |
168 | size_t size; | 162 | size_t size; |
169 | 163 | ||
170 | int r = mbox_mailstorage_init(storage,strdup(p.latin1()),0,0,0); | 164 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); |
171 | mailfolder*folder; | 165 | mailfolder*folder; |
172 | folder = mailfolder_new( storage,strdup(p.latin1()),NULL); | 166 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); |
173 | r = mailfolder_connect(folder); | 167 | r = mailfolder_connect(folder); |
174 | if (r != MAIL_NO_ERROR) { | 168 | if (r != MAIL_NO_ERROR) { |
175 | qDebug("Error initializing mbox"); | 169 | qDebug("Error initializing mbox"); |
176 | mailfolder_free(folder); | 170 | mailfolder_free(folder); |
177 | mailstorage_free(storage); | 171 | mailstorage_free(storage); |
178 | return body; | 172 | return body; |
179 | } | 173 | } |
180 | r = mailsession_get_message(folder->fld_session, mail.getNumber(), &msg); | 174 | r = mailsession_get_message(folder->fld_session, mail.getNumber(), &msg); |
181 | if (r != MAIL_NO_ERROR) { | 175 | if (r != MAIL_NO_ERROR) { |
182 | qDebug("Error fetching mail %i",mail.getNumber()); | 176 | qDebug("Error fetching mail %i",mail.getNumber()); |
183 | mailfolder_free(folder); | 177 | mailfolder_free(folder); |
184 | mailstorage_free(storage); | 178 | mailstorage_free(storage); |
@@ -196,98 +190,178 @@ RecBody MBOXwrapper::fetchBody( const RecMail &mail ) | |||
196 | mailmessage_fetch_result_free(msg,data); | 190 | mailmessage_fetch_result_free(msg,data); |
197 | mailfolder_free(folder); | 191 | mailfolder_free(folder); |
198 | mailstorage_free(storage); | 192 | mailstorage_free(storage); |
199 | 193 | ||
200 | return body; | 194 | return body; |
201 | } | 195 | } |
202 | 196 | ||
203 | void MBOXwrapper::mbox_progress( size_t current, size_t maximum ) | 197 | void MBOXwrapper::mbox_progress( size_t current, size_t maximum ) |
204 | { | 198 | { |
205 | qDebug("MBOX %i von %i",current,maximum); | 199 | qDebug("MBOX %i von %i",current,maximum); |
206 | } | 200 | } |
207 | 201 | ||
208 | void MBOXwrapper::createFolder(const QString&) | 202 | int MBOXwrapper::createMbox(const QString&folder,const Folder*,const QString&,bool ) |
209 | { | 203 | { |
204 | QString p = MBOXPath+"/"; | ||
205 | p+=folder; | ||
206 | QFileInfo fi(p); | ||
207 | if (fi.exists()) { | ||
208 | Global::statusMessage(tr("Mailbox exists.")); | ||
209 | return 0; | ||
210 | } | ||
211 | mailmbox_folder*f = 0; | ||
212 | if (mailmbox_init(p.latin1(),0,1,0,&f) != MAIL_NO_ERROR) { | ||
213 | Global::statusMessage(tr("Error init folder")); | ||
214 | return 0; | ||
215 | } | ||
216 | if (f) mailmbox_done(f); | ||
217 | return 1; | ||
210 | } | 218 | } |
211 | 219 | ||
212 | void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folder) | 220 | void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folder) |
213 | { | 221 | { |
214 | QString p = MBOXPath+"/"; | 222 | QString p = MBOXPath+"/"; |
215 | p+=folder; | 223 | p+=folder; |
216 | mailmbox_folder*f = 0; | 224 | mailmbox_folder*f = 0; |
217 | int r = mailmbox_init(p.latin1(),0,1,0,&f); | 225 | int r = mailmbox_init(p.latin1(),0,1,0,&f); |
218 | if (r != MAIL_NO_ERROR) { | 226 | if (r != MAIL_NO_ERROR) { |
219 | qDebug("Error init folder"); | 227 | Global::statusMessage(tr("Error init folder")); |
220 | return; | 228 | return; |
221 | } | 229 | } |
222 | r = mailmbox_append_message(f,msg,length); | 230 | r = mailmbox_append_message(f,msg,length); |
223 | if (r != MAIL_NO_ERROR) { | 231 | if (r != MAIL_NO_ERROR) { |
224 | qDebug("Error writing message folder"); | 232 | Global::statusMessage(tr("Error writing to message folder")); |
225 | } | 233 | } |
226 | mailmbox_done(f); | 234 | mailmbox_done(f); |
227 | } | 235 | } |
228 | 236 | ||
229 | void MBOXwrapper::fetchRawBody(const RecMail&mail,char**target,size_t*length) | 237 | void MBOXwrapper::fetchRawBody(const RecMail&mail,char**target,size_t*length) |
230 | { | 238 | { |
231 | RecBody body; | 239 | RecBody body; |
232 | mailstorage*storage = mailstorage_new(NULL); | 240 | mailstorage*storage = mailstorage_new(NULL); |
233 | QString p = MBOXPath+"/"; | 241 | QString p = MBOXPath+"/"; |
234 | p+=mail.getMbox(); | 242 | p+=mail.getMbox(); |
235 | mailmessage * msg; | 243 | mailmessage * msg; |
236 | char*data=0; | 244 | char*data=0; |
237 | size_t size; | 245 | size_t size; |
238 | 246 | ||
239 | int r = mbox_mailstorage_init(storage,strdup(p.latin1()),0,0,0); | 247 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); |
240 | mailfolder*folder; | 248 | mailfolder*folder; |
241 | folder = mailfolder_new( storage,strdup(p.latin1()),NULL); | 249 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); |
242 | r = mailfolder_connect(folder); | 250 | r = mailfolder_connect(folder); |
243 | if (r != MAIL_NO_ERROR) { | 251 | if (r != MAIL_NO_ERROR) { |
244 | qDebug("Error initializing mbox"); | 252 | Global::statusMessage(tr("Error initializing mbox")); |
245 | mailfolder_free(folder); | 253 | mailfolder_free(folder); |
246 | mailstorage_free(storage); | 254 | mailstorage_free(storage); |
247 | return; | 255 | return; |
248 | } | 256 | } |
249 | r = mailsession_get_message(folder->fld_session, mail.getNumber(), &msg); | 257 | r = mailsession_get_message(folder->fld_session, mail.getNumber(), &msg); |
250 | if (r != MAIL_NO_ERROR) { | 258 | if (r != MAIL_NO_ERROR) { |
251 | qDebug("Error fetching mail %i",mail.getNumber()); | 259 | Global::statusMessage(tr("Error fetching mail %i").arg(mail.getNumber())); |
252 | mailfolder_free(folder); | 260 | mailfolder_free(folder); |
253 | mailstorage_free(storage); | 261 | mailstorage_free(storage); |
254 | return; | 262 | return; |
255 | } | 263 | } |
256 | r = mailmessage_fetch(msg,&data,&size); | 264 | r = mailmessage_fetch(msg,&data,&size); |
257 | if (r != MAIL_NO_ERROR) { | 265 | if (r != MAIL_NO_ERROR) { |
258 | qDebug("Error fetching mail %i",mail.getNumber()); | 266 | Global::statusMessage(tr("Error fetching mail %i").arg(mail.getNumber())); |
259 | mailfolder_free(folder); | 267 | mailfolder_free(folder); |
260 | mailstorage_free(storage); | 268 | mailstorage_free(storage); |
261 | mailmessage_free(msg); | 269 | mailmessage_free(msg); |
262 | return; | 270 | return; |
263 | } | 271 | } |
264 | *target = data; | 272 | *target = data; |
265 | *length = size; | 273 | *length = size; |
266 | mailfolder_free(folder); | 274 | mailfolder_free(folder); |
267 | mailstorage_free(storage); | 275 | mailstorage_free(storage); |
268 | mailmessage_free(msg); | 276 | mailmessage_free(msg); |
269 | } | 277 | } |
270 | 278 | ||
271 | void MBOXwrapper::deleteMails(const QString & mailbox,QList<RecMail> &target) | 279 | void MBOXwrapper::deleteMails(const QString & mailbox,QList<RecMail> &target) |
272 | { | 280 | { |
273 | QString p = MBOXPath+"/"; | 281 | QString p = MBOXPath+"/"; |
274 | p+=mailbox; | 282 | p+=mailbox; |
275 | mailmbox_folder*f = 0; | 283 | mailmbox_folder*f = 0; |
276 | int r = mailmbox_init(p.latin1(),0,1,0,&f); | 284 | int r = mailmbox_init(p.latin1(),0,1,0,&f); |
277 | if (r != MAIL_NO_ERROR) { | 285 | if (r != MAIL_NO_ERROR) { |
278 | qDebug("Error init folder"); | 286 | qDebug("Error init folder"); |
279 | return; | 287 | return; |
280 | } | 288 | } |
289 | deleteMails(f,target); | ||
290 | mailmbox_done(f); | ||
291 | } | ||
292 | |||
293 | void MBOXwrapper::deleteMails(mailmbox_folder*f,QList<RecMail> &target) | ||
294 | { | ||
295 | if (!f) return; | ||
296 | int r; | ||
281 | for (unsigned int i=0; i < target.count();++i) { | 297 | for (unsigned int i=0; i < target.count();++i) { |
282 | r = mailmbox_delete_msg(f,target.at(i)->getNumber()); | 298 | r = mailmbox_delete_msg(f,target.at(i)->getNumber()); |
283 | if (r!=MAILMBOX_NO_ERROR) { | 299 | if (r!=MAILMBOX_NO_ERROR) { |
284 | qDebug("error delete mail"); | 300 | qDebug("error delete mail"); |
285 | } | 301 | } |
286 | } | 302 | } |
287 | r = mailmbox_expunge(f); | 303 | r = mailmbox_expunge(f); |
288 | if (r != MAILMBOX_NO_ERROR) { | 304 | if (r != MAILMBOX_NO_ERROR) { |
289 | qDebug("error expunge mailbox"); | 305 | qDebug("error expunge mailbox"); |
290 | } | 306 | } |
291 | mailmbox_done(f); | 307 | } |
308 | |||
309 | int MBOXwrapper::deleteAllMail(const Folder*tfolder) | ||
310 | { | ||
311 | if (!tfolder) return 0; | ||
312 | QString p = MBOXPath+tfolder->getDisplayName(); | ||
313 | int res = 1; | ||
314 | |||
315 | mailfolder*folder = 0; | ||
316 | mailmessage_list*l=0; | ||
317 | mailstorage*storage = mailstorage_new(NULL); | ||
318 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); | ||
319 | if (r != MAIL_NO_ERROR) { | ||
320 | Global::statusMessage(tr("Error initializing mbox")); | ||
321 | res = 0; | ||
322 | } | ||
323 | if (res) { | ||
324 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); | ||
325 | r = mailfolder_connect(folder); | ||
326 | if (r != MAIL_NO_ERROR) { | ||
327 | Global::statusMessage(tr("Error initializing mbox")); | ||
328 | res = 0; | ||
329 | } | ||
330 | } | ||
331 | if (res) { | ||
332 | r = mailsession_get_messages_list(folder->fld_session,&l); | ||
333 | if (r != MAIL_NO_ERROR) { | ||
334 | qDebug("Error message list"); | ||
335 | res=0; | ||
336 | } | ||
337 | } | ||
338 | for(unsigned int i = 0 ; l!= 0 && res==1 && i < carray_count(l->msg_tab) ; ++i) { | ||
339 | r = mailsession_remove_message(folder->fld_session,i+1); | ||
340 | if (r != MAIL_NO_ERROR) { | ||
341 | Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); | ||
342 | res = 0; | ||
343 | break; | ||
344 | } | ||
345 | } | ||
346 | if (l) mailmessage_list_free(l); | ||
347 | if (folder) mailfolder_free(folder); | ||
348 | if (storage) mailstorage_free(storage); | ||
349 | return res; | ||
350 | } | ||
351 | |||
352 | int MBOXwrapper::deleteMbox(const Folder*tfolder) | ||
353 | { | ||
354 | if (!tfolder) return 0; | ||
355 | QString p = MBOXPath+tfolder->getDisplayName(); | ||
356 | QFile fi(p); | ||
357 | if (!fi.exists()) { | ||
358 | Global::statusMessage(tr("Mailbox doesn't exist.")); | ||
359 | return 0; | ||
360 | } | ||
361 | if (!fi.remove()) { | ||
362 | Global::statusMessage(tr("Error deleting Mailbox.")); | ||
363 | return 0; | ||
364 | } | ||
365 | return 1; | ||
292 | } | 366 | } |
293 | 367 | ||