Diffstat (limited to 'noncore/net/mail/libmailwrapper/genericwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index 5ec9415..703235d 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp | |||
@@ -1,23 +1,23 @@ | |||
1 | #include "genericwrapper.h" | 1 | #include "genericwrapper.h" |
2 | #include <libetpan/libetpan.h> | 2 | #include <libetpan/libetpan.h> |
3 | #include "mailtypes.h" | 3 | #include "mailtypes.h" |
4 | #include "mailstatics.h" | ||
4 | 5 | ||
5 | #include <opie2/odebug.h> | 6 | #include <opie2/odebug.h> |
6 | #include <qpe/timestring.h> | ||
7 | #include <qdatetime.h> | 7 | #include <qdatetime.h> |
8 | 8 | ||
9 | using namespace Opie::Core; | 9 | using namespace Opie::Core; |
10 | Genericwrapper::Genericwrapper() | 10 | Genericwrapper::Genericwrapper() |
11 | : AbstractMail() | 11 | : AbstractMail(),MailStatics() |
12 | { | 12 | { |
13 | bodyCache.clear(); | 13 | bodyCache.clear(); |
14 | m_storage = 0; | 14 | m_storage = 0; |
15 | m_folder = 0; | 15 | m_folder = 0; |
16 | } | 16 | } |
17 | 17 | ||
18 | Genericwrapper::~Genericwrapper() | 18 | Genericwrapper::~Genericwrapper() |
19 | { | 19 | { |
20 | if (m_folder) { | 20 | if (m_folder) { |
21 | mailfolder_free(m_folder); | 21 | mailfolder_free(m_folder); |
22 | } | 22 | } |
23 | if (m_storage) { | 23 | if (m_storage) { |
@@ -234,33 +234,24 @@ RecBodyP Genericwrapper::parseMail( mailmessage * msg ) | |||
234 | int err = MAILIMF_NO_ERROR; | 234 | int err = MAILIMF_NO_ERROR; |
235 | mailmime_single_fields fields; | 235 | mailmime_single_fields fields; |
236 | /* is bound to msg and will be freed there */ | 236 | /* is bound to msg and will be freed there */ |
237 | mailmime * mime=0; | 237 | mailmime * mime=0; |
238 | RecBodyP body = new RecBody(); | 238 | RecBodyP body = new RecBody(); |
239 | memset(&fields, 0, sizeof(struct mailmime_single_fields)); | 239 | memset(&fields, 0, sizeof(struct mailmime_single_fields)); |
240 | err = mailmessage_get_bodystructure(msg,&mime); | 240 | err = mailmessage_get_bodystructure(msg,&mime); |
241 | QValueList<int>recList; | 241 | QValueList<int>recList; |
242 | traverseBody(body,msg,mime,recList); | 242 | traverseBody(body,msg,mime,recList); |
243 | return body; | 243 | return body; |
244 | } | 244 | } |
245 | 245 | ||
246 | QString Genericwrapper::parseDateTime( mailimf_date_time *date ) | ||
247 | { | ||
248 | QDateTime da(QDate(date->dt_year,date->dt_month,date->dt_day),QTime(date->dt_hour,date->dt_min,date->dt_sec)); | ||
249 | QString timestring = TimeString::numberDateString(QDate(date->dt_year,date->dt_month,date->dt_day))+" "; | ||
250 | timestring+=TimeString::timeString(QTime(date->dt_hour,date->dt_min,date->dt_sec))+" "; | ||
251 | timestring.sprintf(timestring+" %+05i",date->dt_zone); | ||
252 | return timestring; | ||
253 | } | ||
254 | |||
255 | QString Genericwrapper::parseAddressList( mailimf_address_list *list ) | 246 | QString Genericwrapper::parseAddressList( mailimf_address_list *list ) |
256 | { | 247 | { |
257 | QString result( "" ); | 248 | QString result( "" ); |
258 | 249 | ||
259 | bool first = true; | 250 | bool first = true; |
260 | if (list == 0) return result; | 251 | if (list == 0) return result; |
261 | for ( clistiter *current = clist_begin( list->ad_list ); current != NULL; current = current->next ) { | 252 | for ( clistiter *current = clist_begin( list->ad_list ); current != NULL; current = current->next ) { |
262 | mailimf_address *addr = (mailimf_address *) current->data; | 253 | mailimf_address *addr = (mailimf_address *) current->data; |
263 | 254 | ||
264 | if ( !first ) { | 255 | if ( !first ) { |
265 | result.append( "," ); | 256 | result.append( "," ); |
266 | } else { | 257 | } else { |