summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/mailtypes.h
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h
index 7d7bebc..abfbe65 100644
--- a/noncore/net/mail/libmailwrapper/mailtypes.h
+++ b/noncore/net/mail/libmailwrapper/mailtypes.h
@@ -135,4 +135,51 @@ public:
135 void addPart(const RecPart&part); 135 void addPart(const RecPart&part);
136}; 136};
137 137
138class encodedString
139{
140public:
141 encodedString();
142 /*
143 creates an new content string.
144 it makes a deep copy of it!
145 */
146 encodedString(const char*nContent,unsigned int length);
147 /*
148 Take over the nContent. Means: it will just copy the pointer, not the content.
149 so make sure: No one else frees the string, the string has allocated with
150 malloc for compatibility with c-based libs
151 */
152 encodedString(char*nContent,unsigned int nSize);
153 /* copy construkor - makes ALWAYS a deep copy!!!! */
154 encodedString(const encodedString&old);
155 /* assign operator - makes ALWAYS a deep copy!!!! */
156 encodedString& operator=(const encodedString&old);
157 /* destructor - cleans the content */
158 virtual ~encodedString();
159
160 /* returns a pointer to the content - do not delete yoursel! */
161 const char*Content()const;
162 /* returns the lengths of the content 'cause it must not be a null-terminated string! */
163 const int Length()const;
164
165 /*
166 makes a deep copy of nContent!
167 */
168 void setContent(const char*nContent,int nSize);
169 /*
170 Take over the nContent. Means: it will just copy the pointer, not the content.
171 so make sure: No one else frees the string, the string has allocated with
172 malloc for compatibility with c-based libs
173 */
174 void setContent(char*nContent,int nSize);
175
176protected:
177 char * content;
178 unsigned int size;
179
180 void init();
181 void copy_old(const encodedString&old);
182 void clean();
183};
184
138#endif 185#endif