206 // ---------------------------------------------------------------------------- |
206 // ---------------------------------------------------------------------------- |
207 // CCsConversationEntry::SetDescriptionL |
207 // CCsConversationEntry::SetDescriptionL |
208 // Sets the Conversation description of this object |
208 // Sets the Conversation description of this object |
209 // ---------------------------------------------------------------------------- |
209 // ---------------------------------------------------------------------------- |
210 EXPORT_C void CCsConversationEntry::SetDescriptionL(const TDesC& aDescription) |
210 EXPORT_C void CCsConversationEntry::SetDescriptionL(const TDesC& aDescription) |
211 { |
211 { |
212 if((&aDescription)) |
212 |
213 { |
213 TInt descrLength = aDescription.Length(); |
214 TInt descrLength = aDescription.Length(); |
214 if (descrLength > KMaxDescrSize) |
215 if ( descrLength > KMaxDescrSize ) |
215 descrLength = KMaxDescrSize; |
216 descrLength = KMaxDescrSize; |
216 iDescription = HBufC::NewL(descrLength); |
217 |
217 iDescription->Des().Copy(aDescription.Left(descrLength)); |
218 iDescription = HBufC::NewL(descrLength); |
218 |
219 iDescription->Des().Copy(aDescription.Left(descrLength)); |
219 } |
220 } |
|
221 } |
|
222 |
220 |
223 // ---------------------------------------------------------------------------- |
221 // ---------------------------------------------------------------------------- |
224 // CCsConversationEntry::ChangeAttributes |
222 // CCsConversationEntry::ChangeAttributes |
225 // Sets or Clears the given attribute(s). |
223 // Sets or Clears the given attribute(s). |
226 // ---------------------------------------------------------------------------- |
224 // ---------------------------------------------------------------------------- |
258 cloneObject->SetConversationDir(iConversationDir); |
256 cloneObject->SetConversationDir(iConversationDir); |
259 cloneObject->SetType(iConversationType); |
257 cloneObject->SetType(iConversationType); |
260 cloneObject->SetEntryId(iEntryID); |
258 cloneObject->SetEntryId(iEntryID); |
261 cloneObject->SetSendState(iConversationStatus); |
259 cloneObject->SetSendState(iConversationStatus); |
262 cloneObject->ChangeAttributes(iConversationAttrib, ECsAttributeNone); |
260 cloneObject->ChangeAttributes(iConversationAttrib, ECsAttributeNone); |
263 cloneObject->SetDescriptionL(*iDescription); |
261 if(iDescription) |
|
262 cloneObject->SetDescriptionL(*iDescription); |
264 cloneObject->SetTimeStampL(iTimeStamp); |
263 cloneObject->SetTimeStampL(iTimeStamp); |
265 |
264 |
266 CleanupStack::Pop(cloneObject); |
265 CleanupStack::Pop(cloneObject); |
267 return cloneObject; |
266 return cloneObject; |
268 } |
267 } |