summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/mailtypes.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.cpp28
1 files changed, 20 insertions, 8 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp
index d4395a2..b009b75 100644
--- a/noncore/net/mail/libmailwrapper/mailtypes.cpp
+++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp
@@ -1,22 +1,23 @@
1#include "mailtypes.h" 1#include "mailtypes.h"
2 2
3#include <opie2/odebug.h> 3#include <opie2/odebug.h>
4#include <qpe/timestring.h>
4 5
5#include <stdlib.h> 6#include <stdlib.h>
6 7
7using namespace Opie::Core; 8using namespace Opie::Core;
8RecMail::RecMail() 9RecMail::RecMail()
9 :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) 10 :Opie::Core::ORefCount(),subject(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7),maildate(),date("")
10{ 11{
11 init(); 12 init();
12} 13}
13 14
14RecMail::RecMail(const RecMail&old) 15RecMail::RecMail(const RecMail&old)
15 :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) 16 :Opie::Core::ORefCount(),subject(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7),maildate(),date("")
16{ 17{
17 init(); 18 init();
18 copy_old(old); 19 copy_old(old);
19 odebug << "Copy constructor RecMail" << oendl; 20 odebug << "Copy constructor RecMail" << oendl;
20} 21}
21 22
22RecMail::~RecMail() 23RecMail::~RecMail()
@@ -27,6 +28,7 @@ RecMail::~RecMail()
27void RecMail::copy_old(const RecMail&old) 28void RecMail::copy_old(const RecMail&old)
28{ 29{
29 subject = old.subject; 30 subject = old.subject;
31 maildate = old.maildate;
30 date = old.date; 32 date = old.date;
31 mbox = old.mbox; 33 mbox = old.mbox;
32 msg_id = old.msg_id; 34 msg_id = old.msg_id;
@@ -53,6 +55,17 @@ void RecMail::init()
53 wrapper = 0; 55 wrapper = 0;
54} 56}
55 57
58void RecMail::setDate( const QDateTime&a,int offset)
59{
60 QString timestring = TimeString::numberDateString(a.date())+" ";
61 timestring+=TimeString::timeString(a.time());
62 if (offset > 0) {
63 timestring.sprintf(timestring+" %+05i",offset);
64 }
65 date = timestring;
66 maildate = a;
67}
68
56void RecMail::setWrapper(AbstractMail*awrapper) 69void RecMail::setWrapper(AbstractMail*awrapper)
57{ 70{
58 wrapper = awrapper; 71 wrapper = awrapper;
@@ -134,7 +147,7 @@ RecPart::RecPart(const RecPart&old)
134 m_size = old.m_size; 147 m_size = old.m_size;
135 m_Parameters = old.m_Parameters; 148 m_Parameters = old.m_Parameters;
136 m_poslist = old.m_poslist; 149 m_poslist = old.m_poslist;
137 odebug << "RecPart copy constructor" << oendl; 150 odebug << "RecPart copy constructor" << oendl;
138} 151}
139 152
140RecPart::~RecPart() 153RecPart::~RecPart()
@@ -258,7 +271,7 @@ RecBody::RecBody(const RecBody&old)
258 m_BodyText = old.m_BodyText; 271 m_BodyText = old.m_BodyText;
259 m_PartsList = old.m_PartsList; 272 m_PartsList = old.m_PartsList;
260 m_description = old.m_description; 273 m_description = old.m_description;
261 odebug << "Recbody copy constructor" << oendl; 274 odebug << "Recbody copy constructor" << oendl;
262} 275}
263 276
264RecBody::~RecBody() 277RecBody::~RecBody()
@@ -323,14 +336,14 @@ encodedString::encodedString(const encodedString&old)
323{ 336{
324 init(); 337 init();
325 copy_old(old); 338 copy_old(old);
326 odebug << "encodedeString: copy constructor!" << oendl; 339 odebug << "encodedeString: copy constructor!" << oendl;
327} 340}
328 341
329encodedString& encodedString::operator=(const encodedString&old) 342encodedString& encodedString::operator=(const encodedString&old)
330{ 343{
331 init(); 344 init();
332 copy_old(old); 345 copy_old(old);
333 odebug << "encodedString: assign operator!" << oendl; 346 odebug << "encodedString: assign operator!" << oendl;
334 return *this; 347 return *this;
335} 348}
336 349
@@ -396,4 +409,3 @@ folderStat&folderStat::operator=(const folderStat&old)
396 message_recent = old.message_recent; 409 message_recent = old.message_recent;
397 return *this; 410 return *this;
398} 411}
399