serviceproviders/sapi_messaging/src/messaginginterface.cpp
changeset 54 e7cb6cffd49a
parent 22 fc9cf246af83
equal deleted inserted replaced
42:92cfb77afb61 54:e7cb6cffd49a
   790 	CSendMessageParams* sendParams = CSendMessageParams::NewL();
   790 	CSendMessageParams* sendParams = CSendMessageParams::NewL();
   791 	CleanupStack::PushL(sendParams);
   791 	CleanupStack::PushL(sendParams);
   792 	
   792 	
   793 	TInt pos = 0;
   793 	TInt pos = 0;
   794 	TBool indexBaseInp = ETrue;
   794 	TBool indexBaseInp = ETrue;
       
   795 	TBool isToPresent = ETrue;
   795 	
   796 	
   796 	const TLiwGenericParam* inMessageType = aInParamList.FindFirst( pos, KMtm );
   797 	const TLiwGenericParam* inMessageType = aInParamList.FindFirst( pos, KMtm );
   797 	if ( inMessageType ) 
   798 	if ( inMessageType ) 
   798 		{
   799 		{
   799 		indexBaseInp = EFalse;
   800 		indexBaseInp = EFalse;
   849 			AppendErrorMessageL( KCmdSendMessage, KRecipientTo, KIncorrectValue, 2 );
   850 			AppendErrorMessageL( KCmdSendMessage, KRecipientTo, KIncorrectValue, 2 );
   850 			}	
   851 			}	
   851 		}
   852 		}
   852 	else
   853 	else
   853 		{	
   854 		{	
   854 		AppendErrorMessageL( KCmdSendMessage, KRecipientTo, KMissing, 1 );
   855 	    isToPresent = EFalse;
   855 		}
   856 		}
   856 
   857 
   857 	// Read BodyText
   858 	// Read BodyText
   858 	if ( indexBaseInp ) 
   859 	if ( indexBaseInp ) 
   859 		{
   860 		{
   991 				}
   992 				}
   992 			
   993 			
   993 			//this is an optional parameter so check for not null constraint, ignore this in case of NULL
   994 			//this is an optional parameter so check for not null constraint, ignore this in case of NULL
   994 			if ( inMap->FindL( KLaunchEditor, inParam ) && CheckInputTypeL( &inParam, EFalse, LIW::EVariantTypeTBool, KCmdSendMessage, KLaunchEditor, KTypeInvalid ) ) 
   995 			if ( inMap->FindL( KLaunchEditor, inParam ) && CheckInputTypeL( &inParam, EFalse, LIW::EVariantTypeTBool, KCmdSendMessage, KLaunchEditor, KTypeInvalid ) ) 
   995 				{
   996 				{
       
   997 			     if(!isToPresent && !(inParam.AsTBool()))
       
   998 			        {
       
   999 			        CleanupStack::PopAndDestroy( &inParam );
       
  1000 			        AppendErrorMessageL( KCmdSendMessage, KRecipientTo, KMissing, 1 );
       
  1001 			        }
   996 				sendParams->SetLaunchEditor( inParam.AsTBool() );
  1002 				sendParams->SetLaunchEditor( inParam.AsTBool() );
   997 				}
  1003 				}
   998 			
  1004 			
   999 			//this is an optional parameter so check for not null constraint, ignore this in case of NULL
  1005 			//this is an optional parameter so check for not null constraint, ignore this in case of NULL
  1000 			if ( inMap->FindL( KRecipientTo, inParam ) && CheckInputTypeL( &inParam, EFalse, LIW::EVariantTypeList, KCmdSendMessage, KRecipientTo, KTypeInvalid ) ) 
  1006 			if ( inMap->FindL( KRecipientTo, inParam ) && CheckInputTypeL( &inParam, EFalse, LIW::EVariantTypeList, KCmdSendMessage, KRecipientTo, KTypeInvalid ) )