author | alwin <alwin> | 2003-12-16 13:14:05 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-16 13:14:05 (UTC) |
commit | 49c02bbbb7a0aeee933d58ba1d3d3e86e6bc7838 (patch) (side-by-side diff) | |
tree | 710393582789ed1db97592fed5bb88ad4d56550d /noncore/net/mail/mailtypes.h | |
parent | f42c15f884d4377bc99d73e16fa1722b0fb2a4d3 (diff) | |
download | opie-49c02bbbb7a0aeee933d58ba1d3d3e86e6bc7838.zip opie-49c02bbbb7a0aeee933d58ba1d3d3e86e6bc7838.tar.gz opie-49c02bbbb7a0aeee933d58ba1d3d3e86e6bc7838.tar.bz2 |
saving of attachments implemented.
-rw-r--r-- | noncore/net/mail/mailtypes.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/noncore/net/mail/mailtypes.h b/noncore/net/mail/mailtypes.h index 7d7bebc..abfbe65 100644 --- a/noncore/net/mail/mailtypes.h +++ b/noncore/net/mail/mailtypes.h @@ -135,4 +135,51 @@ public: void addPart(const RecPart&part); }; +class encodedString +{ +public: + encodedString(); + /* + creates an new content string. + it makes a deep copy of it! + */ + encodedString(const char*nContent,unsigned int length); + /* + Take over the nContent. Means: it will just copy the pointer, not the content. + so make sure: No one else frees the string, the string has allocated with + malloc for compatibility with c-based libs + */ + encodedString(char*nContent,unsigned int nSize); + /* copy construkor - makes ALWAYS a deep copy!!!! */ + encodedString(const encodedString&old); + /* assign operator - makes ALWAYS a deep copy!!!! */ + encodedString& operator=(const encodedString&old); + /* destructor - cleans the content */ + virtual ~encodedString(); + + /* returns a pointer to the content - do not delete yoursel! */ + const char*Content()const; + /* returns the lengths of the content 'cause it must not be a null-terminated string! */ + const int Length()const; + + /* + makes a deep copy of nContent! + */ + void setContent(const char*nContent,int nSize); + /* + Take over the nContent. Means: it will just copy the pointer, not the content. + so make sure: No one else frees the string, the string has allocated with + malloc for compatibility with c-based libs + */ + void setContent(char*nContent,int nSize); + +protected: + char * content; + unsigned int size; + + void init(); + void copy_old(const encodedString&old); + void clean(); +}; + #endif |