# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1268649749 -7200 # Node ID dd93350a5f292af7e3d8d69fce7539c9fc689144 # Parent 30d6238592e839f118005af81eceed7a3b1a9345 Revision: 201009 Kit: 201010 diff -r 30d6238592e8 -r dd93350a5f29 messagingfw/msgsrvnstore/group/messaging_framework.history.xml --- 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. - + Updated the Notification wrt DiskRemove and Disk Insert. - + messaging DB name was passed [1000484b]messaging.db instead of [1000484B]messaging.db to SQL Server + + Changes done in MinTime and MaxTime functions. + + changed error handling while creating conversion status table. diff -r 30d6238592e8 -r dd93350a5f29 messagingfw/msgsrvnstore/server/inc/MSVROPS.H --- 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 }; diff -r 30d6238592e8 -r dd93350a5f29 messagingfw/msgsrvnstore/server/inc/MSVROPS.INL --- 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 diff -r 30d6238592e8 -r dd93350a5f29 messagingfw/msgsrvnstore/server/src/MSVSERV.CPP --- 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); } diff -r 30d6238592e8 -r dd93350a5f29 messagingfw/msgtest/targetautomation/Script/autotest.txt --- 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: diff -r 30d6238592e8 -r dd93350a5f29 messagingfw/senduiservices/group/Sendui.mmp --- 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 */ diff -r 30d6238592e8 -r dd93350a5f29 messagingfw/senduiservices/inc/SendUiImpl.h --- 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: diff -r 30d6238592e8 -r dd93350a5f29 messagingfw/senduiservices/src/SendUiImpl.cpp --- 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* 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* 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