103 MEmailMessageContent* content = NULL; |
103 MEmailMessageContent* content = NULL; |
104 TFSMailMsgId partId = iChildParts[aIndex]; |
104 TFSMailMsgId partId = iChildParts[aIndex]; |
105 CFSMailMessagePart* copy = iEmailMsgContent->Part().ChildPartL(partId); |
105 CFSMailMessagePart* copy = iEmailMsgContent->Part().ChildPartL(partId); |
106 |
106 |
107 const TDesC& contentType = copy->GetContentType(); |
107 const TDesC& contentType = copy->GetContentType(); |
|
108 const TDesC& compareString = CEmailTextContent::CheckParameterFormatL( contentType ); |
|
109 |
108 TMessageContentId msgContentId = TMessageContentId( |
110 TMessageContentId msgContentId = TMessageContentId( |
109 copy->GetPartId().Id(), |
111 copy->GetPartId().Id(), |
110 Id().iMessageId.iId, |
112 Id().iMessageId.iId, |
111 Id().iMessageId.iFolderId.iId, |
113 Id().iMessageId.iFolderId.iId, |
112 Id().iMessageId.iFolderId.iMailboxId ); |
114 Id().iMessageId.iFolderId.iMailboxId ); |
113 if (!contentType.Compare(KFSMailContentTypeTextPlain) || |
115 |
114 !contentType.Compare(KFSMailContentTypeTextHtml)) |
116 if (!compareString.Compare(KFSMailContentTypeTextPlain) || |
|
117 !compareString.Compare(KFSMailContentTypeTextHtml)) |
115 { |
118 { |
116 content = CEmailTextContent::NewL( iEmailMsgContent->PluginData(), msgContentId, copy, EClientOwns ); |
119 content = CEmailTextContent::NewL( iEmailMsgContent->PluginData(), msgContentId, copy, EClientOwns ); |
117 } |
120 } |
118 else if (!contentType.Compare(KFSMailContentTypeMultipartMixed) || |
121 else if (!compareString.Compare(KFSMailContentTypeMultipartMixed) || |
119 !contentType.Compare(KFSMailContentTypeMultipartAlternative) || |
122 !compareString.Compare(KFSMailContentTypeMultipartAlternative) || |
120 !contentType.Compare(KFSMailContentTypeMultipartDigest) || |
123 !compareString.Compare(KFSMailContentTypeMultipartDigest) || |
121 !contentType.Compare(KFSMailContentTypeMultipartRelated) || |
124 !compareString.Compare(KFSMailContentTypeMultipartRelated) || |
122 !contentType.Compare(KFSMailContentTypeMultipartParallel)) |
125 !compareString.Compare(KFSMailContentTypeMultipartParallel)) |
123 { |
126 { |
124 content = CEmailMultipart::NewL( iEmailMsgContent->PluginData(), msgContentId, copy, EClientOwns ); |
127 content = CEmailMultipart::NewL( iEmailMsgContent->PluginData(), msgContentId, copy, EClientOwns ); |
125 } |
128 } |
126 else |
129 else |
127 { |
130 { |
172 TFSMailMsgId newPartId = newPart->GetPartId(); |
175 TFSMailMsgId newPartId = newPart->GetPartId(); |
173 iChildParts.InsertL( newPartId, aPos ); |
176 iChildParts.InsertL( newPartId, aPos ); |
174 iChildPartCount = iChildParts.Count(); |
177 iChildPartCount = iChildParts.Count(); |
175 CleanupStack::Pop(); |
178 CleanupStack::Pop(); |
176 |
179 |
177 /* ToDo: Construct multipart */ |
180 |
178 |
181 |
179 return; |
182 return; |
180 } |
183 } |
181 |
184 |
182 // ----------------------------------------------------------------------------- |
185 // ----------------------------------------------------------------------------- |