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.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h
index 941556a..c317880 100644
--- a/noncore/net/mail/libmailwrapper/mailtypes.h
+++ b/noncore/net/mail/libmailwrapper/mailtypes.h
@@ -75,35 +75,36 @@ protected:
75 QString subject,date,from,mbox,msg_id,replyto; 75 QString subject,date,from,mbox,msg_id,replyto;
76 unsigned int msg_number,msg_size; 76 unsigned int msg_number,msg_size;
77 QBitArray msg_flags; 77 QBitArray msg_flags;
78 QStringList to,cc,bcc,in_reply_to,references; 78 QStringList to,cc,bcc,in_reply_to,references;
79 AbstractMail*wrapper; 79 AbstractMail*wrapper;
80 void init(); 80 void init();
81 void copy_old(const RecMail&old); 81 void copy_old(const RecMail&old);
82}; 82};
83 83
84typedef Opie::Core::OSmartPointer<RecMail> RecMailP; 84typedef Opie::Core::OSmartPointer<RecMail> RecMailP;
85typedef QMap<QString,QString> part_plist_t; 85typedef QMap<QString,QString> part_plist_t;
86 86
87class RecPart 87class RecPart:public Opie::Core::ORefCount
88{ 88{
89protected: 89protected:
90 QString m_type,m_subtype,m_identifier,m_encoding,m_description; 90 QString m_type,m_subtype,m_identifier,m_encoding,m_description;
91 unsigned int m_lines,m_size; 91 unsigned int m_lines,m_size;
92 part_plist_t m_Parameters; 92 part_plist_t m_Parameters;
93 /* describes the position in the mail */ 93 /* describes the position in the mail */
94 QValueList<int> m_poslist; 94 QValueList<int> m_poslist;
95 95
96public: 96public:
97 RecPart(); 97 RecPart();
98 RecPart(const RecPart&);
98 virtual ~RecPart(); 99 virtual ~RecPart();
99 100
100 const QString&Type()const; 101 const QString&Type()const;
101 void setType(const QString&type); 102 void setType(const QString&type);
102 const QString&Subtype()const; 103 const QString&Subtype()const;
103 void setSubtype(const QString&subtype); 104 void setSubtype(const QString&subtype);
104 const QString&Identifier()const; 105 const QString&Identifier()const;
105 void setIdentifier(const QString&identifier); 106 void setIdentifier(const QString&identifier);
106 const QString&Encoding()const; 107 const QString&Encoding()const;
107 void setEncoding(const QString&encoding); 108 void setEncoding(const QString&encoding);
108 const QString&Description()const; 109 const QString&Description()const;
109 void setDescription(const QString&desc); 110 void setDescription(const QString&desc);
@@ -112,45 +113,50 @@ public:
112 void setSize(unsigned int size); 113 void setSize(unsigned int size);
113 const unsigned int Size()const; 114 const unsigned int Size()const;
114 115
115 116
116 void setParameters(const part_plist_t&list); 117 void setParameters(const part_plist_t&list);
117 const part_plist_t&Parameters()const; 118 const part_plist_t&Parameters()const;
118 void addParameter(const QString&key,const QString&value); 119 void addParameter(const QString&key,const QString&value);
119 const QString searchParamter(const QString&key)const; 120 const QString searchParamter(const QString&key)const;
120 void setPositionlist(const QValueList<int>&poslist); 121 void setPositionlist(const QValueList<int>&poslist);
121 const QValueList<int>& Positionlist()const; 122 const QValueList<int>& Positionlist()const;
122}; 123};
123 124
124class RecBody 125typedef Opie::Core::OSmartPointer<RecPart> RecPartP;
126
127class RecBody:public Opie::Core::ORefCount
125{ 128{
126protected: 129protected:
127 QString m_BodyText; 130 QString m_BodyText;
128 QValueList<RecPart> m_PartsList; 131 QValueList<RecPartP> m_PartsList;
129 RecPart m_description; 132 RecPartP m_description;
130 133
131public: 134public:
132 RecBody(); 135 RecBody();
136 RecBody(const RecBody&old);
133 virtual ~RecBody(); 137 virtual ~RecBody();
134 void setBodytext(const QString&); 138 void setBodytext(const QString&);
135 const QString& Bodytext()const; 139 const QString& Bodytext()const;
136 140
137 void setDescription(const RecPart&des); 141 void setDescription(const RecPartP&des);
138 const RecPart& Description()const; 142 const RecPartP& Description()const;
139 143
140 void setParts(const QValueList<RecPart>&parts); 144 void setParts(const QValueList<RecPartP>&parts);
141 const QValueList<RecPart>& Parts()const; 145 const QValueList<RecPartP>& Parts()const;
142 void addPart(const RecPart&part); 146 void addPart(const RecPartP&part);
143}; 147};
144 148
149typedef Opie::Core::OSmartPointer<RecBody> RecBodyP;
150
145class encodedString 151class encodedString
146{ 152{
147public: 153public:
148 encodedString(); 154 encodedString();
149 /* 155 /*
150 creates an new content string. 156 creates an new content string.
151 it makes a deep copy of it! 157 it makes a deep copy of it!
152 */ 158 */
153 encodedString(const char*nContent,unsigned int length); 159 encodedString(const char*nContent,unsigned int length);
154 /* 160 /*
155 Take over the nContent. Means: it will just copy the pointer, not the content. 161 Take over the nContent. Means: it will just copy the pointer, not the content.
156 so make sure: No one else frees the string, the string has allocated with 162 so make sure: No one else frees the string, the string has allocated with