summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/mailtypes.h
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h
index 1420f79..17c6db9 100644
--- a/noncore/net/mail/libmailwrapper/mailtypes.h
+++ b/noncore/net/mail/libmailwrapper/mailtypes.h
@@ -17,14 +17,14 @@
17 17
18class AbstractMail; 18class AbstractMail;
19/* a class to describe mails in a mailbox */ 19/* a class to describe mails in a mailbox */
20/* Attention! 20/* Attention!
21 From programmers point of view it would make sense to 21 From programmers point of view it would make sense to
22 store the mail body into this class, too. 22 store the mail body into this class, too.
23 But: not from the point of view of the device. 23 But: not from the point of view of the device.
24 Mailbodies can be real large. So we request them when 24 Mailbodies can be real large. So we request them when
25 needed from the mail-wrapper class direct from the server itself 25 needed from the mail-wrapper class direct from the server itself
26 (imap) or from a file-based cache (pop3?) 26 (imap) or from a file-based cache (pop3?)
27 So there is no interface "const QString&body()" but you should 27 So there is no interface "const QString&body()" but you should
28 make a request to the mailwrapper with this class as parameter to 28 make a request to the mailwrapper with this class as parameter to
29 get the body. Same words for the attachments. 29 get the body. Same words for the attachments.
30*/ 30*/
@@ -58,23 +58,26 @@ public:
58 void setCC(const QStringList&list); 58 void setCC(const QStringList&list);
59 const QStringList&CC()const; 59 const QStringList&CC()const;
60 void setBcc(const QStringList&list); 60 void setBcc(const QStringList&list);
61 const QStringList&Bcc()const; 61 const QStringList&Bcc()const;
62 void setInreply(const QStringList&list); 62 void setInreply(const QStringList&list);
63 const QStringList&Inreply()const; 63 const QStringList&Inreply()const;
64 void setReferences(const QStringList&list);
65 const QStringList&References()const;
66
64 const QBitArray&getFlags()const{return msg_flags;} 67 const QBitArray&getFlags()const{return msg_flags;}
65 void setFlags(const QBitArray&flags){msg_flags = flags;} 68 void setFlags(const QBitArray&flags){msg_flags = flags;}
66 69
67 void setWrapper(AbstractMail*wrapper); 70 void setWrapper(AbstractMail*wrapper);
68 AbstractMail* Wrapper(); 71 AbstractMail* Wrapper();
69 72
70protected: 73protected:
71 QString subject,date,from,mbox,msg_id,replyto; 74 QString subject,date,from,mbox,msg_id,replyto;
72 int msg_number,msg_size; 75 int msg_number,msg_size;
73 QBitArray msg_flags; 76 QBitArray msg_flags;
74 QStringList to,cc,bcc,in_reply_to; 77 QStringList to,cc,bcc,in_reply_to,references;
75 AbstractMail*wrapper; 78 AbstractMail*wrapper;
76 void init(); 79 void init();
77 void copy_old(const RecMail&old); 80 void copy_old(const RecMail&old);
78}; 81};
79 82
80typedef QMap<QString,QString> part_plist_t; 83typedef QMap<QString,QString> part_plist_t;
@@ -88,13 +91,13 @@ protected:
88 /* describes the position in the mail */ 91 /* describes the position in the mail */
89 QValueList<int> m_poslist; 92 QValueList<int> m_poslist;
90 93
91public: 94public:
92 RecPart(); 95 RecPart();
93 virtual ~RecPart(); 96 virtual ~RecPart();
94 97
95 const QString&Type()const; 98 const QString&Type()const;
96 void setType(const QString&type); 99 void setType(const QString&type);
97 const QString&Subtype()const; 100 const QString&Subtype()const;
98 void setSubtype(const QString&subtype); 101 void setSubtype(const QString&subtype);
99 const QString&Identifier()const; 102 const QString&Identifier()const;
100 void setIdentifier(const QString&identifier); 103 void setIdentifier(const QString&identifier);
@@ -104,13 +107,13 @@ public:
104 void setDescription(const QString&desc); 107 void setDescription(const QString&desc);
105 void setLines(unsigned int lines); 108 void setLines(unsigned int lines);
106 const unsigned int Lines()const; 109 const unsigned int Lines()const;
107 void setSize(unsigned int size); 110 void setSize(unsigned int size);
108 const unsigned int Size()const; 111 const unsigned int Size()const;
109 112
110 113
111 void setParameters(const part_plist_t&list); 114 void setParameters(const part_plist_t&list);
112 const part_plist_t&Parameters()const; 115 const part_plist_t&Parameters()const;
113 void addParameter(const QString&key,const QString&value); 116 void addParameter(const QString&key,const QString&value);
114 const QString searchParamter(const QString&key)const; 117 const QString searchParamter(const QString&key)const;
115 void setPositionlist(const QValueList<int>&poslist); 118 void setPositionlist(const QValueList<int>&poslist);
116 const QValueList<int>& Positionlist()const; 119 const QValueList<int>& Positionlist()const;
@@ -128,24 +131,24 @@ public:
128 virtual ~RecBody(); 131 virtual ~RecBody();
129 void setBodytext(const QString&); 132 void setBodytext(const QString&);
130 const QString& Bodytext()const; 133 const QString& Bodytext()const;
131 134
132 void setDescription(const RecPart&des); 135 void setDescription(const RecPart&des);
133 const RecPart& Description()const; 136 const RecPart& Description()const;
134 137
135 void setParts(const QValueList<RecPart>&parts); 138 void setParts(const QValueList<RecPart>&parts);
136 const QValueList<RecPart>& Parts()const; 139 const QValueList<RecPart>& Parts()const;
137 void addPart(const RecPart&part); 140 void addPart(const RecPart&part);
138}; 141};
139 142
140class encodedString 143class encodedString
141{ 144{
142public: 145public:
143 encodedString(); 146 encodedString();
144 /* 147 /*
145 creates an new content string. 148 creates an new content string.
146 it makes a deep copy of it! 149 it makes a deep copy of it!
147 */ 150 */
148 encodedString(const char*nContent,unsigned int length); 151 encodedString(const char*nContent,unsigned int length);
149 /* 152 /*
150 Take over the nContent. Means: it will just copy the pointer, not the content. 153 Take over the nContent. Means: it will just copy the pointer, not the content.
151 so make sure: No one else frees the string, the string has allocated with 154 so make sure: No one else frees the string, the string has allocated with
@@ -155,18 +158,18 @@ public:
155 /* copy construkor - makes ALWAYS a deep copy!!!! */ 158 /* copy construkor - makes ALWAYS a deep copy!!!! */
156 encodedString(const encodedString&old); 159 encodedString(const encodedString&old);
157 /* assign operator - makes ALWAYS a deep copy!!!! */ 160 /* assign operator - makes ALWAYS a deep copy!!!! */
158 encodedString& operator=(const encodedString&old); 161 encodedString& operator=(const encodedString&old);
159 /* destructor - cleans the content */ 162 /* destructor - cleans the content */
160 virtual ~encodedString(); 163 virtual ~encodedString();
161 164
162 /* returns a pointer to the content - do not delete yoursel! */ 165 /* returns a pointer to the content - do not delete yoursel! */
163 const char*Content()const; 166 const char*Content()const;
164 /* returns the lengths of the content 'cause it must not be a null-terminated string! */ 167 /* returns the lengths of the content 'cause it must not be a null-terminated string! */
165 const int Length()const; 168 const int Length()const;
166 169
167 /* 170 /*
168 makes a deep copy of nContent! 171 makes a deep copy of nContent!
169 */ 172 */
170 void setContent(const char*nContent,int nSize); 173 void setContent(const char*nContent,int nSize);
171 /* 174 /*
172 Take over the nContent. Means: it will just copy the pointer, not the content. 175 Take over the nContent. Means: it will just copy the pointer, not the content.
@@ -175,13 +178,13 @@ public:
175 */ 178 */
176 void setContent(char*nContent,int nSize); 179 void setContent(char*nContent,int nSize);
177 180
178protected: 181protected:
179 char * content; 182 char * content;
180 unsigned int size; 183 unsigned int size;
181 184
182 void init(); 185 void init();
183 void copy_old(const encodedString&old); 186 void copy_old(const encodedString&old);
184 void clean(); 187 void clean();
185}; 188};
186 189
187struct folderStat 190struct folderStat