messagingapp/msgappfw/server/src/ccsconversationcontact.cpp
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 37 518b245aa84c
child 47 5b14749788d7
--- a/messagingapp/msgappfw/server/src/ccsconversationcontact.cpp	Fri Apr 16 14:56:15 2010 +0300
+++ b/messagingapp/msgappfw/server/src/ccsconversationcontact.cpp	Mon May 03 12:29:07 2010 +0300
@@ -42,9 +42,7 @@
 void
 CCsConversationContact::ConstructL()
     {
-    iFirstName = NULL;
-    iLastName = NULL;
-    iNickName = NULL;
+    iDisplayName = NULL;
     iContactId = KErrNotFound;
     iPhoneNumberList = new (ELeave) RPointerArray<HBufC> ();
     }
@@ -69,22 +67,10 @@
 // ----------------------------------------------------------------------------
 CCsConversationContact::~CCsConversationContact()
     {
-    if(iFirstName)
-        {
-        delete iFirstName;
-        iFirstName = NULL;
-        }
-
-    if(iLastName)
+    if(iDisplayName)
         {
-        delete iLastName;
-        iLastName = NULL;
-        }
-    
-    if(iNickName)
-        {
-        delete iNickName;
-        iNickName = NULL;
+        delete iDisplayName;
+        iDisplayName = NULL;
         }
 
     if (iPhoneNumberList)
@@ -97,46 +83,26 @@
     }
 
 // ----------------------------------------------------------------------------
-// CCsConversationContact::GetFirstName
-// get the first name of the conversation
+// CCsConversationContact::GetDisplayName
+// get the display name of the conversation
 // ----------------------------------------------------------------------------
 HBufC*
-CCsConversationContact::GetFirstName() const
+CCsConversationContact::GetDisplayName() const
     {
-    return iFirstName;
-    }
-
-// ----------------------------------------------------------------------------
-// CCsConversationContact::GetLastName
-// get the last name of the conversation
-// ----------------------------------------------------------------------------
-HBufC*
-CCsConversationContact::GetLastName() const
-    {
-    return iLastName;
+    return iDisplayName;
     }
 
 // ----------------------------------------------------------------------------
-// CCsConversationContact::GetNickName
-// get the nick name of the conversation
-// ----------------------------------------------------------------------------
-HBufC*
-CCsConversationContact::GetNickName() const
-    {
-    return iNickName;
-    }
-
-// ----------------------------------------------------------------------------
-// CCsConversationContact::SetFirstNameL
-// Sets the first name of the conversation
+// CCsConversationContact::SetDisplayNameL
+// Sets the display name of the conversation
 // ----------------------------------------------------------------------------
 void
-CCsConversationContact::SetFirstNameL(
-        const TDesC& aFirstName)
+CCsConversationContact::SetDisplayNameL(
+        const TDesC& aDisplayName)
     {
-    if( &aFirstName )
+    if( &aDisplayName )
         {
-        TRAPD(error, iFirstName = aFirstName.AllocL());
+        TRAPD(error, iDisplayName = aDisplayName.AllocL());
         if(error != KErrNone)
             {
             // handle error
@@ -148,47 +114,6 @@
     }
 
 // ----------------------------------------------------------------------------
-// CCsConversationContact::SetLastNameL
-// Sets the first name of the conversation
-// ----------------------------------------------------------------------------
-void
-CCsConversationContact::SetLastNameL(
-        const TDesC& aLastName)
-    {
-    if( &aLastName )
-        {
-        TRAPD(error, iLastName = aLastName.AllocL());
-        if(error != KErrNone)
-            {
-            // handle error
-            // call panic
-            PRINT1 ( _L("CCsConversationContact::SetLastNameL - Error:%d"),
-                    error );
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CCsConversationContact::SetNickNameL
-// Sets the first name of the conversation
-// ----------------------------------------------------------------------------
-void
-CCsConversationContact::SetNickNameL(
-        const TDesC& aNickName)
-    {
-    if( &aNickName )
-        {
-        TRAPD(error, iNickName = aNickName.AllocL());
-        if(error != KErrNone)
-            {
-            // handle error
-            // call panic
-            PRINT1 ( _L("CCsConversationContact::SetNickNameL - Error:%d"),
-                    error );
-            }
-        }
-    }
-// ----------------------------------------------------------------------------
 // CCsConversationContact::GetContactId
 // get the phonebook Contact Id link for the conversation
 // ----------------------------------------------------------------------------