summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/mailtypes.h
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper/mailtypes.h') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/mailtypes.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/kmicromail/libmailwrapper/mailtypes.h b/kmicromail/libmailwrapper/mailtypes.h
index c317880..020278d 100644
--- a/kmicromail/libmailwrapper/mailtypes.h
+++ b/kmicromail/libmailwrapper/mailtypes.h
@@ -14,86 +14,89 @@
14#include <qstring.h> 14#include <qstring.h>
15#include <qstringlist.h> 15#include <qstringlist.h>
16#include <qmap.h> 16#include <qmap.h>
17#include <qvaluelist.h> 17#include <qvaluelist.h>
18 18
19class AbstractMail; 19class AbstractMail;
20/* a class to describe mails in a mailbox */ 20/* a class to describe mails in a mailbox */
21/* Attention! 21/* Attention!
22 From programmers point of view it would make sense to 22 From programmers point of view it would make sense to
23 store the mail body into this class, too. 23 store the mail body into this class, too.
24 But: not from the point of view of the device. 24 But: not from the point of view of the device.
25 Mailbodies can be real large. So we request them when 25 Mailbodies can be real large. So we request them when
26 needed from the mail-wrapper class direct from the server itself 26 needed from the mail-wrapper class direct from the server itself
27 (imap) or from a file-based cache (pop3?) 27 (imap) or from a file-based cache (pop3?)
28 So there is no interface "const QString&body()" but you should 28 So there is no interface "const QString&body()" but you should
29 make a request to the mailwrapper with this class as parameter to 29 make a request to the mailwrapper with this class as parameter to
30 get the body. Same words for the attachments. 30 get the body. Same words for the attachments.
31*/ 31*/
32class RecMail:public Opie::Core::ORefCount 32class RecMail:public Opie::Core::ORefCount
33{ 33{
34public: 34public:
35 RecMail(); 35 RecMail();
36 RecMail(const RecMail&old); 36 RecMail(const RecMail&old);
37 virtual ~RecMail(); 37 virtual ~RecMail();
38 bool isEqual( RecMail* r1 );
38 39
39 const unsigned int getNumber()const{return msg_number;} 40 const unsigned int getNumber()const{return msg_number;}
40 void setNumber(unsigned int number){msg_number=number;} 41 void setNumber(unsigned int number){msg_number=number;}
41 const QString&getDate()const{ return date; } 42 const QString&getDate()const{ return date; }
42 void setDate( const QString&a ) { date = a; } 43 void setDate( const QString&a ) { date = a; }
44 const QString&getIsoDate()const{ return isodate; }
45 void setIsoDate( const QString&a ) { isodate = a; }
43 const QString&getFrom()const{ return from; } 46 const QString&getFrom()const{ return from; }
44 void setFrom( const QString&a ) { from = a; } 47 void setFrom( const QString&a ) { from = a; }
45 const QString&getSubject()const { return subject; } 48 const QString&getSubject()const { return subject; }
46 void setSubject( const QString&s ) { subject = s; } 49 void setSubject( const QString&s ) { subject = s; }
47 const QString&getMbox()const{return mbox;} 50 const QString&getMbox()const{return mbox;}
48 void setMbox(const QString&box){mbox = box;} 51 void setMbox(const QString&box){mbox = box;}
49 void setMsgid(const QString&id){msg_id=id;} 52 void setMsgid(const QString&id){msg_id=id;}
50 const QString&Msgid()const{return msg_id;} 53 const QString&Msgid()const{return msg_id;}
51 void setReplyto(const QString&reply){replyto=reply;} 54 void setReplyto(const QString&reply){replyto=reply;}
52 const QString&Replyto()const{return replyto;} 55 const QString&Replyto()const{return replyto;}
53 void setMsgsize(unsigned int size){msg_size = size;} 56 void setMsgsize(unsigned int size){msg_size = size;}
54 const unsigned int Msgsize()const{return msg_size;} 57 const unsigned int Msgsize()const{return msg_size;}
55 58
56 59
57 void setTo(const QStringList&list); 60 void setTo(const QStringList&list);
58 const QStringList&To()const; 61 const QStringList&To()const;
59 void setCC(const QStringList&list); 62 void setCC(const QStringList&list);
60 const QStringList&CC()const; 63 const QStringList&CC()const;
61 void setBcc(const QStringList&list); 64 void setBcc(const QStringList&list);
62 const QStringList&Bcc()const; 65 const QStringList&Bcc()const;
63 void setInreply(const QStringList&list); 66 void setInreply(const QStringList&list);
64 const QStringList&Inreply()const; 67 const QStringList&Inreply()const;
65 void setReferences(const QStringList&list); 68 void setReferences(const QStringList&list);
66 const QStringList&References()const; 69 const QStringList&References()const;
67 70
68 const QBitArray&getFlags()const{return msg_flags;} 71 const QBitArray&getFlags()const{return msg_flags;}
69 void setFlags(const QBitArray&flags){msg_flags = flags;} 72 void setFlags(const QBitArray&flags){msg_flags = flags;}
70 73
71 void setWrapper(AbstractMail*wrapper); 74 void setWrapper(AbstractMail*wrapper);
72 AbstractMail* Wrapper(); 75 AbstractMail* Wrapper();
73 76
74protected: 77protected:
75 QString subject,date,from,mbox,msg_id,replyto; 78 QString subject,date,isodate,from,mbox,msg_id,replyto;
76 unsigned int msg_number,msg_size; 79 unsigned int msg_number,msg_size;
77 QBitArray msg_flags; 80 QBitArray msg_flags;
78 QStringList to,cc,bcc,in_reply_to,references; 81 QStringList to,cc,bcc,in_reply_to,references;
79 AbstractMail*wrapper; 82 AbstractMail*wrapper;
80 void init(); 83 void init();
81 void copy_old(const RecMail&old); 84 void copy_old(const RecMail&old);
82}; 85};
83 86
84typedef Opie::Core::OSmartPointer<RecMail> RecMailP; 87typedef Opie::Core::OSmartPointer<RecMail> RecMailP;
85typedef QMap<QString,QString> part_plist_t; 88typedef QMap<QString,QString> part_plist_t;
86 89
87class RecPart:public Opie::Core::ORefCount 90class RecPart:public Opie::Core::ORefCount
88{ 91{
89protected: 92protected:
90 QString m_type,m_subtype,m_identifier,m_encoding,m_description; 93 QString m_type,m_subtype,m_identifier,m_encoding,m_description;
91 unsigned int m_lines,m_size; 94 unsigned int m_lines,m_size;
92 part_plist_t m_Parameters; 95 part_plist_t m_Parameters;
93 /* describes the position in the mail */ 96 /* describes the position in the mail */
94 QValueList<int> m_poslist; 97 QValueList<int> m_poslist;
95 98
96public: 99public:
97 RecPart(); 100 RecPart();
98 RecPart(const RecPart&); 101 RecPart(const RecPart&);
99 virtual ~RecPart(); 102 virtual ~RecPart();