messagingapp/msgappfw/plugins/msgplugin/src/ccsmsghandler.cpp
changeset 52 12db4185673b
parent 44 36f374c67aa8
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
   304 
   304 
   305     for( TInt i=0 ; i < aSelection->Count() ; i++ )
   305     for( TInt i=0 ; i < aSelection->Count() ; i++ )
   306         {
   306         {
   307         error = iSession->GetEntry(aSelection->At(i),service,entry);
   307         error = iSession->GetEntry(aSelection->At(i),service,entry);
   308         
   308         
   309         if ( entry.Visible() == EFalse )
   309         if (aParent == KMsvGlobalInBoxIndexEntryIdValue && KSenduiMtmSmsUidValue == entry.iMtm.iUid) 
   310             {
   310 						{
       
   311             iSmsMtm->SwitchCurrentEntryL(entry.Id());
       
   312             iSmsMtm->LoadMessageL();
       
   313 
       
   314             CSmsHeader& header = static_cast<CSmsClientMtm*> (iSmsMtm)->SmsHeader();
       
   315             CSmsPDU& pdu = header.Message().SmsPDU();
       
   316             TSmsDataCodingScheme::TSmsClass smsClass;
       
   317 
       
   318             if (pdu.Class(smsClass) && smsClass == TSmsDataCodingScheme::ESmsClass0
       
   319                 && entry.ReadOnly()) 
       
   320 							{
       
   321                 iSmsMtm->SwitchCurrentEntryL(entry.iServiceId);
       
   322                 // for class 0 sms dont create conversation entry.. 
       
   323                 continue;
       
   324             	}
       
   325 
       
   326         	 }
       
   327         if (entry.Visible() == EFalse) 
       
   328 						{
   311             // Do a delete if entry becomes invisible.
   329             // Do a delete if entry becomes invisible.
   312             // e.g) My Nokia registration messages.
   330             // e.g) My Nokia registration messages.
   313             RPointerArray<CCsConversationEntry>* hiddenEntries =  
   331             RPointerArray<CCsConversationEntry>* hiddenEntries =  
   314                     new (ELeave) RPointerArray<CCsConversationEntry>();
   332                     new (ELeave) RPointerArray<CCsConversationEntry>();
   315             
   333             
   628             if(iMessageArray->Count())
   646             if(iMessageArray->Count())
   629                 {
   647                 {
   630                 CMsvEntry* msvEntry= iSession->
   648                 CMsvEntry* msvEntry= iSession->
   631                         GetEntryL(iMessageArray->operator[](0));
   649                         GetEntryL(iMessageArray->operator[](0));
   632                 CleanupStack::PushL(msvEntry);
   650                 CleanupStack::PushL(msvEntry);
       
   651             TBool isNotClass0 = ETrue;
       
   652 
       
   653             if (msvEntry->Entry().iMtm.iUid == KSenduiMtmSmsUidValue && msvEntry->Entry().Parent()
       
   654                 == KMsvGlobalInBoxIndexEntryIdValue) 
       
   655 								{
       
   656                 iSmsMtm->SwitchCurrentEntryL(msvEntry->Entry().Id());
       
   657                 iSmsMtm->LoadMessageL();
       
   658 
       
   659                 CSmsHeader& header = static_cast<CSmsClientMtm*> (iSmsMtm)->SmsHeader();
       
   660                 CSmsPDU& pdu = header.Message().SmsPDU();
       
   661                 TSmsDataCodingScheme::TSmsClass smsClass;
       
   662 
       
   663                 if (pdu.Class(smsClass) && smsClass == TSmsDataCodingScheme::ESmsClass0)
       
   664 									{
       
   665                     isNotClass0 = EFalse;                  
       
   666                 	}
       
   667             	}
       
   668             if (isNotClass0) 
       
   669 							{
   633                 ProcessResultsL(msvEntry->Entry());
   670                 ProcessResultsL(msvEntry->Entry());
       
   671             	}
   634                 CleanupStack::PopAndDestroy(msvEntry);
   672                 CleanupStack::PopAndDestroy(msvEntry);
   635                 iMessageArray->Remove(0);
   673                 iMessageArray->Remove(0);
   636                 }
   674                 }
   637             else
   675             else
   638                 {
   676                 {
   735         case KSenduiMMSNotificationUidValue:            
   773         case KSenduiMMSNotificationUidValue:            
   736             type = ECsMmsNotification;
   774             type = ECsMmsNotification;
   737             break;
   775             break;
   738         case KSenduiMtmBioUidValue:
   776         case KSenduiMtmBioUidValue:
   739             { 
   777             { 
       
   778 			if (aEntry.iMtmData1 == KSenduiMtmBtUidValue) 
       
   779 			{
       
   780            	 	if (aEntry.iBioType == KMsgBioUidVCard.iUid) 
       
   781 				{
       
   782                 	type = ECsBlueTooth_VCard;
       
   783             	}
       
   784             	else if (aEntry.iBioType == KMsgBioUidVCalendar.iUid)
       
   785 				{
       
   786                		type = ECsBlueTooth_VCal;
       
   787             	}
       
   788            		 break;
       
   789         	}
   740             type = ECsBioMsg; 
   790             type = ECsBioMsg; 
   741             
   791             
   742             // based on the biotype uid set message type
   792             // based on the biotype uid set message type
   743             if(aEntry.iBioType == KMsgBioUidRingingTone.iUid)
   793             if(aEntry.iBioType == KMsgBioUidRingingTone.iUid)
   744                 {
   794                 {