omads/omadsextensions/adapters/sms/src/smsadaptermsvapi.cpp
changeset 64 a62b67d1f67c
parent 40 b63e67867dcd
--- a/omads/omadsextensions/adapters/sms/src/smsadaptermsvapi.cpp	Tue Sep 28 18:46:16 2010 +0530
+++ b/omads/omadsextensions/adapters/sms/src/smsadaptermsvapi.cpp	Tue Oct 12 17:42:13 2010 +0530
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -36,7 +36,9 @@
 
 // CONSTANTS
 
-_LIT16(KSmsNonUnicodeChars, "èéùìòÇØøÅåÆæßÉ£$¥¡ÄÖÑܧ¿äöñüà");
+// The following string is "èéùìòÇØøÅåÆæßÉ£$¥¡ÄÖÑܧ¿äöñüà", expressed as standard \xNN escape codes
+_LIT16(KSmsNonUnicodeChars, "\xe8\xe9\xf9\xec\xf2\xc7\xd8\xf8\xc5\xe5\xc6\xe6\xdf\xc9\xa3$\xa5\xa1\xc4\xd6\xd1\xdc\xa7\xbf\xe4\xf6\xf1\xfc\xe0");
+
         
 // OTHER DEFINITIONS
 
@@ -337,7 +339,7 @@
 			{
 			CVMessageParser::TTelephoneNumber recipientInfo;
 			aSm.ParseTelephoneNumber( recipients[i], recipientInfo );
-			aSm.iRecipients.Append( recipientInfo );
+			aSm.iRecipients.AppendL( recipientInfo );
 			}
 		}	
 
@@ -682,6 +684,7 @@
 				{
 				newEntry.iDetails.Set( addrBookName );
 				header.SetFromAddressL( addrBookName );
+				
 				}
 			else
 				{		
@@ -693,6 +696,12 @@
 		CSmsPDU& smsPdu = smsMsg.SmsPDU();
 		CSmsDeliver* smsDeliver = reinterpret_cast<CSmsDeliver*>( &smsPdu );	
 		smsDeliver->SetServiceCenterTimeStamp( newEntry.iDate );
+		if (aSm.iSender.iNumber.Length() > 0)
+		    {
+            TGsmSmsTelNumber telNum;
+            telNum.iTelNumber.Copy( aSm.iSender.iNumber );
+            smsDeliver->SetParsedToFromAddressL( telNum );
+		    }
 		}
 	else // message to be sent
 		{
@@ -1111,7 +1120,10 @@
  
 	CContactItem* item = iContactsDb->ReadContactLC((*contactIds)[0]);
 	CContactItemFieldSet& fieldSet = item->CardFields();
-		
+	
+	TFileName database;
+	iContactsDb->GetCurrentDatabase(database);
+	
 	TPtrC familyName;
 	TPtrC givenName;
 	TInt pos;