Revision: 201009 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:42:29 +0200
branchRCL_3
changeset 11 dd93350a5f29
parent 10 30d6238592e8
child 13 e174c577e901
Revision: 201009 Kit: 201010
messagingfw/msgsrvnstore/group/messaging_framework.history.xml
messagingfw/msgsrvnstore/server/inc/MSVROPS.H
messagingfw/msgsrvnstore/server/inc/MSVROPS.INL
messagingfw/msgsrvnstore/server/src/MSVSERV.CPP
messagingfw/msgtest/targetautomation/Script/autotest.txt
messagingfw/senduiservices/group/Sendui.mmp
messagingfw/senduiservices/inc/SendUiImpl.h
messagingfw/senduiservices/src/SendUiImpl.cpp
--- a/messagingfw/msgsrvnstore/group/messaging_framework.history.xml	Fri Mar 12 15:44:33 2010 +0200
+++ b/messagingfw/msgsrvnstore/group/messaging_framework.history.xml	Mon Mar 15 12:42:29 2010 +0200
@@ -4,14 +4,18 @@
     Framework for storage, retrieval, editing, sending and receiving of messages such as email or SMS.
   </purpose>
 
- <defect number="PDEF142159/EHGO-7V4CS2 " title="A note is displayed after formatting Memory card when "Memory in use" " revision= "131">
+ <defect number="PDEF142159/EHGO-7V4CS2 " title="A note is displayed after formatting Memory card when "Memory in use" " revision= "132">
    	Updated the Notification wrt DiskRemove and Disk Insert.
   </defect>
 
-  <defect number="EMPA-7ZNF42" title="Message store setting to E, is crashing the application after restart" revision= "130">
+  <defect number="EMPA-7ZNF42" title="Message store setting to E, is crashing the application after restart" revision= "131">
    	messaging DB name was passed [1000484b]messaging.db instead of [1000484B]messaging.db to SQL Server
   </defect>
 
+  <defect number="PDEF143512" title="Constant crash in !MsvServer" revision= "130">
+   	Changes done in MinTime and MaxTime functions.
+  </defect>
+
   <defect number="DEF141963" title="converter test case is failing" revision= "129">
    	changed error handling while creating conversion status table.
   </defect>  
--- a/messagingfw/msgsrvnstore/server/inc/MSVROPS.H	Fri Mar 12 15:44:33 2010 +0200
+++ b/messagingfw/msgsrvnstore/server/inc/MSVROPS.H	Mon Mar 15 12:42:29 2010 +0200
@@ -73,6 +73,8 @@
 	inline void StartCommand(CMsvEntrySelection* aSelection, TInt aCommand, HBufC8* aParameter);
 #if (defined SYMBIAN_USER_PROMPT_SERVICE)	
  	inline void SetThreadId(TThreadId aThreadId);
+ 	inline void SetCapability(TBool aCap);
+ 	inline TBool Capability();
 #endif
 	//
 protected:
@@ -100,6 +102,7 @@
 	HBufC8* iDesParam;
 #if (defined SYMBIAN_USER_PROMPT_SERVICE)	
  	TThreadId iThreadId;
+ 	TBool iHasCapability;
 #endif
 	};
 
--- a/messagingfw/msgsrvnstore/server/inc/MSVROPS.INL	Fri Mar 12 15:44:33 2010 +0200
+++ b/messagingfw/msgsrvnstore/server/inc/MSVROPS.INL	Mon Mar 15 12:42:29 2010 +0200
@@ -70,4 +70,12 @@
  	{
  	iThreadId = aThreadId;
  	}
+inline void CMsvMtmOperation::SetCapability(TBool aCap)
+    {
+    iHasCapability = aCap;
+    }
+inline TBool CMsvMtmOperation::Capability()
+    {
+    return iHasCapability;
+    }
 #endif
--- a/messagingfw/msgsrvnstore/server/src/MSVSERV.CPP	Fri Mar 12 15:44:33 2010 +0200
+++ b/messagingfw/msgsrvnstore/server/src/MSVSERV.CPP	Mon Mar 15 12:42:29 2010 +0200
@@ -3567,6 +3567,7 @@
 	// if an operation is already running, queue this one
 	if (opRunning)
 		{
+        aOperation.SetCapability(hasCapability);
 		QueueOperationL(aOperation, aSessionId);
 		return;
 		}
@@ -3745,7 +3746,8 @@
 			return;
 			}
 		}
-	aQueue->At(0)->Start(*aQueue->iMtm, EFalse);
+	
+	aQueue->At(0)->Start(*aQueue->iMtm, aQueue->At(0)->Capability());
 	aQueue->At(0)->SetState(EMsvOperationRunning);
 	}
 
--- a/messagingfw/msgtest/targetautomation/Script/autotest.txt	Fri Mar 12 15:44:33 2010 +0200
+++ b/messagingfw/msgtest/targetautomation/Script/autotest.txt	Mon Mar 15 12:42:29 2010 +0200
@@ -1,11 +1,11 @@
-# Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
+# under the terms of "Eclipse Public License v1.0"
 # which accompanies this distribution, and is available
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
 #
-# Initial Contributors:
+#Initial Contributors:
 # Nokia Corporation - initial contribution.
 #
 # Contributors:
--- a/messagingfw/senduiservices/group/Sendui.mmp	Fri Mar 12 15:44:33 2010 +0200
+++ b/messagingfw/senduiservices/group/Sendui.mmp	Mon Mar 15 12:42:29 2010 +0200
@@ -97,5 +97,6 @@
 #ifdef RD_MULTIPLE_DRIVE
 LIBRARY         platformenv.lib
 #endif
+LIBRARY		senduidatautils.lib
 
 /* End of File */
--- a/messagingfw/senduiservices/inc/SendUiImpl.h	Fri Mar 12 15:44:33 2010 +0200
+++ b/messagingfw/senduiservices/inc/SendUiImpl.h	Mon Mar 15 12:42:29 2010 +0200
@@ -43,6 +43,8 @@
 class CPropertyObserver;
 class TDataType;
 class CSendUiSingleton;
+class CSendUiAttachment;
+class CSendUiFileRightsEngine;
 
 /**
  *  Implementation of SendUI API
@@ -334,6 +336,17 @@
       */ 
      
      TBool IsEmailAppendableL(TMsvEntry tentry);
+	 
+     /**
+      * Validates if all the attachments are DRM protected 
+      *
+      * @since S60 v5.0
+      * @param TBool
+      * @return ETrue, if it atleast one of the attachments can be sent 
+      *         EFalse, if no attachment can be sent
+      */ 
+     
+     TBool ValidateAttachmentsL(const CMessageData*  aMessageData);
      
      
 private:
--- a/messagingfw/senduiservices/src/SendUiImpl.cpp	Fri Mar 12 15:44:33 2010 +0200
+++ b/messagingfw/senduiservices/src/SendUiImpl.cpp	Mon Mar 15 12:42:29 2010 +0200
@@ -56,7 +56,8 @@
 #include "propertyobserver.h"
 #include "senduilauncher.h"
 #include "SendUiInternalConsts.h"
-
+#include "SendUiFileRightsEngine.h"
+#include "CSendUiAttachment.h"
 
 const TInt KArrayGranularity = 2;
 const TInt KSendUiServiceOrderArrayGranularity = 6;
@@ -207,6 +208,14 @@
     CArrayFix<TUid>*            aServicesToDim,
     const TDesC&                aTitleText )
     {
+        if(aMessageData)
+        {
+        TBool continueSending = ValidateAttachmentsL(aMessageData);
+        if(!continueSending)
+            {
+               return  KNullUid;
+            }
+        }
     // Implemented for CR # 401-1806 >>    
     // This section to enable/disable features (supported by feature manager) at run time, is to be revised,
     // once an observer class is available from feature manager side to intimate about feature state
@@ -1364,6 +1373,40 @@
         }
     return appendEmail;
     }
-
+// -----------------------------------------------------------------------------
+// ValidateAttachmentsL
+// Validates if all the attachments are DRM protected 
+// -----------------------------------------------------------------------------
+//
+TBool CSendUiImpl::ValidateAttachmentsL(const CMessageData*  aMessageData)
+    {
+    CArrayPtrFlat<CSendUiAttachment>* attachments = NULL;
+    TInt cleanupItems(0);
+    TBool okToSend = EFalse;
+    CSendUiFileRightsEngine* fileRightsEngine = CSendUiFileRightsEngine::NewLC( iCoeEnv->FsSession() );
+    cleanupItems++;
+    // Get attachments
+    if ( aMessageData )
+        {
+        attachments = CSendUiAttachment::InitAttachmentArrayLCC( 
+            aMessageData->AttachmentArray(), 
+            aMessageData->AttachmentHandleArray(),
+            iCoeEnv->FsSession() );
+        cleanupItems += 2;
+        }   
+    fileRightsEngine->ConfirmDrmFileRightsL( attachments );
+    if ( attachments->Count() <= 0 )
+        {
+        fileRightsEngine->ShowDrmAndMmsInfoL();
+        }
+    else
+        {
+		// there are one or more files that can be sent, so dont shown error note now.
+        okToSend = ETrue;
+        }
+    CleanupStack::PopAndDestroy( cleanupItems );
+    
+    return okToSend;
+    }
 // end of file