# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277305757 -10800 # Node ID 35b64624a9e75d36db1d68410474db8afe259834 # Parent 84197e66a4bdaa5c87209542c8357f2bde8b3b42 Revision: 201023 Kit: 2010125 diff -r 84197e66a4bd -r 35b64624a9e7 inc/unidatamodelplugininterface.h --- a/inc/unidatamodelplugininterface.h Fri Jun 11 13:35:48 2010 +0300 +++ b/inc/unidatamodelplugininterface.h Wed Jun 23 18:09:17 2010 +0300 @@ -84,6 +84,30 @@ inline const QString& mimetype(); /** + * isProtected + * @return true if DRM protected object else false. + */ + inline bool isProtected() const; + + /** + * setProtected + * @param isProtected true if DRM protected object else false. + */ + inline void setProtected(bool isProtected); + + /** + * isCorrupted + * @return true if object is corrupted else false. + */ + inline bool isCorrupted() const; + + /** + * setCorrupted + * @param corrupted true if object is corrupted else false. + */ + inline void setCorrupted(bool corrupted); + + /** * Serialize the data memebers into the stream. * @param stream data stream to which data is serialized. */ @@ -97,8 +121,10 @@ private: QString mPath; + QString mMimeType; int mSize; - QString mMimeType; + bool mProtected; + bool mCorrupt; }; diff -r 84197e66a4bd -r 35b64624a9e7 inc/unidatamodelplugininterface.inl --- a/inc/unidatamodelplugininterface.inl Fri Jun 11 13:35:48 2010 +0300 +++ b/inc/unidatamodelplugininterface.inl Wed Jun 23 18:09:17 2010 +0300 @@ -18,9 +18,8 @@ // UniMessageInfo::UniMessageInfo // @see header //---------------------------------------------------------------- - UniMessageInfo::UniMessageInfo( const QString& filepath, - const int size, - const QString& mimetype ) : mPath (filepath), mSize(size), mMimeType(mimetype) +UniMessageInfo::UniMessageInfo(const QString& filepath, const int size, const QString& mimetype) : + mPath(filepath), mMimeType(mimetype), mSize(size), mProtected(false), mCorrupt(false) { @@ -89,6 +88,42 @@ } //---------------------------------------------------------------- +// UniMessageInfo::isProtected +// @see header +//---------------------------------------------------------------- +inline bool UniMessageInfo::isProtected() const + { + return mProtected; + } + +//---------------------------------------------------------------- +// UniMessageInfo::setProtected +// @see header +//---------------------------------------------------------------- +inline void UniMessageInfo::setProtected(bool isProtected) + { + mProtected = isProtected; + } + +//---------------------------------------------------------------- +// UniMessageInfo::isCorrupted +// @see header +//---------------------------------------------------------------- +inline bool UniMessageInfo::isCorrupted() const + { + return mCorrupt; + } + +//---------------------------------------------------------------- +// UniMessageInfo::setCorrupted +// @see header +//---------------------------------------------------------------- +inline void UniMessageInfo::setCorrupted(bool corrupted) + { + mCorrupt = corrupted; + } + +//---------------------------------------------------------------- // UniMessageInfo::serialize // @see header //---------------------------------------------------------------- diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/msghistory/msghistory.pro --- a/messagingapp/msgappfw/msghistory/msghistory.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/msghistory/msghistory.pro Wed Jun 23 18:09:17 2010 +0300 @@ -17,7 +17,6 @@ TARGET = msghistory DEPENDPATH += . inc src INCLUDEPATH += . -INCLUDEPATH += ../../msgutils/s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += MSGHISTORY_DLL @@ -51,8 +50,15 @@ src/msghistoryprivate.cpp \ src/msgitem.cpp - +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/msghistory.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/msghistory.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock LIBS += -lcsserverclientapi \ -lcsutils \ - -ls60qconversions \ No newline at end of file + -lxqutils diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/msghistory/src/msghistoryprivate.cpp --- a/messagingapp/msgappfw/msghistory/src/msghistoryprivate.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/msghistory/src/msghistoryprivate.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -19,7 +19,7 @@ #include #include #include -#include +#include //USER INCLUDES #include "msghistoryprivate.h" @@ -236,7 +236,7 @@ HBufC* description = entry.Description(); if( description && description->Length()) { - item.setBody(S60QConversions::s60DescToQString(*description)); + item.setBody(XQConversions::s60DescToQString(*description)); } // time stamp @@ -250,7 +250,7 @@ HBufC* contact = entry.Contact(); if( contact && contact->Length()) { - item.setPhoneNumber(S60QConversions::s60DescToQString(*contact)); + item.setPhoneNumber(XQConversions::s60DescToQString(*contact)); } //sending state diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsengine.cpp --- a/messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsengine.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsengine.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -26,7 +26,7 @@ #include "debugtraces.h" #include #include -#include "s60qconversions.h" +#include const int ViewableLimit = 160; //--------------------------------------------------------------- @@ -137,7 +137,7 @@ // description QString descr = item.body(); - HBufC* description = S60QConversions::qStringToS60Desc(descr); + HBufC* description = XQConversions::qStringToS60Desc(descr); entry->SetDescriptionL(description->Des()); delete description; @@ -147,7 +147,7 @@ //contact details QString details = item.phoneNumber(); - HBufC* d_details = S60QConversions::qStringToS60Desc(details); + HBufC* d_details = XQConversions::qStringToS60Desc(details); entry->SetContactL(d_details->Des()); delete d_details; diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsengineutility.cpp --- a/messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsengineutility.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsengineutility.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -32,7 +32,7 @@ #include "smilxmlreader.h" #include "smilliterals.h" #include "msgmimetypes.h" -#include "s60qconversions.h" +#include // CONSTANTS #define KForwardSlash '/' @@ -78,7 +78,7 @@ { //get smilfile's handle to parse RFile smilfile; - HBufC* path = S60QConversions::qStringToS60Desc(ismilfilepath); + HBufC* path = XQConversions::qStringToS60Desc(ismilfilepath); RFs fsSession; User::LeaveIfError(fsSession.Connect()); @@ -241,7 +241,7 @@ qDebug() << " Exit CNativeMmsUtility::getSmilFileL"; #endif - return S60QConversions::s60DescToQString(attachment->FilePath()); + return XQConversions::s60DescToQString(attachment->FilePath()); } } @@ -285,7 +285,7 @@ //because media source is relative to it. QString smildirpath = fileDir(ismilfilepath); QString mfilename = - S60QConversions::s60DescToQString(attrvalptr); + XQConversions::s60DescToQString(attrvalptr); filepath = smildirpath.append(mfilename); } readFileIntoBuffer(filepath, returnbuf); @@ -321,7 +321,7 @@ == 0) { QString filepath = - S60QConversions::s60DescToQString(attachment->FilePath()); + XQConversions::s60DescToQString(attachment->FilePath()); readFileIntoBuffer(filepath, returnbuf); break; } @@ -371,7 +371,7 @@ //because media source is relative to it. QString smildirpath = fileDir(ismilfilepath); QString mfilename = - S60QConversions::s60DescToQString(attrvalptr); + XQConversions::s60DescToQString(attrvalptr); filepath = smildirpath.append(mfilename); } // converting directory separators from native to @@ -409,7 +409,7 @@ CMsvAttachment *attachment = iattachmanager->GetAttachmentInfoL(i); TPtrC8 mimetype = attachment->MimeType(); QString filepath = - S60QConversions::s60DescToQString(attachment->FilePath()); + XQConversions::s60DescToQString(attachment->FilePath()); // converting directory separators from native to // universal (QT) format filepath.replace(KBackwardSlash, KForwardSlash); @@ -476,7 +476,7 @@ CMsvAttachment *attachment = iattachmanager->GetAttachmentInfoL(i); TPtrC8 mimetype = attachment->MimeType(); QString filepath = - S60QConversions::s60DescToQString(attachment->FilePath()); + XQConversions::s60DescToQString(attachment->FilePath()); // converting directory separators from native to // universal (QT) format filepath.replace(KBackwardSlash, KForwardSlash); @@ -577,7 +577,7 @@ qDebug() << " Exit CNativeMmsUtility::getByUrlL"; #endif - return S60QConversions::s60DescToQString(targetattachment->FilePath()); + return XQConversions::s60DescToQString(targetattachment->FilePath()); } else { diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsmodel.cpp --- a/messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsmodel.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationsmodel.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -19,7 +19,7 @@ #include "conversationsenginedefines.h" #include "conversationmsgstorehandler.h" #include "convergedmessage.h" -#include "s60qconversions.h" +#include #include "conversationsengineutility.h" #include @@ -251,7 +251,7 @@ QString subject(""); if( description && description->Length()) { - subject = (S60QConversions::s60DescToQString(*description)); + subject = (XQConversions::s60DescToQString(*description)); item.setData(subject, Subject); } @@ -266,7 +266,7 @@ HBufC* contact = entry.Contact(); if( contact && contact->Length()) { - item.setData(S60QConversions::s60DescToQString(*contact), ConversationAddress); + item.setData(XQConversions::s60DescToQString(*contact), ConversationAddress); } // message type. diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationssummarymodel.cpp --- a/messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationssummarymodel.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/msghistory/tsrc/test_appengine/src/conversationssummarymodel.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -18,7 +18,7 @@ #include "conversationssummarymodel.h" #include "conversationsenginedefines.h" #include "conversationsengineutility.h" -#include "s60qconversions.h" +#include #include "convergedmessage.h" #include @@ -214,7 +214,7 @@ HBufC* body = conEntry->Description(); if( body && body->Length()) { - QString bodytext(S60QConversions::s60DescToQString(*body)); + QString bodytext(XQConversions::s60DescToQString(*body)); item.setData(bodytext, BodyText); item.setData(bodytext, Subject ); } @@ -235,20 +235,20 @@ //first name if(firstname && firstname->Length()) { - displayName = S60QConversions::s60DescToQString(*firstname); + displayName = XQConversions::s60DescToQString(*firstname); item.setData(displayName,FirstName); } //last name HBufC* lastname = conversation.GetLastName(); if( lastname && lastname->Length()) { - item.setData(S60QConversions::s60DescToQString(*lastname),LastName); + item.setData(XQConversions::s60DescToQString(*lastname),LastName); } //nick name HBufC* nickname = conversation.GetNickName(); if (nickname && nickname->Length()) { - item.setData(S60QConversions::s60DescToQString(*nickname), NickName); + item.setData(XQConversions::s60DescToQString(*nickname), NickName); } //item.setData(displayName, NickName); @@ -258,7 +258,7 @@ QString contactNumber(""); if ( contactno && contactno->Length() ) { - contactNumber = S60QConversions::s60DescToQString(*contactno); + contactNumber = XQConversions::s60DescToQString(*contactno); } item.setData(contactNumber, ConversationAddress); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/msghistory/tsrc/test_appengine/test_appengine.pro --- a/messagingapp/msgappfw/msghistory/tsrc/test_appengine/test_appengine.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/msghistory/tsrc/test_appengine/test_appengine.pro Wed Jun 23 18:09:17 2010 +0300 @@ -20,7 +20,6 @@ DEPENDPATH += . src INCLUDEPATH += ../../../inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += BUILD_DLL @@ -64,7 +63,7 @@ LIBS += -lcsserverclientapi \ -lcsutils \ - -ls60qconversions \ + -lxqutils \ -lconvergedmessageutils \ -lmsgs \ -lInetProtUtil \ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/msgplugin/src/ccsmsgpluginutility.cpp --- a/messagingapp/msgappfw/plugins/msgplugin/src/ccsmsgpluginutility.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/plugins/msgplugin/src/ccsmsgpluginutility.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -76,7 +76,9 @@ conversationEntry->SetContactL( *aContact ); conversationEntry->SetEntryId( aEnryId ); conversationEntry->SetTimeStampL( aTimeStamp ); + if (aDescription) { conversationEntry->SetDescriptionL( *aDescription ); + } conversationEntry->SetConversationDir( MapDirection( aDir ) ); conversationEntry->SetSendState( aSendState ); conversationEntry->ChangeAttributes( aMsgAttribs, ECsAttributeNone ); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/src/ccspreviewpluginhandler.cpp --- a/messagingapp/msgappfw/plugins/previewplugin/src/ccspreviewpluginhandler.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/plugins/previewplugin/src/ccspreviewpluginhandler.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -347,6 +347,7 @@ { CUniObject *obj = iUniDataModel->SmilModel(). GetObjectByIndex(i, j); + CMsgMediaInfo *mediaInfo = obj->MediaInfo(); TPtrC8 mimetype = obj->MimeType(); TMsvAttachmentId attachId = obj->AttachmentId(); @@ -365,10 +366,26 @@ != KErrNotFound)) { //get thumbnail for this image - GetThumbNailL(attachId, mimetype, msgId); isImageSet = ETrue; - imagePath.Set(obj->MediaInfo()->FullFilePath()); + imagePath.Set(mediaInfo->FullFilePath()); msgProperty |= EPreviewImage; + + if (EFileProtNoProtection != mediaInfo->Protection()) + { + msgProperty |= EPreviewProtectedImage; + } + if (mediaInfo->Corrupt()) + { + msgProperty |= EPreviewCorruptedImage; + } + + if (!(EPreviewProtectedImage & msgProperty) && + !(EPreviewCorruptedImage & msgProperty)) + { + //Generate thumbnail for non protected, + //non corrupted image. + GetThumbNailL(attachId, mimetype, msgId); + } } //audio content @@ -377,15 +394,31 @@ { isAudioSet = ETrue; msgProperty |= EPreviewAudio; + if (EFileProtNoProtection != mediaInfo->Protection()) + { + msgProperty |= EPreviewProtectedAudio; + } + if (mediaInfo->Corrupt()) + { + msgProperty |= EPreviewCorruptedAudio; + } } //video content if (!isVideoSet && (mimetype.Find(_L8("video")) != KErrNotFound)) { - videoPath.Set(obj->MediaInfo()->FullFilePath()); + videoPath.Set(mediaInfo->FullFilePath()); isVideoSet = ETrue; msgProperty |= EPreviewVideo; + if (EFileProtNoProtection != mediaInfo->Protection()) + { + msgProperty |= EPreviewProtectedVideo; + } + if (mediaInfo->Corrupt()) + { + msgProperty |= EPreviewCorruptedVideo; + } } } } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/.cproject --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/.cproject Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/.project --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/.project Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,20 @@ + + + test_pluginpreview + + + + + + com.nokia.carbide.cdt.builder.carbideCPPBuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + com.nokia.carbide.cdt.builder.carbideCPPBuilderNature + com.nokia.carbide.cdt.builder.carbideSBSv2BuilderNature + + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/Makefile Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,90 @@ +# ============================================================================== +# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri Apr 16 15:48:22 2010 +# This file is generated by qmake and should not be modified by the +# user. +# Name : Makefile +# Description : Wrapper Makefile for calling Symbian build tools +# +# ============================================================================== + + +MAKEFILE = Makefile +QMAKE = r:\epoc32\tools\qt\qmake.exe +DEL_FILE = del +DEL_DIR = rmdir +MOVE = move +DEBUG_PLATFORMS = winscw armv5 +RELEASE_PLATFORMS = armv5 +MAKE = make +SBS = sbs + +DEFINES = -DSYMBIAN -DUNICODE -DQT_KEYPAD_NAVIGATION -DQT_SOFTKEYS_ENABLED -DQT_USE_MATH_H_FLOATS -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB +INCPATH = -I"R:/epoc32/include/mw/QtCore" -I"R:/epoc32/include/mw/QtGui" -I"R:/epoc32/include/mw" -I"R:/sf/mw/qt/mkspecs/common/symbian" -I"R:/epoc32/include" -I"R:/epoc32/include/stdapis" -I"R:/epoc32/include/stdapis/sys" -I"R:/epoc32/include/platform/mw" -I"R:/epoc32/include/platform" -I"R:/epoc32/include/platform/loc" -I"R:/epoc32/include/platform/mw/loc" -I"R:/epoc32/include/platform/loc/sc" -I"R:/epoc32/include/platform/mw/loc/sc" -I"R:/epoc32/include/app" -I"R:/epoc32/include/platform/app" -I"R:/epoc32/include/platform/app/loc" -I"R:/epoc32/include/platform/app/loc/sc" -I"R:/sf/app/messaging/messagingapp/msgappfw/plugin/tsrc" -I"R:/epoc32/include/stdapis/stlportv5" +first: default +default: debug-winscw +all: debug release + +qmake: + $(QMAKE) -spec symbian-sbsv2 -o "bld.inf" "R:/sf/app/messaging/messagingapp/msgappfw/plugin/tsrc/test_plugin.pro" + +bld.inf: + $(QMAKE) + +debug: bld.inf + $(SBS) -c winscw_udeb.mwccinc -c armv5_udeb +release: bld.inf + $(SBS) -c armv5_urel +debug-winscw: bld.inf + $(SBS) -c winscw_udeb.mwccinc +debug-armv5: bld.inf + $(SBS) -c armv5_udeb +release-armv5: bld.inf + $(SBS) -c armv5_urel + +export: bld.inf + $(SBS) export + +cleanexport: bld.inf + $(SBS) cleanexport + + + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all +FORCE: + +-include .make.cache + +sis: + $(if $(wildcard test_plugin_template.pkg),$(if $(wildcard .make.cache),$(MAKE) -s -f $(MAKEFILE) ok_sis,$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) ok_sis,$(MAKE) -s -f $(MAKEFILE) fail_sis_nocache)),$(MAKE) -s -f $(MAKEFILE) fail_sis_nopkg) + +ok_sis: + createpackage.bat $(QT_SIS_OPTIONS) test_plugin_template.pkg $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + +fail_sis_nopkg: + $(error PKG file does not exist, 'SIS' target is only supported for executables or projects with DEPLOYMENT statement) + +fail_sis_nocache: + $(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target) + +dodistclean: + -@ if EXIST "r:\sf\app\messaging\messagingapp\msgappfw\plugin\tsrc\Makefile" $(DEL_FILE) "r:\sf\app\messaging\messagingapp\msgappfw\plugin\tsrc\Makefile" + -@ if EXIST "r:\sf\app\messaging\messagingapp\msgappfw\plugin\tsrc\bld.inf" $(DEL_FILE) "r:\sf\app\messaging\messagingapp\msgappfw\plugin\tsrc\bld.inf" + +distclean: clean dodistclean + +clean: bld.inf + -$(SBS) reallyclean + +clean-debug: bld.inf + $(SBS) reallyclean -c winscw_udeb -c armv5_udeb +clean-release: bld.inf + $(SBS) reallyclean -c armv5_urel +clean-debug-winscw: bld.inf + $(SBS) reallyclean -c winscw_udeb +clean-debug-armv5: bld.inf + $(SBS) reallyclean -c armv5_udeb +clean-release-armv5: bld.inf + $(SBS) reallyclean -c armv5_urel + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/conf/test_pluginpreview.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/conf/test_pluginpreview.cfg Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,43 @@ +/* +* ============================================================================== +* Name : test_pluginpreview.cfg +* Part of : plugin / test_plugin +* Description : plugin related test cases +* Version: : % version:1 % +* +* Copyright (c) 2009 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* ============================================================================ +*/ + +[Test] +title 1. CreateCCsPreviewPluginL +create test_pluginpreview testplugin +testplugin CreateCCsPreviewPluginL +delete testplugin +[Endtest] + + +[Test] +title 2. MmsMsgPluginValidationL +create test_pluginpreview testplugin +testplugin MmsMsgPluginValidationL +delete testplugin +[Endtest] + + +[Test] +title 3. SendMmsMessageL +create test_pluginpreview testplugin +testplugin SendMmsMessageL +delete testplugin +[Endtest] + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/group/bld.inf Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,36 @@ +/* +* Copyright (c) 2009 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ?Description +* +*/ + +#define BLD_INF_GROUP_0496D339 + + +prj_platforms + +WINSCW GCCE ARMV5 ARMV6 + +prj_testmmpfiles + +test_pluginpreview.mmp + +prj_extensions + + +#if defined(WINSCW) +#else +#endif + + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/group/test_pluginpreview.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/group/test_pluginpreview.mmp Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2009 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ?Description +* +*/ + + +// To get the OSEXT_LAYER_SYSTEMINCLUDE-definition +#include +#include + + +TARGET test_pluginpreview.dll +TARGETTYPE dll +UID 0x1000008D 0x101FB3D3 + +CAPABILITY ALL -TCB + +//TARGETPATH ?target_path +DEFFILE test_plugin.def + +#ifdef SBSV2 + USERINCLUDE ../inc + + #if defined(__S60_) + + #else // __S60_ not defined + SYSTEMINCLUDE /epoc32/include + SYSTEMINCLUDE /epoc32/include/internal + #endif // __S60_ + + SOURCEPATH ../src +#else // SBSV2 not defined + USERINCLUDE ..\inc + + #if defined(__S60_) + OSEXT_LAYER_SYSTEMINCLUDE + #else // __S60_ not defined + SYSTEMINCLUDE \epoc32\include + SYSTEMINCLUDE \epoc32\include\internal + #endif // __S60_ + + SOURCEPATH ..\src +#endif // SBSV2 + +SOURCEPATH ../src +SOURCE test_pluginpreview.cpp +SOURCE test_pluginpreviewblocks.cpp +SOURCE ..\..\src\ccspreviewplugin.cpp +SOURCE ..\..\src\ccspreviewpluginhandler.cpp +SOURCE ..\..\src\proxy.cpp + +USERINCLUDE ..\inc +USERINCLUDE ..\..\inc +USERINCLUDE ..\..\..\..\..\msgutils\unidatautils\unidatamodel\inc +USERINCLUDE ..\..\..\..\..\..\messagingappbase\obexmtms\TObexMTM\INC + +APP_LAYER_SYSTEMINCLUDE +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib +LIBRARY eCom.lib +LIBRARY csutils.lib +LIBRARY efsrv.lib + +DEBUGLIBRARY flogger.lib + +// Msg Server +LIBRARY Smcm.lib +LIBRARY gsmu.lib +LIBRARY etext.lib +LIBRARY msgs.lib +LIBRARY sqldb.lib +LIBRARY thumbnailmanager.lib +LIBRARY fbscli.lib +LIBRARY estor.lib +LIBRARY unidatamodel.lib +LIBRARY charconv.lib +LIBRARY sendas2.lib + +SYSTEMINCLUDE \epoc32\include\internal + +LIBRARY cone.lib +LIBRARY ecom.lib +LIBRARY bafl.lib +LIBRARY estor.lib +LIBRARY euser.lib +LIBRARY flogger.lib +LIBRARY stiftestinterface.lib +LIBRARY stiftestengine.lib +LIBRARY imcm.lib +LIBRARY msgs.lib +LIBRARY charconv.lib + +// Msg Server +LIBRARY Smcm.lib +LIBRARY gsmu.lib +LIBRARY etext.lib +LIBRARY msgs.lib +LIBRARY sqldb.lib +LIBRARY thumbnailmanager.lib +LIBRARY fbscli.lib +LIBRARY estor.lib +LIBRARY unidatamodel.lib +LIBRARY charconv.lib +LIBRARY centralrepository.lib +LIBRARY MsgMedia.lib + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/group/test_pluginpreview.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/group/test_pluginpreview.pkg Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,41 @@ +; +; Copyright (c) 2009 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" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Header +#{"Testcache"}, (0x101FB3E3), 1, 2, 3, TYPE=SP + +;Language - standard language definitions +&EN + +;Vendor ID +:"Nokia Corporation" + +;Localised vendor +%{"Vendor-EN"} + +;Supports Series 60 v 0.9 +[0x101F7961], 0, 0, 0, {"Series60ProductID"} + +;rom will not allow to update it if name is testframework, after install need to rename it to testframework.ini + +;INI FILE +"..\init\test_plugin.ini" -"c:\Testframework\testframework.ini" + +;CFG FILES +"..\conf\test_plugin.cfg" -"c:\Testframework\test_plugin.cfg" + + +"\EPOC32\RELEASE\ARMV5\UREL\test_plugin.dll" -"!:\sys\bin\test_plugin.dll" + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/inc/test_pluginpreview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/inc/test_pluginpreview.h Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,232 @@ + +/* +# +# Copyright (c) 2009 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Main test class header for CS Preview Plugin +#*/ + +#ifndef TEST_PLUGINPREVIEW_H_ +#define TEST_PLUGINPREVIEW_H_ + +// INCLUDES +#include +#include +#include +#include + +// USER INCLUDE +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include + +// Logging path +_LIT( KTestPluginLogPath, "\\logs\\testframework\\test_pluginpreview\\" ); +// Log file +_LIT( KTestPluginTestLogFile, "test_pluginpreview.txt" ); +_LIT( KTestPluginTestLogFileWithTitle, "test_pluginpreview_[%S].txt" ); + + +// FORWARD DECLARATION +class CCsPlugin; +class CMsvSession; +class MCsPluginEventObserver; +class MMsvSessionObserver; +class CCsConversationEntry; +class CCsPreviewPlugin; +class CClientMtmRegistry; +class CMmsClientMtm; +class MCsPluginEventObserver; +class CCsPreviewPluginHandler; + +/** + * Message plugin class + **/ + +NONSHARABLE_CLASS(Ctest_pluginpreview) : public CScriptBase,public MMsvSessionObserver,public MThumbnailManagerObserver,public MCsPluginEventObserver,public MUniDataModelObserver +{ + + private: + + /** + * C++ default constructor. + */ + Ctest_pluginpreview(CTestModuleIf& aTestModuleIf ); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + // Prohibit copy constructor if not deriving from CBase. + // ?classname( const ?classname& ); + // Prohibit assigment operator if not deriving from CBase. + // ?classname& operator=( const ?classname& ); + + /** + * Frees all resources allocated from test methods. + * @since ?Series60_version + */ + void Delete(); + + /** + * Example test method. + * @since ?Series60_version + * @param aItem Script line containing parameters. + * @return Symbian OS error code. + */ + virtual TInt ExampleL( CStifItemParser& aItem ); + + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static Ctest_pluginpreview* NewL( CTestModuleIf& aTestModuleIf ); + + /** + * From CScriptBase Runs a script line. + * @since ?Series60_version + * @param aItem Script line containing method name and parameters + * @return Symbian OS error code + * */ + + virtual TInt RunMethodL( CStifItemParser& aItem ); + /** + * Destructor. + */ + virtual ~Ctest_pluginpreview(); + + private: + + CCsPreviewPlugin* iPlugin; + + /** + * MsvServer session object + * Own + */ + CMsvSession* iSession; + + /** + * Mtm registry object + * Own + */ + CClientMtmRegistry* iMtmRegistry; + + /** + * Mms client mtm object + * Own. + */ + CMmsClientMtm* iMmsMtm; + CThumbnailManager* iThumbnailManager; + + public: + + /** + * HandleCachingCompleted + * Sends the cache completed status to server + */ + void HandleCachingCompleted(); + + /** + * HandleCachingError + * Sends the error occured during the caching to server + */ + void HandleCachingError(const TInt aError); + + public: + //MMsvSessionObserver + /** + * Handles the MsvServer updates. Implemented for MMsvSessionObserver + */ + void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, + TAny* aArg2, TAny* aArg3); + + public: + //MUniDataModelObserver + /** + */ + void RestoreReady(TInt aParseResult, TInt aError); + + public://Mcsplugineventobserver + /** + * AddConversations. + * Handle Conversation event from Plugins + * @param aConversationEntryLists List of conversation entries. + */ + void AddConversations(const RPointerArray& /*aConversationEntryLists*/){} + + /** + * ModifyConversations. + * Update Conversation event from Plugins + * @param aConversationEntryLists List of conversation entries. + */ + void ModifyConversations(const RPointerArray& /*aConversationEntryLists*/){} + + /** + * DeleteConversations. + * Delete Conversation event from Plugins + * @param aConversationEntryLists List of conversation entries. + */ + void DeleteConversations(const RPointerArray& /*aConversationEntryLists*/){} + /** + * CachingCompleted. + * Caching complete event from Plugins + */ + void CachingCompleted(){} + + /** + * CachingError. + * Caching error event from Plugins + * @param aError Caching Error infomation. + */ + void CachingError(const TInt /*aError*/) {} + + /** + * RefreshConversations + * Refresh all data from this plugin. + */ + void RefreshConversations(){} + + public: + // Callbacks from MThumbnailManagerObserver for getting thumbnails + void ThumbnailPreviewReady(MThumbnailData& aThumbnail, + TThumbnailRequestId aId); + + void ThumbnailReady(TInt aError, MThumbnailData& aThumbnail, + TThumbnailRequestId aId); + public: + + virtual TInt CreateCCsPreviewPluginL( CStifItemParser& /*aItem*/ ); + virtual TInt MmsMsgPluginValidationL( CStifItemParser& /*aItem*/ ); + virtual TInt SendMmsMessageL( CStifItemParser& /*aItem*/ ); + + void CleanAllFoldersL(); + void CreateMmsMessageL(const TMsvId aFolderId,TBool aUnReadFlag = EFalse); + void HandleAttachementL(CMsvStore* store,TFileName& sourceFileName ); + void CleanMessagesInFolderL(TMsvId aBoxId ,TBool aDeleteOne = EFalse); + // void CreateInitialCacheL(); + }; + +#endif /* test_pluginpreview_H_ */ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/init/TestFramework.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/init/TestFramework.ini Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,44 @@ +# +# This is STIFTestFramework initialization file +# Comment lines start with '#'-character. +# See STIF TestFramework users guide.doc for instructions + +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +[Engine_Defaults] + +TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment', + 'TestCases' or 'FullReport' + +CreateTestReport= YES # Possible values: YES or NO + +TestReportFilePath= C:\LOGS\TestFramework\ +TestReportFileName= TestReport + +TestReportFormat= TXT # Possible values: TXT or HTML +TestReportOutput= FILE # Possible values: FILE or RDEBUG +TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND + +DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting + +[End_Defaults] +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +# Module configurations start + +[New_Module] +ModuleName= testscripter +TestCaseFile= C:\testframework\test_pluginpreview.cfg +[End_Module] + + + +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +[Logger_Defaults] + +[End_Logger_Defaults] +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +# End of file diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/src/test_pluginpreview.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/src/test_pluginpreview.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,155 @@ +/* +# +# Copyright (c) 2009 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Test class for CS Preview Plugin +# +*/ + + +// INCLUDE FILES +#include +#include "test_pluginpreview.h" +#include + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::Ctest_pluginpreview +// C++ default constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- + +Ctest_pluginpreview::Ctest_pluginpreview( CTestModuleIf& aTestModuleIf ) : CScriptBase( aTestModuleIf ) + { + } + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::ConstructL +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// + +void Ctest_pluginpreview::ConstructL() + { + //Read logger settings to check whether test case name is to be + //appended to log file name. + RSettingServer settingServer; + TInt ret = settingServer.Connect(); + if(ret != KErrNone) + { + User::Leave(ret); + } + // Struct to StifLogger settigs. + TLoggerSettings loggerSettings; + // Parse StifLogger defaults from STIF initialization file. + ret = settingServer.GetLoggerSettings(loggerSettings); + if(ret != KErrNone) + { + User::Leave(ret); + } + // Close Setting server session + settingServer.Close(); + + TFileName logFileName; + + if(loggerSettings.iAddTestCaseTitle) + { + TName title; + TestModuleIf().GetTestCaseTitleL(title); + logFileName.Format(KTestPluginTestLogFileWithTitle, &title); + } + else + { + logFileName.Copy(KTestPluginTestLogFile); + } + + iLog = CStifLogger::NewL( KTestPluginLogPath, + logFileName, + CStifLogger::ETxt, + CStifLogger::EFile, + EFalse ); + + //create msv session + iSession = CMsvSession::OpenSyncL(*this); + + //create mtm registry + iMtmRegistry = CClientMtmRegistry::NewL(*iSession); + + //create mms client mtm + iMmsMtm = static_cast (iMtmRegistry-> NewMtmL(KSenduiMtmMmsUid)); + + //create thumbnail manager + // iThumbnailManager = CThumbnailManager::NewL(*this); + + + TestModuleIf().SetBehavior( CTestModuleIf::ETestLeaksHandles ); + } + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::NewL +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +Ctest_pluginpreview* Ctest_pluginpreview::NewL( CTestModuleIf& aTestModuleIf ) + { + Ctest_pluginpreview* self = new ( ELeave ) Ctest_pluginpreview( aTestModuleIf ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::~Ctest_pluginpreview +// Destructor +// ----------------------------------------------------------------------------- +// +Ctest_pluginpreview::~Ctest_pluginpreview() + { + + // Delete resources allocated from test methods + Delete(); + + // Delete logger + delete iLog; + + } + +// ---------------------------------------------------------------------------- + // Ctest_pluginpreview::HandleSessionEventL + // Implemented for MMsvSessionObserver + // ---------------------------------------------------------------------------- + // +void Ctest_pluginpreview::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, + TAny */*aArg1*/, + TAny */*aArg2*/, + TAny */*aArg3*/) + { + + } + +// ========================== OTHER EXPORTED FUNCTIONS ========================= + +// ----------------------------------------------------------------------------- +// LibEntryL is a polymorphic Dll entry point. +// Returns: CScriptBase: New CScriptBase derived object +// ----------------------------------------------------------------------------- +// +EXPORT_C CScriptBase* LibEntryL( + CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework + { + return ( CScriptBase* ) Ctest_pluginpreview::NewL( aTestModuleIf ); + } + + +// End of File diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/plugins/previewplugin/tsrc/src/test_pluginpreviewblocks.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgappfw/plugins/previewplugin/tsrc/src/test_pluginpreviewblocks.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,482 @@ +/* +# +# Copyright (c) 2009 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Main test class for CS Preview Plugin +#*/ + +// [INCLUDE FILES] - do not remove +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "test_pluginpreview.h" + + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::Delete +// +// ----------------------------------------------------------------------------- +// +void Ctest_pluginpreview::Delete() + { + + + } + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::RunMethodL +// +// ----------------------------------------------------------------------------- +// +TInt Ctest_pluginpreview::RunMethodL( CStifItemParser& aItem ) + { + TStifFunctionInfo const KFunctions[] = + { + // Copy this line for every implemented function. + // First string is the function name used in TestScripter script file. + // Second is the actual implementation member function. + + ENTRY( "Example", Ctest_pluginpreview::ExampleL ), + ENTRY( "CreateCCsPreviewPluginL",Ctest_pluginpreview::CreateCCsPreviewPluginL), + ENTRY( "MmsMsgPluginValidationL", Ctest_pluginpreview::MmsMsgPluginValidationL), + ENTRY( "SendMmsMessageL", Ctest_pluginpreview::SendMmsMessageL) + + }; + + const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo ); + return RunInternalL( KFunctions, count, aItem ); + } + +// ----------------------------------------------------------------------------- +// Ctestsmsplugin::ExampleL +// Example test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Ctest_pluginpreview::ExampleL( CStifItemParser& aItem ) + { + + // Print to UI + _LIT( Ktestplugin, "testpluginpreview" ); + _LIT( KExample, "In Example" ); + TestModuleIf().Printf( 0, Ktestplugin, KExample ); + // Print to log file + iLog->Log( KExample ); + + TInt i = 0; + TPtrC string; + _LIT( KParam, "Param[%i]: %S" ); + while ( aItem.GetNextString ( string ) == KErrNone ) + { + TestModuleIf().Printf( i, Ktestplugin, + KParam, i, &string ); + i++; + } + + return KErrNone; + + } + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::CreateCCsPreviewPluginL +// Example test method function. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +TInt Ctest_pluginpreview::CreateCCsPreviewPluginL( CStifItemParser& /*aItem*/ ) + { + + // Print to UI + _LIT( Ktestplugin, "CreateCCsPreviewPlugin" ); + _LIT( KFunction, "In CreateCCsPreviewPlugin" ); + TestModuleIf().Printf( 0, Ktestplugin, KFunction ); + // Print to log file + iLog->Log( KFunction ); + iPlugin = CCsPreviewPlugin::NewL(this); + iPlugin->GetConversationsL(); + return KErrNone; + + } + + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::ThumbnailPreviewReady() +// callback +// ----------------------------------------------------------------------------- +// +void Ctest_pluginpreview::ThumbnailPreviewReady(MThumbnailData& /*aThumbnail*/, TThumbnailRequestId /*aId*/) + { + + } + + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::ThumbnailReady() +// +// ----------------------------------------------------------------------------- +// +void Ctest_pluginpreview::ThumbnailReady(TInt aError,MThumbnailData& aThumbnail, TThumbnailRequestId aId) + { + + } + + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::RestoreReady() +// +// ----------------------------------------------------------------------------- +// +void Ctest_pluginpreview::RestoreReady(TInt /*aParseResult*/, TInt /*aError*/) + { + + } + + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::HandleCachingError +// Caching error event from Plugins +// ----------------------------------------------------------------------------- +// + +void Ctest_pluginpreview::HandleCachingError(const TInt /*aError*/) + { + Signal(KErrGeneral); + } + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::HandleCachingCompleted +// Caching complete event from Plugins +// ----------------------------------------------------------------------------- +// + +void Ctest_pluginpreview::HandleCachingCompleted() + { + + + + } + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::MmsMsgPluginValidationL +// Validates the initial Caching of sms plugin +// ----------------------------------------------------------------------------- +// +TInt Ctest_pluginpreview::MmsMsgPluginValidationL( CStifItemParser& /*aItem*/ ) + { + // Print to UI + _LIT(Ktestplugin, "MmsPluginValidationL" ); + _LIT( KFunction, "In MmsPluginValidationL" ); + TestModuleIf().Printf( 0, Ktestplugin, KFunction ); + // Print to log file + iLog->Log( KFunction ); + + CleanAllFoldersL(); + CreateMmsMessageL(KMsvGlobalInBoxIndexEntryId); + CreateMmsMessageL(KMsvSentEntryId); + CreateMmsMessageL(KMsvDraftEntryId); + CreateMmsMessageL(KMsvGlobalOutBoxIndexEntryId);; + + iPlugin = CCsPreviewPlugin::NewL(this); + iPlugin->GetConversationsL(); + + return KErrNone; + + } + + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::CleanAllFoldersL +// Cleans messages from all folders +// ----------------------------------------------------------------------------- + +void Ctest_pluginpreview::CleanAllFoldersL() + { + CleanMessagesInFolderL(KMsvGlobalInBoxIndexEntryId); + CleanMessagesInFolderL(KMsvGlobalOutBoxIndexEntryId); + CleanMessagesInFolderL(KMsvDraftEntryId); + // CleanMessagesInFolderL(KMsvSentEntryId); + } + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::CreateMmsMessageL +// Creates message +// ----------------------------------------------------------------------------- +// + +void Ctest_pluginpreview::CreateMmsMessageL(const TMsvId aFolderId,TBool aUnReadFlag) + { + + // create a new object to access an existing entry + CMsvEntry* msvEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering()); + CleanupStack::PushL(msvEntry); + + TMsvId defaultServiceId = 0; + defaultServiceId = iMmsMtm->DefaultServiceL(); + + _LIT( KMMSBody, " HELLO !!!"); + + CleanupStack::Pop(msvEntry); + iMmsMtm->SetCurrentEntryL(msvEntry); + iMmsMtm->CreateMessageL(defaultServiceId); + iMmsMtm->SetSubjectL(KMMSBody); + + // set some mms defaults + iMmsMtm->SetMessageClass(EMmsClassPersonal); + iMmsMtm->SetExpiryInterval(86400); + iMmsMtm->SetDeliveryTimeInterval(3600); + iMmsMtm->SetMessagePriority(EMmsPriorityLow); + iMmsMtm->SetSenderVisibility(EMmsMaximumSenderVisibility); + iMmsMtm->SetDeliveryReport(EMmsDeliveryReportYes); + iMmsMtm->SetReadReply(EMmsReadReplyYes); + + _LIT(KPhoneNumberString,"234567"); + TBuf<15> phoneNumberString; + phoneNumberString.Copy(KPhoneNumberString); + _LIT(KPhoneNumberString1,"mine<98450>"); + _LIT(KResultPhoneNumberString,"98450"); + + if (aFolderId == KMsvGlobalInBoxIndexEntryId) + { + iMmsMtm->SetSenderL(KResultPhoneNumberString); + } + + iMmsMtm->AddAddresseeL(KResultPhoneNumberString); + + CMsvStore* store = msvEntry->EditStoreL(); + CleanupStack::PushL(store); + + // set body as an attachment + CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL(); + CleanupStack::PushL(mimeHeaders); + mimeHeaders->SetContentTypeL( _L8("image/jpg") ); + mimeHeaders->SetContentSubTypeL( _L8("image/jpg") ); + mimeHeaders->SetMimeCharset( KMmsUtf8 ); + mimeHeaders->SetSuggestedFilenameL( _L("body.jpg") ); + + MMsvAttachmentManager& attachMan = store->AttachmentManagerL(); + CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred + CleanupStack::PushL(attachmentInfo); + attachmentInfo->SetAttachmentNameL( _L("body.txt") ); + attachmentInfo->SetMimeTypeL( _L8("image/jpg") ); + mimeHeaders->StoreL( *attachmentInfo ); + + RFile textFile; + + CMsvOperationActiveSchedulerWait* waiter = CMsvOperationActiveSchedulerWait::NewLC(); + attachMan.CreateAttachmentL(_L("body.jpg"), textFile, attachmentInfo, waiter->iStatus ); + CleanupStack::Pop(); // waiter + CleanupStack::Pop(); // attachmentInfo + CleanupStack::PushL(waiter); + waiter->Start(); + CleanupStack::PopAndDestroy(waiter); + + HBufC8* tempBuf = HBufC8::NewLC( 10 ); + tempBuf->Des().Copy( KMMSBody ); + textFile.Write( tempBuf->Des() ); + textFile.Close(); + CleanupStack::PopAndDestroy(); //tempBuf + + CleanupStack::PopAndDestroy(); //mimeHeaders + + // get the entry of the message + TMsvEntry messageEntry = iMmsMtm->Entry().Entry(); + + // set the description field same as the message subject + messageEntry.iDescription.Set( KMMSBody ); + + // save the changes done above + iMmsMtm->Entry().ChangeL(messageEntry); + + TFileName attachmentFile( _L("c:\\pictures\\picture123.jpg") ); + HandleAttachementL(store,attachmentFile ); + + // save the changes made to the message store + store->CommitL(); + CleanupStack::PopAndDestroy(store); + + // save the message + iMmsMtm->SaveMessageL(); + + // final fine tuning + messageEntry.SetAttachment(ETrue); + messageEntry.iDate.HomeTime(); + messageEntry.SetVisible(ETrue); + messageEntry.SetInPreparation(EFalse); + + if( aUnReadFlag ) + { + messageEntry.SetUnread(ETrue); + messageEntry.SetNew(ETrue); + } + else + { + messageEntry.SetUnread(EFalse); + messageEntry.SetNew(EFalse); + } + messageEntry.SetComplete(ETrue); + messageEntry.iServiceId = defaultServiceId; + messageEntry.iRelatedId = 0; + + if (aFolderId == KMsvDraftEntryId) + messageEntry.SetReadOnly(EFalse); + else + messageEntry.SetReadOnly(ETrue); + + messageEntry.iMtmData1 = KMmsMessageMRetrieveConf | KMmsMessageMobileTerminated; + + iMmsMtm->Entry().ChangeL(messageEntry); + + } + + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::CreateMmsMessageL +// Creates message +// ----------------------------------------------------------------------------- +// + +void Ctest_pluginpreview:: HandleAttachementL(CMsvStore* store,TFileName& sourceFileName ) + { + + // attachment settings + MMsvAttachmentManager& attachMan = store->AttachmentManagerL(); + CMsvAttachment* attachmentInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); // ownership of attachmentInfo will be transferred + CleanupStack::PushL(attachmentInfo); + attachmentInfo->SetAttachmentNameL( sourceFileName); + attachmentInfo->SetMimeTypeL(_L8("image/jpg") ); + + CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL(); + CleanupStack::PushL(mimeHeaders); + mimeHeaders->SetContentTypeL( _L8("image/jpg") ); + mimeHeaders->SetContentSubTypeL( _L8("image/jpg") ); + mimeHeaders->SetMimeCharset( KMmsUtf8 ); + mimeHeaders->StoreL( *attachmentInfo ); + CleanupStack::PopAndDestroy( mimeHeaders ); + + CMsvOperationActiveSchedulerWait* waiter = CMsvOperationActiveSchedulerWait::NewLC(); + TInt err; + TRAP(err, attachMan.AddAttachmentL(sourceFileName, attachmentInfo, waiter->iStatus )); + if (err == KErrNone) + { + waiter->Start(); + CleanupStack::PopAndDestroy(waiter); + CleanupStack::Pop(); // attachmentInfo, the ownership is transferred + } + else + { + CleanupStack::PopAndDestroy(waiter); + CleanupStack::PopAndDestroy(); // attachmentInfo, ownership is not transferred (leave occurs) + _LIT( Ktestplugin, "HandleAttachment" ); + _LIT( KFunction, "In HandleAttachment::Failed" ); + } + + } + +// ----------------------------------------------------------------------------- +// Ctestsmsplugin::SendMmsMessageL +// Send ccs message using RSendAs api +// ----------------------------------------------------------------------------- +// + +TInt Ctest_pluginpreview::SendMmsMessageL( CStifItemParser& /*aItem*/ ) + { + // Print to UI + _LIT( Ktestplugin, "SendCcsMessageL" ); + _LIT( KFunction, "In SendCcsMessageL" ); + TestModuleIf().Printf( 0, Ktestplugin, KFunction ); + // Print to log file + iLog->Log( KFunction ); + + RSendAs sendas; + CleanupClosePushL(sendas); + TInt res = sendas.Connect(); + User::LeaveIfError(res); + + RSendAsMessage message; + CleanupClosePushL(message); + TRAP(res, message.CreateL(sendas,KUidMsgTypeMultimedia)); + User::LeaveIfError(res); + + // TBuf<512> MsgText; + //MsgText.Copy(_L("Message being sent")); + //message.SetBodyTextL(MsgText); + TBuf<15> RecAdd; + RecAdd.Copy(_L("123456789")); + message.AddRecipientL(RecAdd,RSendAsMessage::ESendAsRecipientTo ); + + message.SendMessageAndCloseL(); + CleanupStack::Pop(1); // RMessage + CleanupStack::PopAndDestroy(1); // RSendAs + + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// Ctest_pluginpreview::CleanMessagesInFolderL +// Cleans messages from the specified folder +// ----------------------------------------------------------------------------- + +void Ctest_pluginpreview::CleanMessagesInFolderL(TMsvId aBoxId,TBool aDeleteOne) + { + + iLog->Log(_L("In CleanMessagesInFolderL")); + TInt count; + CMsvEntry* cEntry = NULL; + // delete messages from the specified box + cEntry = iSession->GetEntryL(KMsvRootIndexEntryId); + CleanupStack::PushL(cEntry); + cEntry->SetEntryL(aBoxId); + // show invisible entries + cEntry->SetSortTypeL( TMsvSelectionOrdering( KMsvNoGrouping, EMsvSortByNone, ETrue ) ); + CMsvEntrySelection* msvEntrySelection = cEntry->ChildrenWithMtmL(KUidMsgTypeSMS); + CleanupStack::PushL(msvEntrySelection); + + if( aDeleteOne ) + { + count =1; + } + else + { + count = msvEntrySelection->Count(); + } + + for ( int i = 0; i < count ; i++ ) + { + CMsvEntry* entry = iSession->GetEntryL( msvEntrySelection->At(i) ); + CleanupStack::PushL( entry ); + TMsvEntry tEntry = entry->Entry(); + tEntry.SetReadOnly(EFalse); + entry->ChangeL(tEntry); + cEntry->DeleteL( msvEntrySelection->At(i) ); + CleanupStack::PopAndDestroy( entry ); + } + + CleanupStack::PopAndDestroy(msvEntrySelection); + CleanupStack::PopAndDestroy(cEntry); + iLog->Log(_L("End of CleanMessagesInFolderL")); + + } + + + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/server/inc/ccsconversation.h --- a/messagingapp/msgappfw/server/inc/ccsconversation.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/server/inc/ccsconversation.h Wed Jun 23 18:09:17 2010 +0300 @@ -139,7 +139,7 @@ */ void AddContactDetailsL( TInt32 aContactId, - const TDesC& aDisplayName); + const HBufC* aDisplayName); /** * AddContactDetailsL diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/server/server.pro --- a/messagingapp/msgappfw/server/server.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/server/server.pro Wed Jun 23 18:09:17 2010 +0300 @@ -23,7 +23,6 @@ INCLUDEPATH += ./inc \ ./../utils/inc \ - ./../../msgutils/s60qconversions/inc \ ./../../../mmsengine/inc INCLUDEPATH += /ext/mw/qtextensions/qtmobileextensions/include @@ -88,6 +87,6 @@ -lcentralrepository \ -limcm \ -lQtContacts \ - -ls60qconversions + -lxqutils \ No newline at end of file diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/server/src/ccsconversation.cpp --- a/messagingapp/msgappfw/server/src/ccsconversation.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/server/src/ccsconversation.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -253,9 +253,12 @@ void CCsConversation::AddContactDetailsL( TInt32 aContactId, - const TDesC& aDisplayName) + const HBufC* aDisplayName) { - iContact->SetDisplayNameL(aDisplayName); + if(aDisplayName) + { + iContact->SetDisplayNameL(*aDisplayName); + } iContact->SetContactId (aContactId); } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/server/src/ccsconversationcache.cpp --- a/messagingapp/msgappfw/server/src/ccsconversationcache.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/server/src/ccsconversationcache.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -25,7 +25,7 @@ #include #include // KCRUidTelephonyConfiguration #include - +#include // USER INCLUDE FILES #include "ccsconversationcache.h" #include "ccsconversationcachehelper.h" @@ -35,7 +35,6 @@ #include "ccscontactsresolver.h" #include "ccsconversationevent.h" #include "ccsserver.h" -#include "s60qconversions.h" #include "ccsdebug.h" // ============================== MEMBER FUNCTIONS ============================ @@ -513,7 +512,7 @@ { QString phoneNumber = phoneNumberList.at(i); HBufC* phoneNumber_s60 = - S60QConversions::qStringToS60Desc(phoneNumber); + XQConversions::qStringToS60Desc(phoneNumber); TInt cIndex = FindConversation(*phoneNumber_s60); if (cIndex != KErrNotFound) { @@ -553,7 +552,7 @@ { QString phoneNumber = phoneNumberList.at(i); HBufC* phoneNumber_s60 = - S60QConversions::qStringToS60Desc(phoneNumber); + XQConversions::qStringToS60Desc(phoneNumber); TInt cIndex = FindConversation(*phoneNumber_s60); if ( cIndex != KErrNotFound ) diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/server/src/ccsconversationcachehelper.cpp --- a/messagingapp/msgappfw/server/src/ccsconversationcachehelper.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/server/src/ccsconversationcachehelper.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -29,7 +29,7 @@ #include "ccsconversationevent.h" #include "ccscontactsmanager.h" #include "ccscontactsresolver.h" -#include "s60qconversions.h" +#include #include "ccsdebug.h" // ============================== MEMBER FUNCTIONS ============================ @@ -331,7 +331,7 @@ if (Contact) { QString contactAddress = - S60QConversions::s60DescToQString(Contact->Des()); + XQConversions::s60DescToQString(Contact->Des()); iConversationCache->ContactsManager()->resolver()->resolveContact(contactAddress, contactDetail); @@ -345,7 +345,7 @@ HBufC* displayName = NULL; if(!contactDetail.displayName.isEmpty()) { - displayName=S60QConversions::qStringToS60Desc(contactDetail.displayName); + displayName=XQConversions::qStringToS60Desc(contactDetail.displayName); } TRAPD(error, AddNewConversationL( aConverastionEvent-> ClientConversation()->GetConversationEntry(), @@ -569,8 +569,9 @@ conversation->AddEntryL(aConversationEntry); // fill firstname and lastname and contact Id - conversation->AddContactDetailsL(aContactId, - *aDisplayName); + if(aDisplayName) + conversation->AddContactDetailsL(aContactId, + aDisplayName); // fill the phone number if (aConversationEntry->Contact()) diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/server/src/ccsconversationcontact.cpp --- a/messagingapp/msgappfw/server/src/ccsconversationcontact.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/server/src/ccsconversationcontact.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -100,8 +100,6 @@ CCsConversationContact::SetDisplayNameL( const TDesC& aDisplayName) { - if( &aDisplayName ) - { TRAPD(error, iDisplayName = aDisplayName.AllocL()); if(error != KErrNone) { @@ -110,7 +108,7 @@ PRINT1 ( _L("CCsConversationContact::SetFirstNameL - Error:%d"), error ); } - } + } // ---------------------------------------------------------------------------- diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/server/src/ccssession.cpp --- a/messagingapp/msgappfw/server/src/ccssession.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/server/src/ccssession.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -1043,53 +1043,58 @@ if (!iConversationChangeObserver) return; - if ((aClientConversation->GetContactId() - != iMonitoredConversation->GetContactId()) && - (aClientConversation->GetConversationEntryId() - != iMonitoredConversation->GetConversationEntryId()) - ) - return; - - if (! (iNotifyHandling)) + //this is check to send notif to clients for a new message + //1. if the client is subscribed with contact id ==> then send + //2. if the client is subscribed with conv id ---> then send + // else dont send + + if ((aClientConversation->GetContactId() == + iMonitoredConversation->GetContactId() && + aClientConversation->GetContactId() != -1) + ||(aClientConversation->GetConversationEntryId() == + iMonitoredConversation->GetConversationEntryId())) { - //append in notify list - CCsConversationEvent* conversationEvent = CCsConversationEvent::NewL(); - CleanupStack::PushL(conversationEvent); - conversationEvent->SetClientConversationL(*aClientConversation); - conversationEvent->SetEvent(KConversationEventNew); - iEventList->AppendL(conversationEvent); - CleanupStack::Pop(conversationEvent); - } - else - { - // create a new buffer for writing into stream - CBufFlat* buf = CBufFlat::NewL(KBigBuffer); - CleanupStack::PushL(buf); - RBufWriteStream writeStream(*buf); - writeStream.PushL(); - - //externalize ClientConversation - aClientConversation->ExternalizeL(writeStream); - - // Results are already packed in the stream - writeStream.CommitL(); - // -------------------------------------------------------------- - - // Create a heap descriptor from the buffer - HBufC8* des = HBufC8::NewLC(buf->Size()); - CleanupStack::Pop(des); - TPtr8 ptr(des->Des()); - buf->Read(0, ptr, buf->Size()); - - CleanupStack::PopAndDestroy(2, buf); // writestream, buf - - iAsyncReqRMessage.Write(1, *des); - iAsyncReqRMessage.Complete(EAddConversationEvent); - delete des; - iNotifyHandling = EFalse; + if (! (iNotifyHandling)) + { + //append in notify list + CCsConversationEvent* conversationEvent = CCsConversationEvent::NewL(); + CleanupStack::PushL(conversationEvent); + conversationEvent->SetClientConversationL(*aClientConversation); + conversationEvent->SetEvent(KConversationEventNew); + iEventList->AppendL(conversationEvent); + CleanupStack::Pop(conversationEvent); + } + else + { + // create a new buffer for writing into stream + CBufFlat* buf = CBufFlat::NewL(KBigBuffer); + CleanupStack::PushL(buf); + + RBufWriteStream writeStream(*buf); + writeStream.PushL(); + + //externalize ClientConversation + aClientConversation->ExternalizeL(writeStream); + + // Results are already packed in the stream + writeStream.CommitL(); + // -------------------------------------------------------------- + + // Create a heap descriptor from the buffer + HBufC8* des = HBufC8::NewLC(buf->Size()); + CleanupStack::Pop(des); + TPtr8 ptr(des->Des()); + buf->Read(0, ptr, buf->Size()); + + CleanupStack::PopAndDestroy(2, buf); // writestream, buf + + iAsyncReqRMessage.Write(1, *des); + iAsyncReqRMessage.Complete(EAddConversationEvent); + delete des; + iNotifyHandling = EFalse; + } } - PRINT ( _L("End CCsSession::HandleNewConversationEventL") ); } @@ -1169,53 +1174,58 @@ if (!iConversationChangeObserver) return; - if ((aClientConversation->GetContactId() - != iMonitoredConversation->GetContactId()) && - (aClientConversation->GetConversationEntryId() - != iMonitoredConversation->GetConversationEntryId()) - ) - return; - - if (! (iNotifyHandling)) - { - //append in notify list - CCsConversationEvent* conversationEvent = CCsConversationEvent::NewL(); - CleanupStack::PushL(conversationEvent); - conversationEvent->SetClientConversationL(*aClientConversation); - conversationEvent->SetEvent(KConversationEventUpdate); - iEventList->AppendL(conversationEvent); - CleanupStack::Pop(conversationEvent); - } - else + //this is check to send notif to clients for a new message + //1. if the client is subscribed with contact id ==> then send + //2. if the client is subscribed with conv id ---> then send + // else dont send + + if ((aClientConversation->GetContactId() == + iMonitoredConversation->GetContactId() && + aClientConversation->GetContactId() != -1) + ||(aClientConversation->GetConversationEntryId() == + iMonitoredConversation->GetConversationEntryId())) { - // create a new buffer for writing into stream - CBufFlat* buf = CBufFlat::NewL(KBigBuffer); - CleanupStack::PushL(buf); - - RBufWriteStream writeStream(*buf); - writeStream.PushL(); - - //externalize ClientConversation - aClientConversation->ExternalizeL(writeStream); - - // Results are already packed in the stream - writeStream.CommitL(); - // -------------------------------------------------------------- - - // Create a heap descriptor from the buffer - HBufC8* des = HBufC8::NewLC(buf->Size()); - CleanupStack::Pop(des); - TPtr8 ptr(des->Des()); - buf->Read(0, ptr, buf->Size()); - - CleanupStack::PopAndDestroy(2, buf); // writestream, buf - - iAsyncReqRMessage.Write(1, *des); - iAsyncReqRMessage.Complete(EModifyConversationEvent); - delete des; - iNotifyHandling = EFalse; + + if (! (iNotifyHandling)) + { + //append in notify list + CCsConversationEvent* conversationEvent = CCsConversationEvent::NewL(); + CleanupStack::PushL(conversationEvent); + conversationEvent->SetClientConversationL(*aClientConversation); + conversationEvent->SetEvent(KConversationEventUpdate); + iEventList->AppendL(conversationEvent); + CleanupStack::Pop(conversationEvent); + } + else + { + // create a new buffer for writing into stream + CBufFlat* buf = CBufFlat::NewL(KBigBuffer); + CleanupStack::PushL(buf); + + RBufWriteStream writeStream(*buf); + writeStream.PushL(); + + //externalize ClientConversation + aClientConversation->ExternalizeL(writeStream); + + // Results are already packed in the stream + writeStream.CommitL(); + // -------------------------------------------------------------- + + // Create a heap descriptor from the buffer + HBufC8* des = HBufC8::NewLC(buf->Size()); + CleanupStack::Pop(des); + TPtr8 ptr(des->Des()); + buf->Read(0, ptr, buf->Size()); + + CleanupStack::PopAndDestroy(2, buf); // writestream, buf + + iAsyncReqRMessage.Write(1, *des); + iAsyncReqRMessage.Complete(EModifyConversationEvent); + delete des; + iNotifyHandling = EFalse; + } } - PRINT ( _L("End CCsSession::HandleModifyConversationEventL") ); } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgappfw/utils/src/ccsconversationentry.cpp --- a/messagingapp/msgappfw/utils/src/ccsconversationentry.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgappfw/utils/src/ccsconversationentry.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -208,17 +208,15 @@ // Sets the Conversation description of this object // ---------------------------------------------------------------------------- EXPORT_C void CCsConversationEntry::SetDescriptionL(const TDesC& aDescription) - { - if((&aDescription)) - { - TInt descrLength = aDescription.Length(); - if ( descrLength > KMaxDescrSize ) - descrLength = KMaxDescrSize; - - iDescription = HBufC::NewL(descrLength); - iDescription->Des().Copy(aDescription.Left(descrLength)); - } - } +{ + + TInt descrLength = aDescription.Length(); + if (descrLength > KMaxDescrSize) + descrLength = KMaxDescrSize; + iDescription = HBufC::NewL(descrLength); + iDescription->Des().Copy(aDescription.Left(descrLength)); + +} // ---------------------------------------------------------------------------- // CCsConversationEntry::ChangeAttributes @@ -260,7 +258,8 @@ cloneObject->SetEntryId(iEntryID); cloneObject->SetSendState(iConversationStatus); cloneObject->ChangeAttributes(iConversationAttrib, ECsAttributeNone); - cloneObject->SetDescriptionL(*iDescription); + if(iDescription) + cloneObject->SetDescriptionL(*iDescription); cloneObject->SetTimeStampL(iTimeStamp); CleanupStack::Pop(cloneObject); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgerrornotifier/inc/msgerrornotifiersvc.h --- a/messagingapp/msgnotifications/msgerrornotifier/inc/msgerrornotifiersvc.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgerrornotifier/inc/msgerrornotifiersvc.h Wed Jun 23 18:09:17 2010 +0300 @@ -21,6 +21,9 @@ #include #include +//Forward Declaration +class XQSystemToneService; + class MsgErrorNotifierSvc: public XQServiceProvider { @@ -46,6 +49,12 @@ */ void displayErrorNote(QVariantList displayParams); +private: + + /** + * Object to handle audio alerts + */ + XQSystemToneService* mSts; }; #endif /* MSGERRORNOTIFIERSVC_H_ */ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgerrornotifier/msgerrornotifier.pro --- a/messagingapp/msgnotifications/msgerrornotifier/msgerrornotifier.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgerrornotifier/msgerrornotifier.pro Wed Jun 23 18:09:17 2010 +0300 @@ -25,7 +25,8 @@ src/msgerrornotifiersvc.cpp LIBS += -lxqservice \ - -lxqserviceutil + -lxqserviceutil \ + -lxqsystemtoneservice SERVICE.FILE = service_conf.xml SERVICE.OPTIONS = embeddable diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp --- a/messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -26,6 +26,7 @@ #include #include #include +#include #define LOC_VIEW hbTrId("txt_messaging_button_view") #define LOC_CANCEL hbTrId("txt_common_button_cancel") @@ -37,6 +38,7 @@ MsgErrorNotifierSvc::MsgErrorNotifierSvc(QObject* parent) : XQServiceProvider(QLatin1String("messaging.com.nokia.symbian.MsgErrorNotifier"), parent) { + mSts = new XQSystemToneService(); publishAll(); } @@ -45,7 +47,11 @@ //--------------------------------------------------------- MsgErrorNotifierSvc::~MsgErrorNotifierSvc() { - + if(mSts) + { + delete mSts; + mSts = NULL; + } } //--------------------------------------------------------- @@ -88,7 +94,10 @@ messageBox.setAction(actionView,HbDeviceMessageBox::RejectButtonRole); setCurrentRequestAsync(); - + + //Play audio alert when error notification is shown + mSts->playTone(XQSystemToneService::MessageSendFailureTone); + const QAction* result = messageBox.exec(); // TODO: use XQAiwrequest diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgindicatorplugin/msgindicatorplugin.pro --- a/messagingapp/msgnotifications/msgindicatorplugin/msgindicatorplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgindicatorplugin/msgindicatorplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -24,7 +24,7 @@ DEPENDPATH += . INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE INCLUDEPATH += ../../../inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc + HEADERS += inc/msgindicatorplugin.h \ @@ -53,5 +53,5 @@ LIBS += -lxqservice \ -lcsserverclientapi \ - -ls60qconversions \ - -lcsutils + -lcsutils \ + -lxqutils diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator.cpp --- a/messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -42,6 +42,7 @@ #define LOC_OUTGOING_SINGLE_MESSAGE hbTrId("Outgoing Message") #define LOC_OUTGOING_MULTIPLE_MESSAGES hbTrId("Outgoing Messages") #define STATUS_MONO_NEW_MESSAGE QString("qtg_status_new_message") +#define LOC_BUSINESSCARD hbTrId("Business card") /** * The number of indicators. */ @@ -319,6 +320,9 @@ QFileInfo fname(secondaryText); secondaryText = fname.fileName(); } + else if(ECsBioMsg_VCard == info.mMessageType) { + secondaryText = LOC_BUSINESSCARD; + } } else { info.mConversationId = -100; diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator_p.cpp --- a/messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -22,7 +22,7 @@ #include "msgindicator_p.h" #include "msgindicator.h" #include "debugtraces.h" -#include "s60qconversions.h" +#include #define LOC_RECEIVED_FILES hbTrId("Received Files") @@ -98,7 +98,7 @@ // Only take the description from convEntry when there is one entry. // description will contain the name list when there are more entries. QString descText; - descText = S60QConversions::s60DescToQString(*description); + descText = XQConversions::s60DescToQString(*description); descText.replace(QChar::ParagraphSeparator, QChar::LineSeparator); descText.replace('\r', QChar::LineSeparator); indicatorData.mDescription = descText; @@ -116,10 +116,10 @@ HBufC* number = convEntry->Contact(); if (displayName) { - nameList.append(S60QConversions::s60DescToQString(*displayName)); + nameList.append(XQConversions::s60DescToQString(*displayName)); } else if (number) { - nameList.append(S60QConversions::s60DescToQString(*number)); + nameList.append(XQConversions::s60DescToQString(*number)); } } } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgnotifier/inc/msgnotifier_p.h --- a/messagingapp/msgnotifications/msgnotifier/inc/msgnotifier_p.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgnotifier/inc/msgnotifier_p.h Wed Jun 23 18:09:17 2010 +0300 @@ -27,6 +27,7 @@ class MsgStoreHandler; class XQSettingsManager; class XQPublishAndSubscribeUtils; +class XQSystemToneService; /** * @class MsgNotifierPrivate @@ -162,6 +163,11 @@ * Owned. */ XQPublishAndSubscribeUtils* mPSUtils; + + /** + * Object to handle audio alert when new message is received + */ + XQSystemToneService* mSts; }; #endif // MSGNOTIFIER_PRIVATE_H diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgnotifier/msgnotifier.pro --- a/messagingapp/msgnotifications/msgnotifier/msgnotifier.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgnotifier/msgnotifier.pro Wed Jun 23 18:09:17 2010 +0300 @@ -21,7 +21,6 @@ DEPENDPATH += . src HEADERS += $$PUBLIC_HEADERS INCLUDEPATH += . inc ../../../inc -INCLUDEPATH +=../../msgutils/s60qconversions/inc INCLUDEPATH += ../../msgsettings/msginit/inc INCLUDEPATH += ../inc INCLUDEPATH += $$APP_LAYER_INCLUDEPATH @@ -54,13 +53,11 @@ inc/msgstorehandler.h LIBS += -lcsserverclientapi \ - -ls60qconversions \ -lcsutils \ -lmsginit \ -lmsgs \ -letext \ -lsmcm \ - -ls60qconversions \ -lmmsmessage \ -lmmsserversettings \ -lmmscli \ @@ -69,5 +66,9 @@ -lQtVersit \ -lunidatamodelloader \ -lxqsettingsmanager \ - -apgrfx.lib + -apgrfx.lib \ + -lxqutils \ + -lws32 \ + -lapgrfx \ + -lxqsystemtoneservice diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp --- a/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -27,11 +27,12 @@ #include #include #include +#include //USER INCLUDES #include "msgnotifier.h" #include "msgnotifier_p.h" -#include "s60qconversions.h" +#include #include "msgstorehandler.h" #include "msginfodefs.h" #include "conversationidpsconsts.h" @@ -80,6 +81,12 @@ delete mSettingsManager; } + if(mSts) + { + delete mSts; + mSts = NULL; + } + QDEBUG_WRITE("MsgNotifierPrivate::~MsgNotifierPrivate : Exit") } @@ -115,6 +122,8 @@ QDEBUG_WRITE_FORMAT("MsgNotifierPrivate::initL " "writing ret value",success) + mSts = new XQSystemToneService(); + QDEBUG_WRITE("MsgNotifierPrivate::initL : Exit") } @@ -205,17 +214,20 @@ if(displayName) { notifData.mDisplayName = - S60QConversions::s60DescToQString(*displayName); + XQConversions::s60DescToQString(*displayName); } if(number) { - notifData.mContactNum = S60QConversions::s60DescToQString(*number); + notifData.mContactNum = XQConversions::s60DescToQString(*number); } if(descrp) { - notifData.mDescription = S60QConversions::s60DescToQString(*descrp); + notifData.mDescription = XQConversions::s60DescToQString(*descrp); } + //Play new message alert tone. + mSts->playTone(XQSystemToneService::SmsAlertTone); + // check whether opened cv id and received // cv id are same and show notification if( showNotification(notifData.mConversationId )) diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgnotifications/msgnotifier/src/msgstorehandler.cpp --- a/messagingapp/msgnotifications/msgnotifier/src/msgstorehandler.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgnotifications/msgnotifier/src/msgstorehandler.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -16,7 +16,7 @@ */ #include "msgstorehandler.h" -#include "s60qconversions.h" +#include #include "msgnotifier_p.h" #include #include @@ -273,12 +273,12 @@ HBufC* displayName = conversation->GetDisplayName(); if (displayName) { - indicatorData.mDisplayName.append(S60QConversions::s60DescToQString(*displayName)); + indicatorData.mDisplayName.append(XQConversions::s60DescToQString(*displayName)); } else { HBufC* number = convEntry->Contact(); if (number) - indicatorData.mDisplayName.append(S60QConversions::s60DescToQString(*number)); + indicatorData.mDisplayName.append(XQConversions::s60DescToQString(*number)); } delete conversation; } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgservices/msgserviceapp/msgserviceapp.pro --- a/messagingapp/msgservices/msgserviceapp/msgserviceapp.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgservices/msgserviceapp/msgserviceapp.pro Wed Jun 23 18:09:17 2010 +0300 @@ -21,7 +21,6 @@ INCLUDEPATH += inc INCLUDEPATH += ../../../inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc INCLUDEPATH += ../../smartmessaging/ringbc/inc INCLUDEPATH += ../../msgutils/unidatamodelloader/inc INCLUDEPATH += ../../msgui/inc @@ -55,7 +54,6 @@ LIBS += -lxqservice \ -lxqserviceutil \ - -ls60qconversions \ -lconvergedmessageutils \ -lmsgs \ -lringbc \ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgsettings/msginit/msginit.pro --- a/messagingapp/msgsettings/msginit/msginit.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgsettings/msginit/msginit.pro Wed Jun 23 18:09:17 2010 +0300 @@ -48,6 +48,15 @@ } +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/msginit.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/msginit.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + HEADERS += inc/startupmonitor.h \ inc/simscnumberdetector.h \ inc/msgsimnumberdetector.h diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgsettings/settingsview/settingsview.pro --- a/messagingapp/msgsettings/settingsview/settingsview.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgsettings/settingsview/settingsview.pro Wed Jun 23 18:09:17 2010 +0300 @@ -10,7 +10,6 @@ INCLUDEPATH += . INCLUDEPATH += ../../../inc INCLUDEPATH += ../../msgui/inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE CONFIG += hb @@ -51,10 +50,19 @@ TARGET.CAPABILITY = All -TCB +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/settingsview.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/settingsview.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + LIBS += -lSmcm \ -lmsgs \ - -ls60qconversions \ -lcommdb \ -lmmsserversettings \ - -lmmsgenericsettings + -lmmsgenericsettings \ + -lxqutils \ No newline at end of file diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgsettings/settingsview/src/msgsettingengine.cpp --- a/messagingapp/msgsettings/settingsview/src/msgsettingengine.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgsettings/settingsview/src/msgsettingengine.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -22,7 +22,7 @@ #include "msgsettingengine.h" #include "smssettingsprivate.h" #include "mmssettingprivate.h" -#include "s60qconversions.h" +#include //Constructor MsgSettingEngine::MsgSettingEngine() @@ -237,7 +237,7 @@ for (int i = 0; i < accessPoints.Count(); i++) { HBufC* name = static_cast (accessPoints[i]); - QString qName = S60QConversions::s60DescToQString(name->Des()); + QString qName = XQConversions::s60DescToQString(name->Des()); nameList.append(qName); #ifdef _DEBUG_TRACES_ qDebug() << "\n " << qName; @@ -292,7 +292,7 @@ for (int i = 0; i < accessPoints.Count(); i++) { HBufC* name = accessPoints[i]; - QString qName = S60QConversions::s60DescToQString(name->Des()); + QString qName = XQConversions::s60DescToQString(name->Des()); nameList.append(qName); #ifdef _DEBUG_TRACES_ qDebug() << "\n qName"; @@ -341,8 +341,8 @@ << centreName << " " << centreNumber; #endif - HBufC* d_addr = S60QConversions::qStringToS60Desc(centreNumber); - HBufC* d_name = S60QConversions::qStringToS60Desc(centreName); + HBufC* d_addr = XQConversions::qStringToS60Desc(centreNumber); + HBufC* d_name = XQConversions::qStringToS60Desc(centreName); dptr_smsSettings->editSMSServiceCentre(d_addr, d_name, index); delete d_addr; @@ -368,8 +368,8 @@ #endif - HBufC* d_addr = S60QConversions::qStringToS60Desc(centreNumber); - HBufC* d_name = S60QConversions::qStringToS60Desc(centreName); + HBufC* d_addr = XQConversions::qStringToS60Desc(centreNumber); + HBufC* d_name = XQConversions::qStringToS60Desc(centreName); dptr_smsSettings->addSmsMessageCenter(d_addr, d_name); delete d_addr; @@ -409,8 +409,8 @@ dptr_smsSettings->smsCenterNameAndNumber(index, &d_addr, &d_name); - centreNumber = S60QConversions::s60DescToQString(d_addr->Des()); - centreName = S60QConversions::s60DescToQString(d_name->Des()); + centreNumber = XQConversions::s60DescToQString(d_addr->Des()); + centreName = XQConversions::s60DescToQString(d_name->Des()); #ifdef _DEBUG_TRACES_ qDebug() << "Exit smsCenterNameAndNumber " << centreNumber << " " diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/appengine.pro --- a/messagingapp/msgui/appengine/appengine.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/appengine.pro Wed Jun 23 18:09:17 2010 +0300 @@ -20,8 +20,8 @@ DEPENDPATH += . src INCLUDEPATH += ../../../inc +INCLUDEPATH += ../msguiutils/inc INCLUDEPATH += ../../msgutils/unieditorutils/editorgenutils/inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc INCLUDEPATH += ../../smartmessaging/ringbc/inc INCLUDEPATH += /ext/mw/qtextensions/qtmobileextensions/include INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE @@ -46,6 +46,15 @@ "$${LITERAL_HASH}include " \ "rom/appengine.iby CORE_APP_LAYER_IBY_EXPORT_PATH(appengine.iby)" +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/appengine.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/appengine.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + # Input HEADERS += inc/conversationsengine.h \ inc/conversationmsgstorehandler.h \ @@ -69,7 +78,6 @@ LIBS += -lcsserverclientapi \ -lcsutils \ - -ls60qconversions \ -lconvergedmessageutils \ -lmsgs \ -lInetProtUtil \ @@ -89,6 +97,7 @@ -lestor \ -lFeatMgr \ -lfbscli \ - -lringbc + -lringbc \ + -lmsguiutils diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/inc/conversationsmodel.h --- a/messagingapp/msgui/appengine/inc/conversationsmodel.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/inc/conversationsmodel.h Wed Jun 23 18:09:17 2010 +0300 @@ -161,6 +161,13 @@ * @param filePath, filepath to be used if icon is not in cache */ HbIcon* getPreviewIconItem(int msgId, QString& filepath) const; + + /** + * Check if a MMS is forwardable or not + * @param messageId, message id + * @return true/false + */ + bool validateMsgForForward(qint32 messageId); private: diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/src/conversationsengine.cpp --- a/messagingapp/msgui/appengine/src/conversationsengine.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/src/conversationsengine.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -24,7 +24,7 @@ #include "draftsmodel.h" #include "conversationsengine_p.h" #include "debugtraces.h" -#include "s60qconversions.h" +#include //--------------------------------------------------------------- // ConversationsEngine::instance @@ -224,7 +224,7 @@ qint64 conversationId = -1; int error; - HBufC* number = S60QConversions::qStringToS60Desc(address); + HBufC* number = XQConversions::qStringToS60Desc(address); TRAP(error,conversationId = d_ptr->getConversationIdFromAddressL(*number)); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/src/conversationsmodel.cpp --- a/messagingapp/msgui/appengine/src/conversationsmodel.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/src/conversationsmodel.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -19,13 +19,15 @@ #include "conversationsenginedefines.h" #include "conversationmsgstorehandler.h" #include "convergedmessage.h" -#include "s60qconversions.h" +#include #include "conversationsengineutility.h" #include "unidatamodelloader.h" #include "unidatamodelplugininterface.h" #include "ringbc.h" #include "msgcontacthandler.h" +#include "mmsconformancecheck.h" #include +#include #include "debugtraces.h" @@ -78,10 +80,10 @@ { //Close SQL-DB iSqlDb.Close(); - + //clear preview-cache previewIconCache.clear(); - + if (iDataModelPluginLoader) { delete iDataModelPluginLoader; iDataModelPluginLoader = NULL; @@ -201,7 +203,7 @@ } case DisplayName: // Fall through start value = item->data(DisplayName); - break; + break; case Avatar: // Fall througn end value = item->data(Avatar); break; @@ -295,10 +297,10 @@ HBufC* description = entry.Description(); QString subject(""); if (description && description->Length()) { - subject = (S60QConversions::s60DescToQString(*description)); + subject = (XQConversions::s60DescToQString(*description)); } - // time stamp + // time stamp TTime unixEpoch(KUnixEpoch); TTimeIntervalSeconds seconds; TTime timeStamp(entry.TimeStamp()); @@ -308,7 +310,7 @@ //contact details HBufC* contact = entry.Contact(); if (contact && contact->Length()) { - item.setData(S60QConversions::s60DescToQString(*contact), ConversationAddress); + item.setData(XQConversions::s60DescToQString(*contact), ConversationAddress); } // message type. @@ -345,7 +347,7 @@ item.setData(ConvergedMessage::Outbox, MessageLocation); } - //message specific handling + //message specific handling if (msgType == ConvergedMessage::Mms) { QCRITICAL_WRITE("ConversationsModel::populateItem MMS start.") handleMMS(item, entry); @@ -370,6 +372,22 @@ } //--------------------------------------------------------------- +// ConversationsModel::validateMsgForForward +// @see header file +//--------------------------------------------------------------- +bool ConversationsModel::validateMsgForForward(qint32 messageId) +{ + bool retValue = true; + //Validate if the mms msg can be forwarded or not + MmsConformanceCheck* mmsConformanceCheck = new MmsConformanceCheck; + retValue = mmsConformanceCheck->validateMsgForForward(messageId); + + delete mmsConformanceCheck; + return retValue; +} + + +//--------------------------------------------------------------- // ConversationsModel::handleMMS // @see header //--------------------------------------------------------------- @@ -418,7 +436,7 @@ subjectIndex)); sqlSelectStmt.ColumnText(subjectIndex, subjectBuffer); - item.setData(S60QConversions::s60DescToQString( + item.setData(XQConversions::s60DescToQString( subjectBuffer), Subject); subjectBuffer.Close(); @@ -427,7 +445,7 @@ sqlSelectStmt.ColumnText(bodyIndex, bodyBuffer); item.setData( - S60QConversions::s60DescToQString(bodyBuffer), + XQConversions::s60DescToQString(bodyBuffer), BodyText); bodyBuffer.Close(); @@ -438,7 +456,7 @@ previewPathBuffer); //Rightnow set inside attachments - QString attachmentPath(S60QConversions::s60DescToQString( + QString attachmentPath(XQConversions::s60DescToQString( previewPathBuffer)); item.setData(attachmentPath, Attachments); @@ -502,6 +520,11 @@ msgProperty |= EPreviewAttachment; } + if(validateMsgForForward(entry.EntryId())) + { + msgProperty |= EPreviewForward; + } + //subject item.setData(iMmsDataPlugin->subject(), Subject); @@ -534,12 +557,28 @@ { isImageSet = true; msgProperty |= EPreviewImage; + if (objectList[index]->isProtected()) + { + msgProperty |= EPreviewProtectedImage; + } + if (objectList[index]->isCorrupted()) + { + msgProperty |= EPreviewCorruptedImage; + } imagePath = objectList[index]->path(); } if (!isAudioSet && objectList[index]->mimetype().contains( "audio")) { msgProperty |= EPreviewAudio; + if (objectList[index]->isProtected()) + { + msgProperty |= EPreviewProtectedAudio; + } + if (objectList[index]->isCorrupted()) + { + msgProperty |= EPreviewCorruptedAudio; + } isAudioSet = true; } if (!isVideoSet && objectList[index]->mimetype().contains( @@ -547,6 +586,14 @@ { isVideoSet = true; msgProperty |= EPreviewVideo; + if (objectList[index]->isProtected()) + { + msgProperty |= EPreviewProtectedVideo; + } + if (objectList[index]->isCorrupted()) + { + msgProperty |= EPreviewCorruptedVideo; + } videoPath = objectList[index]->path(); } } @@ -560,12 +607,22 @@ if (isVideoSet) { item.setData(videoPath, Attachments); - setPreviewIcon(pixmap, videoPath, msgId, false); + // Store thumbnail only for non protected, non corrupted content. + if (!(EPreviewProtectedVideo & msgProperty) && + !(EPreviewCorruptedVideo & msgProperty)) + { + setPreviewIcon(pixmap, videoPath, msgId, false); + } } else if (isImageSet) { item.setData(imagePath, Attachments); - setPreviewIcon(pixmap, imagePath, msgId, false); + // Store thumbnail only for non protected, non corrupted content. + if (!(EPreviewProtectedImage & msgProperty) && + !(EPreviewCorruptedImage & msgProperty)) + { + setPreviewIcon(pixmap, imagePath, msgId, false); + } } //populate msgProperty item.setData(msgProperty, MessageProperty); @@ -595,28 +652,28 @@ { return; } - + // fetch relevent info to show in CV // msg size QString estimatedMsgSizeStr = QString("%1").arg(0); estimatedMsgSizeStr.append(" Kb"); - TRAP_IGNORE(estimatedMsgSizeStr = + TRAP_IGNORE(estimatedMsgSizeStr = mMsgStoreHandler->NotificationMsgSizeL()); - + // msg class type QString classInfoStr = mMsgStoreHandler->NotificationClass(); - + // notification expiry date //TODO: Need to do localization of digits used to show expiry time TTime expiryTime; QString expiryTimeStr; mMsgStoreHandler->NotificationExpiryDate(expiryTime, expiryTimeStr); - + // notification state e.g. waiting, retrieving etc QString statusStr; int status; mMsgStoreHandler->NotificationStatus(status, statusStr); - + // create data for bodytext role QString dataText; dataText.append("Size: "); // TODO: use logical str name @@ -655,7 +712,7 @@ { //TODO, needs to be revisited again, once BT team provides the solution for //BT received as Biomsg issue. - QString description = S60QConversions::s60DescToQString(*(entry.Description())); + QString description = XQConversions::s60DescToQString(*(entry.Description())); if (description.contains(".vcf") || description.contains(".ics")) // "vCard" { @@ -666,8 +723,8 @@ QString displayName = MsgContactHandler::getVCardDisplayName( description); item.setData(displayName, BodyText); - } - else + } + else { if (description.contains(".vcs")) // "vCalendar" { @@ -701,7 +758,7 @@ QString attachmentPath = attList[0]->path(); //get display-name and set as bodytext - QString displayName = + QString displayName = MsgContactHandler::getVCardDisplayName( attachmentPath); item.setData(displayName, BodyText); @@ -735,7 +792,7 @@ HBufC* description = entry.Description(); QString subject(""); if (description && description->Length()) { - subject = (S60QConversions::s60DescToQString(*description)); + subject = (XQConversions::s60DescToQString(*description)); item.setData(subject, BodyText); } } @@ -769,7 +826,7 @@ { QPixmap pixmap(filePath); QPixmap scaledPixmap = pixmap.scaled(63.65, 63.65, Qt::IgnoreAspectRatio); - HbIcon *previewIcon = new HbIcon(pixmap); + HbIcon *previewIcon = new HbIcon(scaledPixmap); previewIconCache.insert(msgId, previewIcon); @@ -785,13 +842,13 @@ // ConversationsModel::getPreviewIconItem() // @see header //--------------------------------------------------------------- -HbIcon* ConversationsModel::getPreviewIconItem(int msgId, +HbIcon* ConversationsModel::getPreviewIconItem(int msgId, QString& filepath) const { QCRITICAL_WRITE("ConversationsModel::getPreviewIconItem start.") - //Initialize icon from the Cache will be NULL if Item not present - HbIcon* previewIcon = previewIconCache[msgId]; + //Initialize icon from the Cache will be NULL if Item not present + HbIcon* previewIcon = previewIconCache[msgId]; if (!previewIcon) { //This is done in this way as non-const function call cant be done here @@ -902,7 +959,7 @@ //--------------------------------------------------------------- void ConversationsModel::clearModel() { - clear(); + clear(); previewIconCache.clear(); } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/src/conversationssummarymodel.cpp --- a/messagingapp/msgui/appengine/src/conversationssummarymodel.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/src/conversationssummarymodel.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -18,7 +18,7 @@ #include "conversationssummarymodel.h" #include "conversationsenginedefines.h" #include "conversationsengineutility.h" -#include "s60qconversions.h" +#include #include "convergedmessage.h" #include "unidatamodelloader.h" #include "unidatamodelplugininterface.h" @@ -244,7 +244,7 @@ HBufC* body = conEntry->Description(); if( body && body->Length()) { - QString bodytext(S60QConversions::s60DescToQString(*body)); + QString bodytext(XQConversions::s60DescToQString(*body)); item.setData(bodytext, BodyText); item.setData(bodytext, Subject ); } @@ -267,7 +267,7 @@ //display name if(disName && disName->Length()) { - displayName = S60QConversions::s60DescToQString(*disName); + displayName = XQConversions::s60DescToQString(*disName); item.setData(displayName,DisplayName); } @@ -276,7 +276,7 @@ QString contactNumber(""); if ( contactno && contactno->Length() ) { - contactNumber = S60QConversions::s60DescToQString(*contactno); + contactNumber = XQConversions::s60DescToQString(*contactno); } item.setData(contactNumber, ConversationAddress); @@ -300,7 +300,7 @@ { //TODO, needs to be revisited again, once BT team provides the solution for //BT received as Biomsg issue. - QString description = S60QConversions::s60DescToQString(*(entry.Description())); + QString description = XQConversions::s60DescToQString(*(entry.Description())); if (description.contains(".vcf") || description.contains(".ics")) // "vCard" { @@ -385,7 +385,7 @@ HBufC* description = entry.Description(); QString subject(""); if (description && description->Length()) { - subject = (S60QConversions::s60DescToQString(*description)); + subject = (XQConversions::s60DescToQString(*description)); item.setData(subject, BodyText); } @@ -398,7 +398,7 @@ HBufC* description = entry.Description(); QString subject(""); if (description && description->Length()) { - subject = (S60QConversions::s60DescToQString(*description)); + subject = (XQConversions::s60DescToQString(*description)); item.setData(subject, BodyText); } } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/src/draftsmodel.cpp --- a/messagingapp/msgui/appengine/src/draftsmodel.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/src/draftsmodel.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -18,7 +18,6 @@ #include "draftsmodel.h" #include "conversationsenginedefines.h" #include "conversationsengineutility.h" -#include "s60qconversions.h" #include "conversationsengineutility.h" #include @@ -26,7 +25,7 @@ #include #include #include - +#include //CONSTANTS const QString DATE_FORMAT("dd/MM"); //Date format. const QString TIME_FORMAT("hh:mm"); //Time format. @@ -223,7 +222,7 @@ item.setData(ConversationsEngineUtility::messageType(entry.iMtm.iUid), MessageType); // description - QString Description(S60QConversions::s60DescToQString(entry.iDescription)); + QString Description(XQConversions::s60DescToQString(entry.iDescription)); item.setData(Description, Subject); // time stamp @@ -234,7 +233,7 @@ item.setData(seconds.Int(), TimeStamp); // contact details - QString contact(S60QConversions::s60DescToQString(entry.iDetails)); + QString contact(XQConversions::s60DescToQString(entry.iDetails)); item.setData(contact, DisplayName); // Attachments diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/tsrc/testconversationengine/src/testconversationengine.cpp --- a/messagingapp/msgui/appengine/tsrc/testconversationengine/src/testconversationengine.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/tsrc/testconversationengine/src/testconversationengine.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -23,7 +23,7 @@ #include "testconversationupdatehandler.h" #include #include -#include +#include #include @@ -195,11 +195,11 @@ //check the bunch of converation client details QCOMPARE(fname, - S60QConversions::s60DescToQString( + XQConversions::s60DescToQString( *(clientConv->GetDisplayName()))); QCOMPARE(address, - S60QConversions::s60DescToQString( + XQConversions::s60DescToQString( *(clientConv->GetConversationEntry()->Contact()))); } } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/tsrc/testconversationengine/src/testconversationupdatehandler.cpp --- a/messagingapp/msgui/appengine/tsrc/testconversationengine/src/testconversationupdatehandler.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/tsrc/testconversationengine/src/testconversationupdatehandler.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -20,7 +20,7 @@ #include "conversationsengine.h" #include #include -#include +#include #include #include @@ -66,7 +66,7 @@ //as this is common for all the conversation entries QModelIndexList indexList = convModel->match(convModel->index(0, 0), ConversationAddress, - S60QConversions::s60DescToQString(TestConversationEngineStub::Instance()->GetContactID()), + XQConversions::s60DescToQString(TestConversationEngineStub::Instance()->GetContactID()), -1, // One match Qt::MatchExactly); entryCount = indexList.count(); @@ -86,7 +86,7 @@ //compare the message description QCOMPARE(convModel->data(indexList[loop], BodyText).toString(), - S60QConversions::s60DescToQString( + XQConversions::s60DescToQString( TestConversationEngineStub::Instance()-> GetDescription())); @@ -144,7 +144,7 @@ TDesC* dispName = clientConv->GetDisplayName(); QCOMPARE(convModel->data(indexList[0], DisplayName).toString(), - S60QConversions::s60DescToQString(*dispName)); + XQConversions::s60DescToQString(*dispName)); int contactId = clientConv->GetContactId(); QCOMPARE(convModel->data(indexList[0], ContactId).toInt(), contactId); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/appengine/tsrc/testconversationengine/testconversationengine.pro --- a/messagingapp/msgui/appengine/tsrc/testconversationengine/testconversationengine.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/appengine/tsrc/testconversationengine/testconversationengine.pro Wed Jun 23 18:09:17 2010 +0300 @@ -30,7 +30,6 @@ INCLUDEPATH += ../../../../../inc INCLUDEPATH += ../../../appengine/inc INCLUDEPATH += ../../../../msgappfw/client/inc -INCLUDEPATH += ../../../../msgutils/s60qconversions/inc INCLUDEPATH += ../../../../smartmessaging/ringbc/inc INCLUDEPATH += /ext/mw/qtextensions/qtmobileextensions/include INCLUDEPATH += ../../../../msgutils/unieditorutils/editorgenutils/inc @@ -81,7 +80,7 @@ LIBS += -euser \ -ecom \ -lcsutils \ - -ls60qconversions \ + -lxqutils \ -lconvergedmessageutils \ -lmsgs \ -lInetProtUtil \ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/bwins/conversationviewu.def --- a/messagingapp/msgui/bwins/conversationviewu.def Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/bwins/conversationviewu.def Wed Jun 23 18:09:17 2010 +0300 @@ -1,15 +1,15 @@ EXPORTS ?qt_metacast@MsgConversationBaseView@@UAEPAXPBD@Z @ 1 NONAME ; void * MsgConversationBaseView::qt_metacast(char const *) ?metaObject@MsgConversationBaseView@@UBEPBUQMetaObject@@XZ @ 2 NONAME ; struct QMetaObject const * MsgConversationBaseView::metaObject(void) const - ?saveContentToDrafts@MsgConversationBaseView@@QAEXXZ @ 3 NONAME ; void MsgConversationBaseView::saveContentToDrafts(void) - ?closeConversationView@MsgConversationBaseView@@QAEXXZ @ 4 NONAME ; void MsgConversationBaseView::closeConversationView(void) - ?trUtf8@MsgConversationBaseView@@SA?AVQString@@PBD0H@Z @ 5 NONAME ; class QString MsgConversationBaseView::trUtf8(char const *, char const *, int) - ?handleError@MsgConversationBaseView@@AAEXHABVQString@@@Z @ 6 NONAME ; void MsgConversationBaseView::handleError(int, class QString const &) - ?tr@MsgConversationBaseView@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString MsgConversationBaseView::tr(char const *, char const *, int) - ?hideChrome@MsgConversationBaseView@@AAEX_N@Z @ 8 NONAME ; void MsgConversationBaseView::hideChrome(bool) - ??0MsgConversationBaseView@@QAE@PAVQGraphicsItem@@@Z @ 9 NONAME ; MsgConversationBaseView::MsgConversationBaseView(class QGraphicsItem *) - ?handleOk@MsgConversationBaseView@@AAEXABVQVariant@@@Z @ 10 NONAME ; void MsgConversationBaseView::handleOk(class QVariant const &) - ?trUtf8@MsgConversationBaseView@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString MsgConversationBaseView::trUtf8(char const *, char const *) + ?closeConversationView@MsgConversationBaseView@@QAEXXZ @ 3 NONAME ; void MsgConversationBaseView::closeConversationView(void) + ?trUtf8@MsgConversationBaseView@@SA?AVQString@@PBD0H@Z @ 4 NONAME ; class QString MsgConversationBaseView::trUtf8(char const *, char const *, int) + ?handleError@MsgConversationBaseView@@AAEXHABVQString@@@Z @ 5 NONAME ; void MsgConversationBaseView::handleError(int, class QString const &) + ?tr@MsgConversationBaseView@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString MsgConversationBaseView::tr(char const *, char const *, int) + ?hideChrome@MsgConversationBaseView@@AAEX_N@Z @ 7 NONAME ; void MsgConversationBaseView::hideChrome(bool) + ??0MsgConversationBaseView@@QAE@PAVQGraphicsItem@@@Z @ 8 NONAME ; MsgConversationBaseView::MsgConversationBaseView(class QGraphicsItem *) + ?handleOk@MsgConversationBaseView@@AAEXABVQVariant@@@Z @ 9 NONAME ; void MsgConversationBaseView::handleOk(class QVariant const &) + ?trUtf8@MsgConversationBaseView@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString MsgConversationBaseView::trUtf8(char const *, char const *) + ?saveContentToDrafts@MsgConversationBaseView@@QAEHXZ @ 11 NONAME ; int MsgConversationBaseView::saveContentToDrafts(void) ?setPSCVId@MsgConversationBaseView@@QAEX_N@Z @ 12 NONAME ; void MsgConversationBaseView::setPSCVId(bool) ?doDelayedConstruction@MsgConversationBaseView@@AAEXXZ @ 13 NONAME ; void MsgConversationBaseView::doDelayedConstruction(void) ?openConversation@MsgConversationBaseView@@QAEX_J@Z @ 14 NONAME ; void MsgConversationBaseView::openConversation(long long) diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/bwins/msgaudiofetcheru.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/bwins/msgaudiofetcheru.def Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,20 @@ +EXPORTS + ?metaObject@MsgAudioFetcherView@@UBEPBUQMetaObject@@XZ @ 1 NONAME ; struct QMetaObject const * MsgAudioFetcherView::metaObject(void) const + ?enableToolBar@MsgAudioFetcherView@@AAEX_N@Z @ 2 NONAME ; void MsgAudioFetcherView::enableToolBar(bool) + ??1MsgAudioFetcherView@@UAE@XZ @ 3 NONAME ; MsgAudioFetcherView::~MsgAudioFetcherView(void) + ?staticMetaObject@MsgAudioFetcherView@@2UQMetaObject@@B @ 4 NONAME ; struct QMetaObject const MsgAudioFetcherView::staticMetaObject + ??_EMsgAudioFetcherView@@UAE@I@Z @ 5 NONAME ; MsgAudioFetcherView::~MsgAudioFetcherView(unsigned int) + ?trUtf8@MsgAudioFetcherView@@SA?AVQString@@PBD0@Z @ 6 NONAME ; class QString MsgAudioFetcherView::trUtf8(char const *, char const *) + ?removeToolBarAction@MsgAudioFetcherView@@AAEXXZ @ 7 NONAME ; void MsgAudioFetcherView::removeToolBarAction(void) + ?qt_metacall@MsgAudioFetcherView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 8 NONAME ; int MsgAudioFetcherView::qt_metacall(enum QMetaObject::Call, int, void * *) + ?initMainWidget@MsgAudioFetcherView@@AAEXXZ @ 9 NONAME ; void MsgAudioFetcherView::initMainWidget(void) + ?trUtf8@MsgAudioFetcherView@@SA?AVQString@@PBD0H@Z @ 10 NONAME ; class QString MsgAudioFetcherView::trUtf8(char const *, char const *, int) + ?tr@MsgAudioFetcherView@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString MsgAudioFetcherView::tr(char const *, char const *, int) + ?on_rightAction_triggered@MsgAudioFetcherView@@AAEXXZ @ 12 NONAME ; void MsgAudioFetcherView::on_rightAction_triggered(void) + ?initToolBar@MsgAudioFetcherView@@AAEXXZ @ 13 NONAME ; void MsgAudioFetcherView::initToolBar(void) + ?tr@MsgAudioFetcherView@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString MsgAudioFetcherView::tr(char const *, char const *) + ?qt_metacast@MsgAudioFetcherView@@UAEPAXPBD@Z @ 15 NONAME ; void * MsgAudioFetcherView::qt_metacast(char const *) + ??0MsgAudioFetcherView@@QAE@XZ @ 16 NONAME ; MsgAudioFetcherView::MsgAudioFetcherView(void) + ?getStaticMetaObject@MsgAudioFetcherView@@SAABUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const & MsgAudioFetcherView::getStaticMetaObject(void) + ?on_leftAction_triggered@MsgAudioFetcherView@@AAEXXZ @ 18 NONAME ; void MsgAudioFetcherView::on_leftAction_triggered(void) + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/bwins/msgsettingsu.def --- a/messagingapp/msgui/bwins/msgsettingsu.def Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -EXPORTS - ?createMmsView@SettingsViewer@@QAEXXZ @ 1 NONAME ; void SettingsViewer::createMmsView(void) - ??0SettingsViewer@@QAE@PAVQGraphicsItem@@@Z @ 2 NONAME ; SettingsViewer::SettingsViewer(class QGraphicsItem *) - ?openMmsSettings@SettingsViewer@@QAEXXZ @ 3 NONAME ; void SettingsViewer::openMmsSettings(void) - ??1SettingsViewer@@UAE@XZ @ 4 NONAME ; SettingsViewer::~SettingsViewer(void) - ?staticMetaObject@SettingsViewer@@2UQMetaObject@@B @ 5 NONAME ; struct QMetaObject const SettingsViewer::staticMetaObject - ??_ESettingsViewer@@UAE@I@Z @ 6 NONAME ; SettingsViewer::~SettingsViewer(unsigned int) - ?qt_metacast@SettingsViewer@@UAEPAXPBD@Z @ 7 NONAME ; void * SettingsViewer::qt_metacast(char const *) - ?initView@SettingsViewer@@QAEXXZ @ 8 NONAME ; void SettingsViewer::initView(void) - ?softkeyClicked@SettingsViewer@@QAEXXZ @ 9 NONAME ; void SettingsViewer::softkeyClicked(void) - ?changeAccessPoint@SettingsViewer@@QAEXH@Z @ 10 NONAME ; void SettingsViewer::changeAccessPoint(int) - ?trUtf8@SettingsViewer@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString SettingsViewer::trUtf8(char const *, char const *) - ?trUtf8@SettingsViewer@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString SettingsViewer::trUtf8(char const *, char const *, int) - ?metaObject@SettingsViewer@@UBEPBUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const * SettingsViewer::metaObject(void) const - ?openSmsSettings@SettingsViewer@@QAEXXZ @ 14 NONAME ; void SettingsViewer::openSmsSettings(void) - ?tr@SettingsViewer@@SA?AVQString@@PBD0H@Z @ 15 NONAME ; class QString SettingsViewer::tr(char const *, char const *, int) - ?iAPSelector@SettingsViewer@@QAEXPAVQStringList@@@Z @ 16 NONAME ; void SettingsViewer::iAPSelector(class QStringList *) - ?closeSettings@SettingsViewer@@QAEXXZ @ 17 NONAME ; void SettingsViewer::closeSettings(void) - ?qt_metacall@SettingsViewer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 18 NONAME ; int SettingsViewer::qt_metacall(enum QMetaObject::Call, int, void * *) - ?changeService@SettingsViewer@@QAEXXZ @ 19 NONAME ; void SettingsViewer::changeService(void) - ?createSmsView@SettingsViewer@@QAEXXZ @ 20 NONAME ; void SettingsViewer::createSmsView(void) - ?settingsViewerClosed@SettingsViewer@@IAEXXZ @ 21 NONAME ; void SettingsViewer::settingsViewerClosed(void) - ?tr@SettingsViewer@@SA?AVQString@@PBD0@Z @ 22 NONAME ; class QString SettingsViewer::tr(char const *, char const *) - ?getStaticMetaObject@SettingsViewer@@SAABUQMetaObject@@XZ @ 23 NONAME ; struct QMetaObject const & SettingsViewer::getStaticMetaObject(void) - ?settingListClosed@SettingsViewer@@QAEXXZ @ 24 NONAME ; void SettingsViewer::settingListClosed(void) - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/bwins/msguiutilsu.def --- a/messagingapp/msgui/bwins/msguiutilsu.def Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/bwins/msguiutilsu.def Wed Jun 23 18:09:17 2010 +0300 @@ -21,25 +21,26 @@ ?qt_metacall@MmsConformanceCheck@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int MmsConformanceCheck::qt_metacall(enum QMetaObject::Call, int, void * *) ?getSmsMsgSize@MsgSendUtil@@AAEHAAVConvergedMessage@@@Z @ 21 NONAME ; int MsgSendUtil::getSmsMsgSize(class ConvergedMessage &) ?tr@MsgSendUtil@@SA?AVQString@@PBD0H@Z @ 22 NONAME ; class QString MsgSendUtil::tr(char const *, char const *, int) - ?checkMaxMsgSizeLimit@MsgSendUtil@@AAE_NAAVConvergedMessage@@@Z @ 23 NONAME ; bool MsgSendUtil::checkMaxMsgSizeLimit(class ConvergedMessage &) - ?trUtf8@MmsConformanceCheck@@SA?AVQString@@PBD0H@Z @ 24 NONAME ; class QString MmsConformanceCheck::trUtf8(char const *, char const *, int) - ?tr@MmsConformanceCheck@@SA?AVQString@@PBD0H@Z @ 25 NONAME ; class QString MmsConformanceCheck::tr(char const *, char const *, int) - ??1MsgMediaUtil@@QAE@XZ @ 26 NONAME ; MsgMediaUtil::~MsgMediaUtil(void) - ?send@MsgSendUtil@@QAEHAAVConvergedMessage@@@Z @ 27 NONAME ; int MsgSendUtil::send(class ConvergedMessage &) - ?trUtf8@MsgSendUtil@@SA?AVQString@@PBD0H@Z @ 28 NONAME ; class QString MsgSendUtil::trUtf8(char const *, char const *, int) - ?checkMaxRecipientCount@MsgSendUtil@@AAE_NAAVConvergedMessage@@@Z @ 29 NONAME ; bool MsgSendUtil::checkMaxRecipientCount(class ConvergedMessage &) - ?copyVCardToTemp@MsgContactsUtil@@CA?AVQString@@ABV2@@Z @ 30 NONAME ; class QString MsgContactsUtil::copyVCardToTemp(class QString const &) - ?getMmsMsgSize@MsgSendUtil@@AAEHAAVConvergedMessage@@@Z @ 31 NONAME ; int MsgSendUtil::getMmsMsgSize(class ConvergedMessage &) - ?onDialogInsertMedia@MmsConformanceCheck@@AAEXPAVHbAction@@@Z @ 32 NONAME ; void MmsConformanceCheck::onDialogInsertMedia(class HbAction *) - ?checkModeForInsert@MmsConformanceCheck@@QAEHABVQString@@_N@Z @ 33 NONAME ; int MmsConformanceCheck::checkModeForInsert(class QString const &, bool) - ?qt_metacast@MmsConformanceCheck@@UAEPAXPBD@Z @ 34 NONAME ; void * MmsConformanceCheck::qt_metacast(char const *) - ?tr@MmsConformanceCheck@@SA?AVQString@@PBD0@Z @ 35 NONAME ; class QString MmsConformanceCheck::tr(char const *, char const *) - ?staticMetaObject@MmsConformanceCheck@@2UQMetaObject@@B @ 36 NONAME ; struct QMetaObject const MmsConformanceCheck::staticMetaObject - ?tr@MsgSendUtil@@SA?AVQString@@PBD0@Z @ 37 NONAME ; class QString MsgSendUtil::tr(char const *, char const *) - ?saveToDrafts@MsgSendUtil@@QAEJAAVConvergedMessage@@@Z @ 38 NONAME ; long MsgSendUtil::saveToDrafts(class ConvergedMessage &) - ?launchVCardViewer@MsgContactsUtil@@SA_NABVQString@@@Z @ 39 NONAME ; bool MsgContactsUtil::launchVCardViewer(class QString const &) - ?mediaDuration@MsgMediaUtil@@QAE?AVQString@@ABV2@@Z @ 40 NONAME ; class QString MsgMediaUtil::mediaDuration(class QString const &) - ??_EMmsConformanceCheck@@UAE@I@Z @ 41 NONAME ; MmsConformanceCheck::~MmsConformanceCheck(unsigned int) - ??1MsgSendUtil@@UAE@XZ @ 42 NONAME ; MsgSendUtil::~MsgSendUtil(void) - ?qt_metacall@MsgSendUtil@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 43 NONAME ; int MsgSendUtil::qt_metacall(enum QMetaObject::Call, int, void * *) + ?validateMsgForForward@MmsConformanceCheck@@QAE_NH@Z @ 23 NONAME ; bool MmsConformanceCheck::validateMsgForForward(int) + ?checkMaxMsgSizeLimit@MsgSendUtil@@AAE_NAAVConvergedMessage@@@Z @ 24 NONAME ; bool MsgSendUtil::checkMaxMsgSizeLimit(class ConvergedMessage &) + ?trUtf8@MmsConformanceCheck@@SA?AVQString@@PBD0H@Z @ 25 NONAME ; class QString MmsConformanceCheck::trUtf8(char const *, char const *, int) + ?tr@MmsConformanceCheck@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString MmsConformanceCheck::tr(char const *, char const *, int) + ??1MsgMediaUtil@@QAE@XZ @ 27 NONAME ; MsgMediaUtil::~MsgMediaUtil(void) + ?send@MsgSendUtil@@QAEHAAVConvergedMessage@@@Z @ 28 NONAME ; int MsgSendUtil::send(class ConvergedMessage &) + ?trUtf8@MsgSendUtil@@SA?AVQString@@PBD0H@Z @ 29 NONAME ; class QString MsgSendUtil::trUtf8(char const *, char const *, int) + ?checkMaxRecipientCount@MsgSendUtil@@AAE_NAAVConvergedMessage@@@Z @ 30 NONAME ; bool MsgSendUtil::checkMaxRecipientCount(class ConvergedMessage &) + ?copyVCardToTemp@MsgContactsUtil@@CA?AVQString@@ABV2@@Z @ 31 NONAME ; class QString MsgContactsUtil::copyVCardToTemp(class QString const &) + ?getMmsMsgSize@MsgSendUtil@@AAEHAAVConvergedMessage@@@Z @ 32 NONAME ; int MsgSendUtil::getMmsMsgSize(class ConvergedMessage &) + ?onDialogInsertMedia@MmsConformanceCheck@@AAEXPAVHbAction@@@Z @ 33 NONAME ; void MmsConformanceCheck::onDialogInsertMedia(class HbAction *) + ?checkModeForInsert@MmsConformanceCheck@@QAEHABVQString@@_N@Z @ 34 NONAME ; int MmsConformanceCheck::checkModeForInsert(class QString const &, bool) + ?qt_metacast@MmsConformanceCheck@@UAEPAXPBD@Z @ 35 NONAME ; void * MmsConformanceCheck::qt_metacast(char const *) + ?tr@MmsConformanceCheck@@SA?AVQString@@PBD0@Z @ 36 NONAME ; class QString MmsConformanceCheck::tr(char const *, char const *) + ?staticMetaObject@MmsConformanceCheck@@2UQMetaObject@@B @ 37 NONAME ; struct QMetaObject const MmsConformanceCheck::staticMetaObject + ?tr@MsgSendUtil@@SA?AVQString@@PBD0@Z @ 38 NONAME ; class QString MsgSendUtil::tr(char const *, char const *) + ?saveToDrafts@MsgSendUtil@@QAEJAAVConvergedMessage@@@Z @ 39 NONAME ; long MsgSendUtil::saveToDrafts(class ConvergedMessage &) + ?launchVCardViewer@MsgContactsUtil@@SA_NABVQString@@@Z @ 40 NONAME ; bool MsgContactsUtil::launchVCardViewer(class QString const &) + ?mediaDuration@MsgMediaUtil@@QAE?AVQString@@ABV2@@Z @ 41 NONAME ; class QString MsgMediaUtil::mediaDuration(class QString const &) + ??_EMmsConformanceCheck@@UAE@I@Z @ 42 NONAME ; MmsConformanceCheck::~MmsConformanceCheck(unsigned int) + ??1MsgSendUtil@@UAE@XZ @ 43 NONAME ; MsgSendUtil::~MsgSendUtil(void) + ?qt_metacall@MsgSendUtil@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 44 NONAME ; int MsgSendUtil::qt_metacall(enum QMetaObject::Call, int, void * *) diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/bwins/unifiededitoru.def --- a/messagingapp/msgui/bwins/unifiededitoru.def Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/bwins/unifiededitoru.def Wed Jun 23 18:09:17 2010 +0300 @@ -9,57 +9,56 @@ ?packMessage@MsgUnifiedEditorView@@AAEXAAVConvergedMessage@@_N@Z @ 8 NONAME ; void MsgUnifiedEditorView::packMessage(class ConvergedMessage &, bool) ?handleViewExtnActivated@MsgUnifiedEditorView@@AAEXPAVHbListWidgetItem@@@Z @ 9 NONAME ; void MsgUnifiedEditorView::handleViewExtnActivated(class HbListWidgetItem *) ?sendingOptions@MsgUnifiedEditorView@@AAEXXZ @ 10 NONAME ; void MsgUnifiedEditorView::sendingOptions(void) - ?saveContentToDrafts@MsgUnifiedEditorView@@QAEXXZ @ 11 NONAME ; void MsgUnifiedEditorView::saveContentToDrafts(void) - ?addAttachment@MsgUnifiedEditorView@@AAEHABVQString@@@Z @ 12 NONAME ; int MsgUnifiedEditorView::addAttachment(class QString const &) - ?doDelayedConstruction@MsgUnifiedEditorView@@AAEXXZ @ 13 NONAME ; void MsgUnifiedEditorView::doDelayedConstruction(void) - ?onContentChanged@MsgUnifiedEditorView@@AAEXXZ @ 14 NONAME ; void MsgUnifiedEditorView::onContentChanged(void) - ?staticMetaObject@MsgUnifiedEditorView@@2UQMetaObject@@B @ 15 NONAME ; struct QMetaObject const MsgUnifiedEditorView::staticMetaObject - ?activateInputBlocker@MsgUnifiedEditorView@@AAEXXZ @ 16 NONAME ; void MsgUnifiedEditorView::activateInputBlocker(void) - ?resizeEvent@MsgUnifiedEditorView@@MAEXPAVQGraphicsSceneResizeEvent@@@Z @ 17 NONAME ; void MsgUnifiedEditorView::resizeEvent(class QGraphicsSceneResizeEvent *) - ?ScaleImageL@CUniImageProcessor@@QAEXPAVCFbsBitmap@@0H@Z @ 18 NONAME ; void CUniImageProcessor::ScaleImageL(class CFbsBitmap *, class CFbsBitmap *, int) - ?onDialogSmsSettings@MsgUnifiedEditorView@@AAEXPAVHbAction@@@Z @ 19 NONAME ; void MsgUnifiedEditorView::onDialogSmsSettings(class HbAction *) - ?populateContent@MsgUnifiedEditorView@@QAEXABV?$QList@VQVariant@@@@@Z @ 20 NONAME ; void MsgUnifiedEditorView::populateContent(class QList const &) - ?onDialogMmsSettings@MsgUnifiedEditorView@@AAEXPAVHbAction@@@Z @ 21 NONAME ; void MsgUnifiedEditorView::onDialogMmsSettings(class HbAction *) - ?addCcBcc@MsgUnifiedEditorView@@AAEXXZ @ 22 NONAME ; void MsgUnifiedEditorView::addCcBcc(void) + ?addAttachment@MsgUnifiedEditorView@@AAEHABVQString@@@Z @ 11 NONAME ; int MsgUnifiedEditorView::addAttachment(class QString const &) + ?doDelayedConstruction@MsgUnifiedEditorView@@AAEXXZ @ 12 NONAME ; void MsgUnifiedEditorView::doDelayedConstruction(void) + ?onContentChanged@MsgUnifiedEditorView@@AAEXXZ @ 13 NONAME ; void MsgUnifiedEditorView::onContentChanged(void) + ?staticMetaObject@MsgUnifiedEditorView@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const MsgUnifiedEditorView::staticMetaObject + ?activateInputBlocker@MsgUnifiedEditorView@@AAEXXZ @ 15 NONAME ; void MsgUnifiedEditorView::activateInputBlocker(void) + ?resizeEvent@MsgUnifiedEditorView@@MAEXPAVQGraphicsSceneResizeEvent@@@Z @ 16 NONAME ; void MsgUnifiedEditorView::resizeEvent(class QGraphicsSceneResizeEvent *) + ?ScaleImageL@CUniImageProcessor@@QAEXPAVCFbsBitmap@@0H@Z @ 17 NONAME ; void CUniImageProcessor::ScaleImageL(class CFbsBitmap *, class CFbsBitmap *, int) + ?onDialogSmsSettings@MsgUnifiedEditorView@@AAEXPAVHbAction@@@Z @ 18 NONAME ; void MsgUnifiedEditorView::onDialogSmsSettings(class HbAction *) + ?populateContent@MsgUnifiedEditorView@@QAEXABV?$QList@VQVariant@@@@@Z @ 19 NONAME ; void MsgUnifiedEditorView::populateContent(class QList const &) + ?onDialogMmsSettings@MsgUnifiedEditorView@@AAEXPAVHbAction@@@Z @ 20 NONAME ; void MsgUnifiedEditorView::onDialogMmsSettings(class HbAction *) + ?addCcBcc@MsgUnifiedEditorView@@AAEXXZ @ 21 NONAME ; void MsgUnifiedEditorView::addCcBcc(void) + ?saveContentToDrafts@MsgUnifiedEditorView@@QAEHXZ @ 22 NONAME ; int MsgUnifiedEditorView::saveContentToDrafts(void) ?ProcessImageL@CUniImageProcessor@@QAEXAAVRFile@@0AAVTSize@@ABVTDesC8@@HH@Z @ 23 NONAME ; void CUniImageProcessor::ProcessImageL(class RFile &, class RFile &, class TSize &, class TDesC8 const &, int, int) ?generateFileName@MsgUnifiedEditorView@@AAE?AVQString@@AAV2@@Z @ 24 NONAME ; class QString MsgUnifiedEditorView::generateFileName(class QString &) ?metaObject@MsgUnifiedEditorView@@UBEPBUQMetaObject@@XZ @ 25 NONAME ; struct QMetaObject const * MsgUnifiedEditorView::metaObject(void) const ?createVCards@MsgUnifiedEditorView@@AAEHABVQVariant@@AAVQStringList@@@Z @ 26 NONAME ; int MsgUnifiedEditorView::createVCards(class QVariant const &, class QStringList &) - ?audiosFetched@MsgUnifiedEditorView@@AAEXABVQVariant@@@Z @ 27 NONAME ; void MsgUnifiedEditorView::audiosFetched(class QVariant const &) - ?addSubject@MsgUnifiedEditorView@@AAEXXZ @ 28 NONAME ; void MsgUnifiedEditorView::addSubject(void) - ?createTempFolder@MsgUnifiedEditorView@@AAE_NXZ @ 29 NONAME ; bool MsgUnifiedEditorView::createTempFolder(void) - ?imagesFetched@MsgUnifiedEditorView@@AAEXABVQVariant@@@Z @ 30 NONAME ; void MsgUnifiedEditorView::imagesFetched(class QVariant const &) - ?setFocus@MsgUnifiedEditorView@@AAEXPAVMsgUnifiedEditorBaseWidget@@@Z @ 31 NONAME ; void MsgUnifiedEditorView::setFocus(class MsgUnifiedEditorBaseWidget *) - ?vkbClosed@MsgUnifiedEditorView@@AAEXXZ @ 32 NONAME ; void MsgUnifiedEditorView::vkbClosed(void) - ?serviceRequestError@MsgUnifiedEditorView@@AAEXHABVQString@@@Z @ 33 NONAME ; void MsgUnifiedEditorView::serviceRequestError(int, class QString const &) - ?qt_metacast@MsgUnifiedEditorView@@UAEPAXPBD@Z @ 34 NONAME ; void * MsgUnifiedEditorView::qt_metacast(char const *) - ?removeTempFolder@MsgUnifiedEditorView@@AAEXXZ @ 35 NONAME ; void MsgUnifiedEditorView::removeTempFolder(void) - ?vkbOpened@MsgUnifiedEditorView@@AAEXXZ @ 36 NONAME ; void MsgUnifiedEditorView::vkbOpened(void) - ?ScaleImageL@CUniImageProcessor@@QAEXAAVRFile@@AAPAVCFbsBitmap@@1AAVTSize@@H@Z @ 37 NONAME ; void CUniImageProcessor::ScaleImageL(class RFile &, class CFbsBitmap * &, class CFbsBitmap * &, class TSize &, int) - ?addMenu@MsgUnifiedEditorView@@AAEXXZ @ 38 NONAME ; void MsgUnifiedEditorView::addMenu(void) - ?enableSendButton@MsgUnifiedEditorView@@AAEX_N@Z @ 39 NONAME ; void MsgUnifiedEditorView::enableSendButton(bool) - ?initView@MsgUnifiedEditorView@@AAEXXZ @ 40 NONAME ; void MsgUnifiedEditorView::initView(void) - ??_EMsgUnifiedEditorView@@UAE@I@Z @ 41 NONAME ; MsgUnifiedEditorView::~MsgUnifiedEditorView(unsigned int) - ??1MsgUnifiedEditorView@@UAE@XZ @ 42 NONAME ; MsgUnifiedEditorView::~MsgUnifiedEditorView(void) - ?setAttachOptionEnabled@MsgUnifiedEditorView@@AAEXW4TBE_AttachOption@1@_N@Z @ 43 NONAME ; void MsgUnifiedEditorView::setAttachOptionEnabled(enum MsgUnifiedEditorView::TBE_AttachOption, bool) - ?hideChrome@MsgUnifiedEditorView@@AAEX_N@Z @ 44 NONAME ; void MsgUnifiedEditorView::hideChrome(bool) - ?trUtf8@MsgUnifiedEditorView@@SA?AVQString@@PBD0@Z @ 45 NONAME ; class QString MsgUnifiedEditorView::trUtf8(char const *, char const *) - ?tr@MsgUnifiedEditorView@@SA?AVQString@@PBD0@Z @ 46 NONAME ; class QString MsgUnifiedEditorView::tr(char const *, char const *) - ?ScaleImageL@CUniImageProcessor@@QAEXPAVCFbsBitmap@@AAVRFile@@ABVTSize@@ABVTDesC8@@H@Z @ 47 NONAME ; void CUniImageProcessor::ScaleImageL(class CFbsBitmap *, class RFile &, class TSize const &, class TDesC8 const &, int) - ?getStaticMetaObject@MsgUnifiedEditorView@@SAABUQMetaObject@@XZ @ 48 NONAME ; struct QMetaObject const & MsgUnifiedEditorView::getStaticMetaObject(void) - ?tr@MsgUnifiedEditorView@@SA?AVQString@@PBD0H@Z @ 49 NONAME ; class QString MsgUnifiedEditorView::tr(char const *, char const *, int) - ?send@MsgUnifiedEditorView@@AAEXXZ @ 50 NONAME ; void MsgUnifiedEditorView::send(void) - ?Reset@CUniImageProcessor@@QAEXXZ @ 51 NONAME ; void CUniImageProcessor::Reset(void) - ?populateContentIntoEditor@MsgUnifiedEditorView@@AAEXABVConvergedMessage@@_N@Z @ 52 NONAME ; void MsgUnifiedEditorView::populateContentIntoEditor(class ConvergedMessage const &, bool) - ?openDraftsMessage@MsgUnifiedEditorView@@QAEXABV?$QList@VQVariant@@@@@Z @ 53 NONAME ; void MsgUnifiedEditorView::openDraftsMessage(class QList const &) - ?addToolBar@MsgUnifiedEditorView@@AAEXXZ @ 54 NONAME ; void MsgUnifiedEditorView::addToolBar(void) - ?contactsFetched@MsgUnifiedEditorView@@AAEXABVQVariant@@@Z @ 55 NONAME ; void MsgUnifiedEditorView::contactsFetched(class QVariant const &) - ?removeAttachmentContainer@MsgUnifiedEditorView@@AAEXXZ @ 56 NONAME ; void MsgUnifiedEditorView::removeAttachmentContainer(void) - ?trUtf8@MsgUnifiedEditorView@@SA?AVQString@@PBD0H@Z @ 57 NONAME ; class QString MsgUnifiedEditorView::trUtf8(char const *, char const *, int) - ?onDialogDeleteMsg@MsgUnifiedEditorView@@AAEXPAVHbAction@@@Z @ 58 NONAME ; void MsgUnifiedEditorView::onDialogDeleteMsg(class HbAction *) - ??0MsgUnifiedEditorView@@QAE@PAVQGraphicsItem@@@Z @ 59 NONAME ; MsgUnifiedEditorView::MsgUnifiedEditorView(class QGraphicsItem *) - ?fetchContacts@MsgUnifiedEditorView@@AAEXXZ @ 60 NONAME ; void MsgUnifiedEditorView::fetchContacts(void) - ?deleteMessage@MsgUnifiedEditorView@@AAEXXZ @ 61 NONAME ; void MsgUnifiedEditorView::deleteMessage(void) - ?addAttachments@MsgUnifiedEditorView@@AAEXVQStringList@@@Z @ 62 NONAME ; void MsgUnifiedEditorView::addAttachments(class QStringList) - ?deactivateInputBlocker@MsgUnifiedEditorView@@AAEXXZ @ 63 NONAME ; void MsgUnifiedEditorView::deactivateInputBlocker(void) + ?addSubject@MsgUnifiedEditorView@@AAEXXZ @ 27 NONAME ; void MsgUnifiedEditorView::addSubject(void) + ?createTempFolder@MsgUnifiedEditorView@@AAE_NXZ @ 28 NONAME ; bool MsgUnifiedEditorView::createTempFolder(void) + ?imagesFetched@MsgUnifiedEditorView@@AAEXABVQVariant@@@Z @ 29 NONAME ; void MsgUnifiedEditorView::imagesFetched(class QVariant const &) + ?setFocus@MsgUnifiedEditorView@@AAEXPAVMsgUnifiedEditorBaseWidget@@@Z @ 30 NONAME ; void MsgUnifiedEditorView::setFocus(class MsgUnifiedEditorBaseWidget *) + ?vkbClosed@MsgUnifiedEditorView@@AAEXXZ @ 31 NONAME ; void MsgUnifiedEditorView::vkbClosed(void) + ?serviceRequestError@MsgUnifiedEditorView@@AAEXHABVQString@@@Z @ 32 NONAME ; void MsgUnifiedEditorView::serviceRequestError(int, class QString const &) + ?qt_metacast@MsgUnifiedEditorView@@UAEPAXPBD@Z @ 33 NONAME ; void * MsgUnifiedEditorView::qt_metacast(char const *) + ?removeTempFolder@MsgUnifiedEditorView@@AAEXXZ @ 34 NONAME ; void MsgUnifiedEditorView::removeTempFolder(void) + ?vkbOpened@MsgUnifiedEditorView@@AAEXXZ @ 35 NONAME ; void MsgUnifiedEditorView::vkbOpened(void) + ?ScaleImageL@CUniImageProcessor@@QAEXAAVRFile@@AAPAVCFbsBitmap@@1AAVTSize@@H@Z @ 36 NONAME ; void CUniImageProcessor::ScaleImageL(class RFile &, class CFbsBitmap * &, class CFbsBitmap * &, class TSize &, int) + ?addMenu@MsgUnifiedEditorView@@AAEXXZ @ 37 NONAME ; void MsgUnifiedEditorView::addMenu(void) + ?enableSendButton@MsgUnifiedEditorView@@AAEX_N@Z @ 38 NONAME ; void MsgUnifiedEditorView::enableSendButton(bool) + ?initView@MsgUnifiedEditorView@@AAEXXZ @ 39 NONAME ; void MsgUnifiedEditorView::initView(void) + ??_EMsgUnifiedEditorView@@UAE@I@Z @ 40 NONAME ; MsgUnifiedEditorView::~MsgUnifiedEditorView(unsigned int) + ??1MsgUnifiedEditorView@@UAE@XZ @ 41 NONAME ; MsgUnifiedEditorView::~MsgUnifiedEditorView(void) + ?setAttachOptionEnabled@MsgUnifiedEditorView@@AAEXW4TBE_AttachOption@1@_N@Z @ 42 NONAME ; void MsgUnifiedEditorView::setAttachOptionEnabled(enum MsgUnifiedEditorView::TBE_AttachOption, bool) + ?hideChrome@MsgUnifiedEditorView@@AAEX_N@Z @ 43 NONAME ; void MsgUnifiedEditorView::hideChrome(bool) + ?trUtf8@MsgUnifiedEditorView@@SA?AVQString@@PBD0@Z @ 44 NONAME ; class QString MsgUnifiedEditorView::trUtf8(char const *, char const *) + ?tr@MsgUnifiedEditorView@@SA?AVQString@@PBD0@Z @ 45 NONAME ; class QString MsgUnifiedEditorView::tr(char const *, char const *) + ?ScaleImageL@CUniImageProcessor@@QAEXPAVCFbsBitmap@@AAVRFile@@ABVTSize@@ABVTDesC8@@H@Z @ 46 NONAME ; void CUniImageProcessor::ScaleImageL(class CFbsBitmap *, class RFile &, class TSize const &, class TDesC8 const &, int) + ?getStaticMetaObject@MsgUnifiedEditorView@@SAABUQMetaObject@@XZ @ 47 NONAME ; struct QMetaObject const & MsgUnifiedEditorView::getStaticMetaObject(void) + ?tr@MsgUnifiedEditorView@@SA?AVQString@@PBD0H@Z @ 48 NONAME ; class QString MsgUnifiedEditorView::tr(char const *, char const *, int) + ?send@MsgUnifiedEditorView@@AAEXXZ @ 49 NONAME ; void MsgUnifiedEditorView::send(void) + ?Reset@CUniImageProcessor@@QAEXXZ @ 50 NONAME ; void CUniImageProcessor::Reset(void) + ?populateContentIntoEditor@MsgUnifiedEditorView@@AAEXABVConvergedMessage@@_N@Z @ 51 NONAME ; void MsgUnifiedEditorView::populateContentIntoEditor(class ConvergedMessage const &, bool) + ?openDraftsMessage@MsgUnifiedEditorView@@QAEXABV?$QList@VQVariant@@@@@Z @ 52 NONAME ; void MsgUnifiedEditorView::openDraftsMessage(class QList const &) + ?addToolBar@MsgUnifiedEditorView@@AAEXXZ @ 53 NONAME ; void MsgUnifiedEditorView::addToolBar(void) + ?contactsFetched@MsgUnifiedEditorView@@AAEXABVQVariant@@@Z @ 54 NONAME ; void MsgUnifiedEditorView::contactsFetched(class QVariant const &) + ?removeAttachmentContainer@MsgUnifiedEditorView@@AAEXXZ @ 55 NONAME ; void MsgUnifiedEditorView::removeAttachmentContainer(void) + ?trUtf8@MsgUnifiedEditorView@@SA?AVQString@@PBD0H@Z @ 56 NONAME ; class QString MsgUnifiedEditorView::trUtf8(char const *, char const *, int) + ?onDialogDeleteMsg@MsgUnifiedEditorView@@AAEXPAVHbAction@@@Z @ 57 NONAME ; void MsgUnifiedEditorView::onDialogDeleteMsg(class HbAction *) + ??0MsgUnifiedEditorView@@QAE@PAVQGraphicsItem@@@Z @ 58 NONAME ; MsgUnifiedEditorView::MsgUnifiedEditorView(class QGraphicsItem *) + ?fetchContacts@MsgUnifiedEditorView@@AAEXXZ @ 59 NONAME ; void MsgUnifiedEditorView::fetchContacts(void) + ?deleteMessage@MsgUnifiedEditorView@@AAEXXZ @ 60 NONAME ; void MsgUnifiedEditorView::deleteMessage(void) + ?addAttachments@MsgUnifiedEditorView@@AAEXVQStringList@@@Z @ 61 NONAME ; void MsgUnifiedEditorView::addAttachments(class QStringList) + ?deactivateInputBlocker@MsgUnifiedEditorView@@AAEXXZ @ 62 NONAME ; void MsgUnifiedEditorView::deactivateInputBlocker(void) diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/conversationview.pro --- a/messagingapp/msgui/conversationview/conversationview.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/conversationview.pro Wed Jun 23 18:09:17 2010 +0300 @@ -24,8 +24,8 @@ INCLUDEPATH += . INCLUDEPATH += ../../../inc +INCLUDEPATH += ../msgaudiofetcher/inc INCLUDEPATH += ../msguiutils/inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc INCLUDEPATH += ../../msgutils/unieditorutils/editorgenutils/inc INCLUDEPATH += ../appengine/inc INCLUDEPATH += ../../smartmessaging/ringbc/inc @@ -74,10 +74,17 @@ RESOURCES += conversationview.qrc +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/conversationview.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/conversationview.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock # Libs LIBS += -lappengine \ - -ls60qconversions \ -lconvergedmessageutils \ -lapgrfx \ -lefsrv \ @@ -97,5 +104,7 @@ -lsmcm \ -leditorgenutils \ -lthumbnailmanagerqt \ - -lxqsettingsmanager + -lxqsettingsmanager \ + -lxqutils \ + -lmsgaudiofetcher diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/inc/msgconversationbaseview.h --- a/messagingapp/msgui/conversationview/inc/msgconversationbaseview.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/inc/msgconversationbaseview.h Wed Jun 23 18:09:17 2010 +0300 @@ -69,8 +69,10 @@ /** * saveContentToDrafts * Saves the editors content in cv to drafts + * @return valid message id if save is success + * else invalid message id ( i.e. -1 ) */ - void saveContentToDrafts(); + int saveContentToDrafts(); /** * conversationId diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/inc/msgconversationview.h --- a/messagingapp/msgui/conversationview/inc/msgconversationview.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/inc/msgconversationview.h Wed Jun 23 18:09:17 2010 +0300 @@ -66,9 +66,10 @@ /** * Save the content inside editor to drafts - * @return true if save is success else false. + * @return valid message id if save is success + * else invalid message id ( i.e. -1 ) */ - bool saveContentToDrafts(); + int saveContentToDrafts(); private slots: @@ -264,11 +265,6 @@ */ void contactsFetched(const QVariant& value); - /* - * Get audio files from audio-fetcher and launch editor - */ - void audiosFetched(const QVariant& result ); - /** * slot to receive fetched contacts for vcard addition */ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/inc/msgconversationviewitem.h --- a/messagingapp/msgui/conversationview/inc/msgconversationviewitem.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/inc/msgconversationviewitem.h Wed Jun 23 18:09:17 2010 +0300 @@ -108,6 +108,14 @@ */ void init(); +private slots: + + /* + * Handler for orientation changed + * @param orientation Qt::Orientation + */ + void orientationchanged(Qt::Orientation orientation); + protected: /** diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/inc/msgconversationwidget.h --- a/messagingapp/msgui/conversationview/inc/msgconversationwidget.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/inc/msgconversationwidget.h Wed Jun 23 18:09:17 2010 +0300 @@ -278,11 +278,26 @@ */ void resetProperties(); - /** - * Function to repolish the widget + /** + * Function to repolish widget. */ void repolishWidget(); +protected: + + /* + * @see HbWidget + */ + virtual void polish(HbStyleParameters ¶ms); + +private slots: + + /* + * Handler for orientation changed + * @param orientation Qt::Orientation + */ + void orientationchanged(Qt::Orientation orientation); + private: /** diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.css --- a/messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.css Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.css Wed Jun 23 18:09:17 2010 +0300 @@ -9,27 +9,12 @@ MsgConversationWidget:portrait { - layout:layout-mms-portrait; -} - -MsgConversationWidget[hasImage="true"]:landscape -{ - layout:layout-mms-image-landscape; + layout:layout-msg-portrait; } -MsgConversationWidget[hasImage="false"]:landscape -{ - layout:layout-mms-landscape; -} - -MsgConversationWidget[hasImage="false"][hasAudio="true"][hasVideo="false"]:portrait +MsgConversationWidget:landscape { - layout:layout-mms-audio-text-portrait; -} - -MsgConversationWidget[hasImage="false"][hasAudio="true"][hasVideo="false"]:landscape -{ - layout:layout-mms-audio-text-landscape; + layout:layout-msg-landscape; } /********************* UNREAD INDICATOR / NEW ITEM ICON ************************/ @@ -69,16 +54,6 @@ text-line-count-max:100; } -MsgConversationWidget[hasImage="true"]::bodyText:landscape -{ - left:-var(hb-param-margin-gene-middle-horizontal); -} - -MsgConversationWidget[hasImage="false"][hasAudio="true"]::bodyText:landscape -{ - left:-var(hb-param-margin-gene-middle-horizontal); -} - /********************************** SUBJECT ***********************************/ MsgConversationWidget::subject @@ -86,6 +61,7 @@ left:-var(hb-param-margin-gene-left); top:-var(hb-param-margin-gene-top); bottom:var(hb-param-margin-gene-middle-vertical); + right:var(hb-param-margin-gene-middle-horizontal); text-align:left; text-height:var(hb-param-text-height-primary); font-variant:primary; @@ -114,8 +90,7 @@ MsgConversationWidget::attachment { - right:var(hb-param-margin-gene-right); - left:-var(hb-param-margin-gene-middle-horizontal); + right:1.0un; center-vertical:0.0un; aspect-ratio:ignore; size-policy:fixed fixed; @@ -127,7 +102,7 @@ MsgConversationWidget::priority { - left:-var(hb-param-margin-gene-middle-horizontal); + right:0.5un; center-vertical:0.0un; aspect-ratio:ignore; size-policy:fixed fixed; @@ -137,7 +112,7 @@ /******************************** IMAGE / PREVIEW *****************************/ -MsgConversationWidget[hasImage="true"]::preview:portrait +MsgConversationWidget::preview:portrait { left:-var(hb-param-margin-gene-left); right:1.0un; @@ -150,9 +125,10 @@ /*min-width:16un; min-height:12un;*/ size-policy:fixed fixed; + aspect-ratio:ignore; } -MsgConversationWidget[hasImage="true"]::preview:landscape +MsgConversationWidget::preview:landscape { left:-var(hb-param-margin-gene-left); top:-var(hb-param-margin-gene-top); @@ -163,6 +139,7 @@ min-width:16un; min-height:12un;*/ size-policy:fixed fixed; + aspect-ratio:ignore; } /****************************** TIMESTAMP TEXT ********************************/ @@ -179,16 +156,6 @@ text-line-count-min:1; } -MsgConversationWidget[hasImage="true"]::timeStamp:landscape -{ - left:-var(hb-param-margin-gene-middle-horizontal); -} - -MsgConversationWidget[hasImage="false"][hasAudio="true"]::timeStamp:landscape -{ - left:-var(hb-param-margin-gene-middle-horizontal); -} - /******************************* OVERLAY PLAY ICON ****************************/ MsgConversationWidget::playIcon diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.widgetml --- a/messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.widgetml Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.widgetml Wed Jun 23 18:09:17 2010 +0300 @@ -1,11 +1,11 @@ - + - + @@ -38,7 +38,7 @@ - + @@ -76,105 +76,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp --- a/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -141,7 +141,9 @@ ConvergedMessageAddressList MsgContactCardWidget::address() { ConvergedMessageAddressList addresses; - QModelIndex index = ConversationsEngine::instance()->getConversationsModel()->index(0, 0); + QStandardItemModel* msgModel = ConversationsEngine::instance()->getConversationsModel(); + const int rowCnt = msgModel->rowCount(); + QModelIndex index = msgModel->index(rowCnt-1, 0); ConvergedMessageAddress* address = new ConvergedMessageAddress( index.data(ConversationAddress).toString()); address->setAlias(mAddress); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp --- a/messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -42,6 +42,8 @@ QTM_USE_NAMESPACE +const int INVALID_MSGID = -1; + // LOCALIZATION #define LOC_SAVED_TO_DRAFTS hbTrId("txt_messaging_dpopinfo_saved_to_drafts") @@ -154,16 +156,18 @@ // MsgConversationBaseView::saveContentToDrafts // saves the editors content to drafts //--------------------------------------------------------------- -void MsgConversationBaseView::saveContentToDrafts() +int MsgConversationBaseView::saveContentToDrafts() { + int msgId = INVALID_MSGID; bool result = false; if (mConversationId >= 0) { - result = mConversationView->saveContentToDrafts(); + msgId = mConversationView->saveContentToDrafts(); } - if (result) { + if (msgId != INVALID_MSGID) { HbNotificationDialog::launchDialog(LOC_SAVED_TO_DRAFTS); } + return msgId; } //--------------------------------------------------------------- diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/src/msgconversationview.cpp --- a/messagingapp/msgui/conversationview/src/msgconversationview.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/src/msgconversationview.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -57,6 +57,7 @@ #include "ringbc.h" #include "mmsconformancecheck.h" #include "msgsettingsview.h" +#include "msgaudiofetcherview.h" //Item specific menu. @@ -71,6 +72,7 @@ #define LOC_BUTTON_OK hbTrId("txt_common_button_ok") #define LOC_DELETE_MESSAGE hbTrId("txt_messaging_dialog_delete_message") +#define LOC_SAVE_TO_CONTACTS hbTrId("txt_messaging_menu_save_to_contacts") //main menu #define LOC_ATTACH hbTrId("txt_messaging_opt_attach") @@ -324,7 +326,13 @@ { return; } - + if ((messageSubType == ConvergedMessage::VCard) && + (direction == ConvergedMessage::Incoming)) + { + HbAction *contextItem = contextMenu->addAction(LOC_SAVE_TO_CONTACTS); + connect(contextItem, SIGNAL(triggered()),this, SLOT(openItem())); + return; + } if( (sendingState == ConvergedMessage::SentState ) || (sendingState == ConvergedMessage::Resend ) || (sendingState == ConvergedMessage::Failed ) || @@ -546,7 +554,7 @@ { QString service("photos"); QString interface("com.nokia.symbian.IImageFetch"); - QString operation("fetch(void)"); + QString operation("fetch()"); XQAiwRequest* request = NULL; XQApplicationManager appManager; request = appManager.create(service,interface, operation, true); // embedded @@ -576,30 +584,11 @@ //--------------------------------------------------------------- void MsgConversationView::fetchAudio() { - QString service("musicplayer"); - QString interface("com.nokia.symbian.IMusicFetch"); - QString operation("fetch()"); - XQAiwRequest* request = NULL; - XQApplicationManager appManager; - request = appManager.create(service, interface, operation, true); //embedded - request->setSynchronous(true); // synchronous - if(!request) - { - QDEBUG_WRITE("AIW-ERROR: NULL request"); - return; - } - - connect(request, SIGNAL(requestOk(const QVariant&)), - this, SLOT(audiosFetched(const QVariant&))); - connect(request, SIGNAL(requestError(int,const QString&)), - this, SLOT(serviceRequestError(int,const QString&))); - - // Make the request - if (!request->send()) - { - QDEBUG_WRITE_FORMAT("AIW-ERROR: Request Send failed ",request->lastError()); - } - delete request; + // Launch Audio fetcher view + QVariantList params; + params << MsgBaseView::AUDIOFETCHER; // target view + params << MsgBaseView::CV; // source view + emit switchView(params); } //--------------------------------------------------------------- @@ -641,26 +630,6 @@ } //--------------------------------------------------------------- -// MsgConversationView::audiosFetched() -// @see header file -//--------------------------------------------------------------- -void MsgConversationView::audiosFetched(const QVariant& result ) -{ - if(result.canConvert()) - { - QStringList fileList = result.value(); - if ( fileList.size()>0 && !fileList.at(0).isEmpty()) - { - QString filepath(QDir::toNativeSeparators(fileList.at(0))); - QVariantList params; - params << MsgBaseView::ADD_AUDIO; - params << filepath; - launchUniEditor(params); - } - } -} - -//--------------------------------------------------------------- // MsgConversationView::addSubject() // @see header file //--------------------------------------------------------------- @@ -771,7 +740,7 @@ // MsgConversationView::saveContentToDrafts() // @See header //--------------------------------------------------------------- -bool MsgConversationView::saveContentToDrafts() +int MsgConversationView::saveContentToDrafts() { int msgId = INVALID_MSGID; if(!mEditorWidget->content().isEmpty()) @@ -794,7 +763,7 @@ } deactivateInputBlocker(); } - return ((msgId > INVALID_MSGID)? true : false); + return msgId; } //--------------------------------------------------------------- diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/src/msgconversationviewitem.cpp --- a/messagingapp/msgui/conversationview/src/msgconversationviewitem.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/src/msgconversationviewitem.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -27,6 +27,7 @@ #include #include #include +#include // USER INCLUDES #include "msgconversationwidget.h" @@ -41,6 +42,9 @@ const QString ANIMATION_FILE(":/qtg_anim_loading.axml"); const QString ANIMATION_ICON_NAME("qtg_anim_loading"); const QString VCARD_ICON("qtg_large_mycard"); +const QString IMAGE_ICON("qtg_small_image"); +const QString CORRUPTED_ICON("qtg_large_corrupted"); +const QString MSG_VIDEO_ICON("qtg_large_video_player"); // LOCALIZATION #define LOC_RINGING_TONE hbTrId("txt_messaging_dpopinfo_ringing_tone") @@ -286,32 +290,53 @@ //preview image bool hasImage = (msgProperty & EPreviewImage) ? true : false; - if (hasImage) - { - QVariant previewData = index.data(PreviewIcon); - + { + mConversation->setImage(true); HbIcon previewIcon; - previewIcon = qvariant_cast (previewData); - + if (msgProperty & EPreviewProtectedImage) + { + // TODO: Change to official icon. + previewIcon = HbIcon(IMAGE_ICON); + } + else if (msgProperty & EPreviewCorruptedImage) + { + // TODO: Change to official icon. + previewIcon = HbIcon(CORRUPTED_ICON); + } + else + { + QVariant previewData = index.data(PreviewIcon); + previewIcon = qvariant_cast (previewData); + } mConversation->setPreviewIcon(previewIcon); - mConversation->setImage(true); - } + } bool hasVideo = (msgProperty & EPreviewVideo) ? true : false; - if (hasVideo) - { + { mConversation->setVideo(true); - } + } - bool hasAudio = (msgProperty & EPreviewAudio) ? true : false; + bool hasAudio = (msgProperty & EPreviewAudio) ? true : false; if (hasAudio) - { + { mConversation->setAudio(true); - } - - mConversation->displayAudioIcon(); + // Protected content is also set as corrupted hence first check protected. + if (msgProperty & EPreviewProtectedAudio) + { + mConversation->displayAudioIcon(); + } + else if (msgProperty & EPreviewCorruptedAudio) + { + // TODO: Change to official icon. + mConversation->displayAudioIcon(CORRUPTED_ICON); + } + else + { + mConversation->displayAudioIcon(); + } + } int priority = index.data(MessagePriority).toInt(); mConversation->setPriority(priority); @@ -392,15 +417,17 @@ { HbStyle::setItemName(mOutgoingMsgStateIconItem, ""); mOutgoingMsgStateIconItem->setVisible(false); - HbStyle::setItemName(mIncomingMsgStateIconItem, - "msgStateIconIncoming"); + HbStyle::setItemName(mIncomingMsgStateIconItem, "msgStateIconIncoming"); + mIncomingMsgStateIconItem->setIcon(HbIcon()); + mIncomingMsgStateIconItem->setVisible(false); } else { HbStyle::setItemName(mIncomingMsgStateIconItem, ""); mIncomingMsgStateIconItem->setVisible(false); - HbStyle::setItemName(mOutgoingMsgStateIconItem, - "msgStateIconOutgoing"); + HbStyle::setItemName(mOutgoingMsgStateIconItem, "msgStateIconOutgoing"); + mOutgoingMsgStateIconItem->setIcon(HbIcon()); + mOutgoingMsgStateIconItem->setVisible(false); } } @@ -524,8 +551,31 @@ HbStyle::setItemName(mConversation, "msgconvwidget"); mIncomingMsgStateIconItem = new HbIconItem(this); + HbStyle::setItemName(mIncomingMsgStateIconItem, "msgStateIconIncoming"); mOutgoingMsgStateIconItem = new HbIconItem(this); + HbStyle::setItemName(mOutgoingMsgStateIconItem, "msgStateIconOutgoing"); + + HbMainWindow *mainWindow = hbInstance->allMainWindows()[0]; + + connect(mainWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, + SLOT(orientationchanged(Qt::Orientation)), Qt::UniqueConnection); + + // Force polish to get all the sub-item properties right. + polishEvent(); +} + +//--------------------------------------------------------------- +// MsgConversationViewItem::orientationchanged +// @see header file +//--------------------------------------------------------------- +void MsgConversationViewItem::orientationchanged(Qt::Orientation orientation) +{ + QDEBUG_WRITE("MsgConversationViewItem:orientationchanged start.") + + repolish(); + + QDEBUG_WRITE("MsgConversationViewItem:orientationchanged end.") } // EOF diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/src/msgconversationwidget.cpp --- a/messagingapp/msgui/conversationview/src/msgconversationwidget.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/src/msgconversationwidget.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include "debugtraces.h" @@ -43,7 +45,6 @@ const QString MSG_LOW_PRIORITY_ICON("qtg_small_priority_low"); const QString MSG_ATTACH_ICON("qtg_small_attachment"); const QString MSG_AUDIO_ICON("qtg_large_music_player"); -const QString MSG_VIDEO_ICON("qtg_large_video_player"); const QString MSG_AUDIO_PLAY_ICON("qtg_large_music_player"); @@ -115,7 +116,28 @@ mNewFrameItem = new HbFrameItem(this); mNewFrameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesVertical); HbStyle::setItemName(mNewFrameItem, "newItemIcon"); + mSubjectTextItem = new HbTextItem(this); + mSubjectTextItem->setTextWrapping(Hb::TextWordWrap); + HbStyle::setItemName(mSubjectTextItem, "subject"); + mBodyTextItem = new HbTextItem(this); + mBodyTextItem->setTextWrapping(Hb::TextWordWrap); + HbStyle::setItemName(mBodyTextItem, "bodyText"); + mPreviewIconItem = new HbIconItem(this); + mPreviewIconItem->setAlignment(Qt::AlignHCenter | Qt::AlignTop); + HbStyle::setItemName(mPreviewIconItem, "preview"); + mPriorityIconItem = new HbIconItem(this); + HbStyle::setItemName(mPriorityIconItem, "priority"); + mAttachmentIconItem = new HbIconItem(this); + HbStyle::setItemName(mAttachmentIconItem, "attachment"); + mPlayIconItem = new HbIconItem(this); + HbStyle::setItemName(mPlayIconItem, "playIcon"); + mTimeStampTextItem = new HbTextItem(this); + HbStyle::setItemName(mTimeStampTextItem, "timeStamp"); + HbMainWindow *mainWindow = hbInstance->allMainWindows()[0]; + connect(mainWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, + SLOT(orientationchanged(Qt::Orientation)),Qt::UniqueConnection); + polishEvent(); } //--------------------------------------------------------------- @@ -124,11 +146,6 @@ //--------------------------------------------------------------- void MsgConversationWidget::setSubject(const QString &subject) { - if (!mSubjectTextItem) - { - mSubjectTextItem = new HbTextItem(this); - mSubjectTextItem->setTextWrapping(Hb::TextNoWrap); - } HbStyle::setItemName(mSubjectTextItem, "subject"); mSubjectTextItem->setText(subject); mSubjectTextItem->show(); @@ -140,11 +157,6 @@ //--------------------------------------------------------------- void MsgConversationWidget::setBodyText(const QString &body) { - if (!mBodyTextItem) - { - mBodyTextItem = new HbTextItem(this); - mBodyTextItem->setTextWrapping(Hb::TextWordWrap); - } HbStyle::setItemName(mBodyTextItem, "bodyText"); mBodyTextItem->setText(body); @@ -157,13 +169,8 @@ //--------------------------------------------------------------- void MsgConversationWidget::setPreviewIcon(HbIcon& icon) { - QCRITICAL_WRITE("setPreviewIcon start.") + QCRITICAL_WRITE("MsgConversationWidget::setPreviewIcon start.") - if (!mPreviewIconItem) - { - mPreviewIconItem = new HbIconItem(this); - mPreviewIconItem->setAlignment(Qt::AlignHCenter | Qt::AlignTop); - } HbStyle::setItemName(mPreviewIconItem, "preview"); @@ -171,7 +178,7 @@ mPreviewIconItem->setPreferredSize(icon.size()); mPreviewIconItem->show(); - QCRITICAL_WRITE("setPreviewIcon end.") + QCRITICAL_WRITE("MsgConversationWidget::setPreviewIcon end.") } @@ -185,10 +192,6 @@ if (priority) { - if (!mPriorityIconItem) - { - mPriorityIconItem = new HbIconItem(this); - } HbStyle::setItemName(mPriorityIconItem, "priority"); if (ConvergedMessage::Low == priority) { @@ -221,10 +224,6 @@ if (attachment) { - if (!mAttachmentIconItem) - { - mAttachmentIconItem = new HbIconItem(this); - } HbStyle::setItemName(mAttachmentIconItem, "attachment"); mAttachmentIconItem->setIcon(HbIcon(MSG_ATTACH_ICON)); mAttachmentIconItem->show(); @@ -284,27 +283,30 @@ { if (hasAudio()) { - if (hasImage()) + if (!hasImage()) { - if (!mPlayIconItem) + HbStyle::setItemName(mPreviewIconItem, "preview"); + if(iconPath.isEmpty()) { - mPlayIconItem = new HbIconItem(this); + qreal iconSize = 0; + style()->parameter("hb-param-graphic-size-primary-large",iconSize); + HbIcon icon(MSG_AUDIO_PLAY_ICON); + icon.setHeight(iconSize); + icon.setWidth(iconSize); + mPreviewIconItem->setIcon(icon); } - HbStyle::setItemName(mPlayIconItem, "playIcon"); - mPlayIconItem->setIconName(iconPath.isEmpty() ? MSG_AUDIO_PLAY_ICON : iconPath); - mPlayIconItem->show(); + else + { + mPreviewIconItem->setIconName(iconPath); + } + mPreviewIconItem->show(); } else { - if (!mAudioIconItem) - { - mAudioIconItem = new HbIconItem(this); - } - HbStyle::setItemName(mAudioIconItem, "audioIcon"); - mAudioIconItem->setIconName(iconPath.isEmpty() ? MSG_AUDIO_PLAY_ICON : iconPath); - mAudioIconItem->show(); - - } + HbStyle::setItemName(mPlayIconItem, "playIcon"); + mPlayIconItem->setIconName(iconPath.isEmpty() ? MSG_AUDIO_PLAY_ICON : iconPath); + mPlayIconItem->show(); + } } } @@ -315,18 +317,6 @@ void MsgConversationWidget::setVideo(bool video) { mHasVideo = video; - - if (video) - { - if (!mVideoIconItem) - { - mVideoIconItem = new HbIconItem(this); - } - HbStyle::setItemName(mVideoIconItem, "video"); - mVideoIconItem->setIcon(HbIcon(MSG_VIDEO_ICON)); - mVideoIconItem->show(); - - } } //--------------------------------------------------------------- @@ -381,6 +371,8 @@ void MsgConversationWidget::setUnread(bool unread) { mUnread = unread; + // Needed for colour group changes to be visible + QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); } //--------------------------------------------------------------- @@ -439,6 +431,8 @@ case ConvergedMessage::SentState: { mSendingState = Sent; + // Needed for colour group changes to be visible + QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); break; } case ConvergedMessage::Sending: @@ -526,10 +520,6 @@ //--------------------------------------------------------------- void MsgConversationWidget::setTimeStamp(const QString &timeStamp) { - if(!mTimeStampTextItem) - { - mTimeStampTextItem = new HbTextItem(this); - } HbStyle::setItemName(mTimeStampTextItem, "timeStamp"); mTimeStampTextItem->setText(timeStamp); @@ -662,17 +652,7 @@ HbStyle::setItemName(mPriorityIconItem, ""); mPriorityIconItem->hide(); } - - if(mAudioIconItem){ - HbStyle::setItemName(mAudioIconItem, ""); - mAudioIconItem->hide(); - } - - if(mVideoIconItem){ - HbStyle::setItemName(mVideoIconItem, ""); - mVideoIconItem->hide(); - } - + if(mPlayIconItem){ HbStyle::setItemName(mPlayIconItem, ""); mPlayIconItem->hide(); @@ -685,13 +665,66 @@ } //--------------------------------------------------------------- +// MsgConversationWidget::orientationchanged +// @see header file +//--------------------------------------------------------------- +void MsgConversationWidget::orientationchanged(Qt::Orientation orientation) +{ + QDEBUG_WRITE("MsgConversationWidget:orientationchanged start.") + + repolish(); + + QDEBUG_WRITE("MsgConversationWidget:orientationchanged end.") +} + +//--------------------------------------------------------------- +// MsgConversationWidget::polish +// @see header file +//--------------------------------------------------------------- +void MsgConversationWidget::polish(HbStyleParameters ¶ms) +{ + QString bubbleOrig = HbStyle::itemName(mBubbleFrameItem); + QString newItemIconOrig = HbStyle::itemName(mNewFrameItem); + QString subjectOrig = HbStyle::itemName(mSubjectTextItem); + QString bodyTextOrig = HbStyle::itemName(mBodyTextItem); + QString previewOrig = HbStyle::itemName(mPreviewIconItem); + QString priorityOrig = HbStyle::itemName(mPriorityIconItem); + QString attachmentOrig = HbStyle::itemName(mAttachmentIconItem); + QString timeStampOrig = HbStyle::itemName(mTimeStampTextItem); + QString playIconOrig = HbStyle::itemName(mPlayIconItem); + + // Make sure that all the sub-items are polished in every polish. + HbStyle::setItemName(mBubbleFrameItem, "bubble"); + HbStyle::setItemName(mNewFrameItem, "newItemIcon"); + HbStyle::setItemName(mSubjectTextItem, "subject"); + HbStyle::setItemName(mBodyTextItem, "bodyText"); + HbStyle::setItemName(mPreviewIconItem, "preview"); + HbStyle::setItemName(mPriorityIconItem, "priority"); + HbStyle::setItemName(mAttachmentIconItem, "attachment"); + HbStyle::setItemName(mTimeStampTextItem, "timeStamp"); + HbStyle::setItemName(mPlayIconItem, "playIcon"); + + HbWidget::polish(params); + + HbStyle::setItemName(mBubbleFrameItem, bubbleOrig); + HbStyle::setItemName(mNewFrameItem, newItemIconOrig); + HbStyle::setItemName(mSubjectTextItem, subjectOrig); + HbStyle::setItemName(mBodyTextItem, bodyTextOrig); + HbStyle::setItemName(mPreviewIconItem, previewOrig); + HbStyle::setItemName(mPriorityIconItem, priorityOrig); + HbStyle::setItemName(mAttachmentIconItem, attachmentOrig); + HbStyle::setItemName(mTimeStampTextItem, timeStampOrig); + HbStyle::setItemName(mPlayIconItem, playIconOrig); +} + +//--------------------------------------------------------------- // MsgConversationWidget::repolishWidget // @see header file //--------------------------------------------------------------- void MsgConversationWidget::repolishWidget() { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); repolish(); } - + + // EOF diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/src/msgeditorwidget.cpp --- a/messagingapp/msgui/conversationview/src/msgeditorwidget.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/src/msgeditorwidget.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -85,14 +85,15 @@ mMsgEditor->setMaxRows(3); // NOTE: Don't remove this line. HbStyle::setItemName(mMsgEditor, "msgEditor"); - mSendButton = new HbPushButton(this); - HbStyle::setItemName(mSendButton, "sendButton"); + mSendButton = new HbPushButton(this); + HbStyle::setItemName(mSendButton, "sendButton"); + mSendButton->setEnabled(false); + + HbFrameItem* backGround = new HbFrameItem(this); + backGround->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); + mSendButton->setBackgroundItem(backGround); + updateButtonBackground(SEND_BUTTON_DISABLED); mSendButton->setIcon(HbIcon(SEND_ICON)); - mSendButton->setEnabled(false); - HbFrameDrawer* drawer = new HbFrameDrawer(this); - drawer->setFrameType(HbFrameDrawer::NinePieces); - mSendButton->setFrameBackground(drawer); - updateButtonBackground(SEND_BUTTON_DISABLED); mCharCounter = new HbTextItem(this); HbStyle::setItemName(mCharCounter, "charCounter"); @@ -284,14 +285,15 @@ // MsgEditor::updateButtonBackground // @see header //--------------------------------------------------------------- -void MsgEditorWidget::updateButtonBackground(const QString& bg) - { - HbFrameDrawer* drawer = mSendButton->frameBackground(); - if(drawer) - { - drawer->setFrameGraphicsName(bg); - } - } +void MsgEditorWidget::updateButtonBackground(const QString& bg) + { + HbFrameItem* drawer = static_cast(mSendButton->backgroundItem()); + if(drawer) + { + drawer->frameDrawer().setFrameGraphicsName(bg); + } + } + //--------------------------------------------------------------- // MsgEditor::onPressed diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/conversationview/src/msgviewutils.cpp --- a/messagingapp/msgui/conversationview/src/msgviewutils.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/conversationview/src/msgviewutils.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -16,7 +16,7 @@ */ #include "msgviewutils.h" -#include "s60qconversions.h" +#include // --------------------------------------------------------------------------- // Constructor @@ -44,7 +44,7 @@ RFs rfs; RFile file; - HBufC* fileName = S60QConversions::qStringToS60Desc(aFileName); + HBufC* fileName = XQConversions::qStringToS60Desc(aFileName); //TODO: The RFs and RApaLsSession has to be connected 1's, not for every mms @@ -69,7 +69,7 @@ rfs.Close(); apaSession.Close(); - return S60QConversions::s60Desc8ToQString(fileType); + return XQConversions::s60Desc8ToQString(fileType); } } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/eabi/msgaudiofetcheru.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/eabi/msgaudiofetcheru.def Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,24 @@ +EXPORTS + _ZN19MsgAudioFetcherView11initToolBarEv @ 1 NONAME + _ZN19MsgAudioFetcherView11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME + _ZN19MsgAudioFetcherView11qt_metacastEPKc @ 3 NONAME + _ZN19MsgAudioFetcherView13enableToolBarEb @ 4 NONAME + _ZN19MsgAudioFetcherView14initMainWidgetEv @ 5 NONAME + _ZN19MsgAudioFetcherView16staticMetaObjectE @ 6 NONAME DATA 16 + _ZN19MsgAudioFetcherView19getStaticMetaObjectEv @ 7 NONAME + _ZN19MsgAudioFetcherView19removeToolBarActionEv @ 8 NONAME + _ZN19MsgAudioFetcherView23on_leftAction_triggeredEv @ 9 NONAME + _ZN19MsgAudioFetcherView24on_rightAction_triggeredEv @ 10 NONAME + _ZN19MsgAudioFetcherViewC1Ev @ 11 NONAME + _ZN19MsgAudioFetcherViewC2Ev @ 12 NONAME + _ZN19MsgAudioFetcherViewD0Ev @ 13 NONAME + _ZN19MsgAudioFetcherViewD1Ev @ 14 NONAME + _ZN19MsgAudioFetcherViewD2Ev @ 15 NONAME + _ZNK19MsgAudioFetcherView10metaObjectEv @ 16 NONAME + _ZTI19MsgAudioFetcherView @ 17 NONAME + _ZTV19MsgAudioFetcherView @ 18 NONAME + _ZThn16_N19MsgAudioFetcherViewD0Ev @ 19 NONAME + _ZThn16_N19MsgAudioFetcherViewD1Ev @ 20 NONAME + _ZThn8_N19MsgAudioFetcherViewD0Ev @ 21 NONAME + _ZThn8_N19MsgAudioFetcherViewD1Ev @ 22 NONAME + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/eabi/msgsettingsu.def --- a/messagingapp/msgui/eabi/msgsettingsu.def Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -EXPORTS - _ZN14SettingsViewer11iAPSelectorEP11QStringList @ 1 NONAME - _ZN14SettingsViewer11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME - _ZN14SettingsViewer11qt_metacastEPKc @ 3 NONAME - _ZN14SettingsViewer13changeServiceEv @ 4 NONAME - _ZN14SettingsViewer13closeSettingsEv @ 5 NONAME - _ZN14SettingsViewer13createMmsViewEv @ 6 NONAME - _ZN14SettingsViewer13createSmsViewEv @ 7 NONAME - _ZN14SettingsViewer14softkeyClickedEv @ 8 NONAME - _ZN14SettingsViewer15openMmsSettingsEv @ 9 NONAME - _ZN14SettingsViewer15openSmsSettingsEv @ 10 NONAME - _ZN14SettingsViewer16staticMetaObjectE @ 11 NONAME DATA 16 - _ZN14SettingsViewer17changeAccessPointEi @ 12 NONAME - _ZN14SettingsViewer17settingListClosedEv @ 13 NONAME - _ZN14SettingsViewer19getStaticMetaObjectEv @ 14 NONAME - _ZN14SettingsViewer20settingsViewerClosedEv @ 15 NONAME - _ZN14SettingsViewer8initViewEv @ 16 NONAME - _ZN14SettingsViewerC1EP13QGraphicsItem @ 17 NONAME - _ZN14SettingsViewerC2EP13QGraphicsItem @ 18 NONAME - _ZN14SettingsViewerD0Ev @ 19 NONAME - _ZN14SettingsViewerD1Ev @ 20 NONAME - _ZN14SettingsViewerD2Ev @ 21 NONAME - _ZNK14SettingsViewer10metaObjectEv @ 22 NONAME - _ZTI14SettingsViewer @ 23 NONAME - _ZTV14SettingsViewer @ 24 NONAME - _ZThn16_N14SettingsViewerD0Ev @ 25 NONAME - _ZThn16_N14SettingsViewerD1Ev @ 26 NONAME - _ZThn8_N14SettingsViewerD0Ev @ 27 NONAME - _ZThn8_N14SettingsViewerD1Ev @ 28 NONAME - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/eabi/msguiutilsu.def --- a/messagingapp/msgui/eabi/msguiutilsu.def Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/eabi/msguiutilsu.def Wed Jun 23 18:09:17 2010 +0300 @@ -32,16 +32,17 @@ _ZN19MmsConformanceCheck18checkModeForInsertERK7QStringb @ 31 NONAME _ZN19MmsConformanceCheck19getStaticMetaObjectEv @ 32 NONAME _ZN19MmsConformanceCheck19onDialogInsertMediaEP8HbAction @ 33 NONAME - _ZN19MmsConformanceCheck9showPopupERK7QString @ 34 NONAME - _ZN19MmsConformanceCheckC1Ev @ 35 NONAME - _ZN19MmsConformanceCheckC2Ev @ 36 NONAME - _ZN19MmsConformanceCheckD0Ev @ 37 NONAME - _ZN19MmsConformanceCheckD1Ev @ 38 NONAME - _ZN19MmsConformanceCheckD2Ev @ 39 NONAME - _ZNK11MsgSendUtil10metaObjectEv @ 40 NONAME - _ZNK19MmsConformanceCheck10metaObjectEv @ 41 NONAME - _ZTI11MsgSendUtil @ 42 NONAME - _ZTI19MmsConformanceCheck @ 43 NONAME - _ZTV11MsgSendUtil @ 44 NONAME - _ZTV19MmsConformanceCheck @ 45 NONAME + _ZN19MmsConformanceCheck21validateMsgForForwardEi @ 34 NONAME + _ZN19MmsConformanceCheck9showPopupERK7QString @ 35 NONAME + _ZN19MmsConformanceCheckC1Ev @ 36 NONAME + _ZN19MmsConformanceCheckC2Ev @ 37 NONAME + _ZN19MmsConformanceCheckD0Ev @ 38 NONAME + _ZN19MmsConformanceCheckD1Ev @ 39 NONAME + _ZN19MmsConformanceCheckD2Ev @ 40 NONAME + _ZNK11MsgSendUtil10metaObjectEv @ 41 NONAME + _ZNK19MmsConformanceCheck10metaObjectEv @ 42 NONAME + _ZTI11MsgSendUtil @ 43 NONAME + _ZTI19MmsConformanceCheck @ 44 NONAME + _ZTV11MsgSendUtil @ 45 NONAME + _ZTV19MmsConformanceCheck @ 46 NONAME diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/eabi/unifiededitoru.def --- a/messagingapp/msgui/eabi/unifiededitoru.def Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/eabi/unifiededitoru.def Wed Jun 23 18:09:17 2010 +0300 @@ -17,54 +17,53 @@ _ZN20MsgUnifiedEditorView11resizeEventEP25QGraphicsSceneResizeEvent @ 16 NONAME _ZN20MsgUnifiedEditorView12createVCardsERK8QVariantR11QStringList @ 17 NONAME _ZN20MsgUnifiedEditorView13addAttachmentERK7QString @ 18 NONAME - _ZN20MsgUnifiedEditorView13audiosFetchedERK8QVariant @ 19 NONAME - _ZN20MsgUnifiedEditorView13deleteMessageEv @ 20 NONAME - _ZN20MsgUnifiedEditorView13fetchContactsEv @ 21 NONAME - _ZN20MsgUnifiedEditorView13imagesFetchedERK8QVariant @ 22 NONAME - _ZN20MsgUnifiedEditorView14addAttachmentsE11QStringList @ 23 NONAME - _ZN20MsgUnifiedEditorView14changePriorityEv @ 24 NONAME - _ZN20MsgUnifiedEditorView14forwardMessageER18ConvergedMessageIdN16ConvergedMessage11MessageTypeE @ 25 NONAME - _ZN20MsgUnifiedEditorView14sendingOptionsEv @ 26 NONAME - _ZN20MsgUnifiedEditorView15contactsFetchedERK8QVariant @ 27 NONAME - _ZN20MsgUnifiedEditorView15populateContentERK5QListI8QVariantE @ 28 NONAME - _ZN20MsgUnifiedEditorView16createTempFolderEv @ 29 NONAME - _ZN20MsgUnifiedEditorView16enableSendButtonEb @ 30 NONAME - _ZN20MsgUnifiedEditorView16generateFileNameER7QString @ 31 NONAME - _ZN20MsgUnifiedEditorView16onContentChangedEv @ 32 NONAME - _ZN20MsgUnifiedEditorView16removeTempFolderEv @ 33 NONAME - _ZN20MsgUnifiedEditorView16staticMetaObjectE @ 34 NONAME DATA 16 - _ZN20MsgUnifiedEditorView17onDialogDeleteMsgEP8HbAction @ 35 NONAME - _ZN20MsgUnifiedEditorView17openDraftsMessageERK5QListI8QVariantE @ 36 NONAME - _ZN20MsgUnifiedEditorView19getStaticMetaObjectEv @ 37 NONAME - _ZN20MsgUnifiedEditorView19onDialogMmsSettingsEP8HbAction @ 38 NONAME - _ZN20MsgUnifiedEditorView19onDialogSmsSettingsEP8HbAction @ 39 NONAME - _ZN20MsgUnifiedEditorView19saveContentToDraftsEv @ 40 NONAME - _ZN20MsgUnifiedEditorView19serviceRequestErrorEiRK7QString @ 41 NONAME - _ZN20MsgUnifiedEditorView20activateInputBlockerEv @ 42 NONAME - _ZN20MsgUnifiedEditorView21doDelayedConstructionEv @ 43 NONAME - _ZN20MsgUnifiedEditorView22deactivateInputBlockerEv @ 44 NONAME - _ZN20MsgUnifiedEditorView22setAttachOptionEnabledENS_16TBE_AttachOptionEb @ 45 NONAME - _ZN20MsgUnifiedEditorView23handleViewExtnActivatedEP16HbListWidgetItem @ 46 NONAME - _ZN20MsgUnifiedEditorView25populateContentIntoEditorERK16ConvergedMessageb @ 47 NONAME - _ZN20MsgUnifiedEditorView25removeAttachmentContainerEv @ 48 NONAME - _ZN20MsgUnifiedEditorView25updateOtherRecipientCountEb @ 49 NONAME - _ZN20MsgUnifiedEditorView4sendEv @ 50 NONAME - _ZN20MsgUnifiedEditorView7addMenuEv @ 51 NONAME - _ZN20MsgUnifiedEditorView8addCcBccEv @ 52 NONAME - _ZN20MsgUnifiedEditorView8initViewEv @ 53 NONAME - _ZN20MsgUnifiedEditorView8setFocusEP26MsgUnifiedEditorBaseWidget @ 54 NONAME - _ZN20MsgUnifiedEditorView9vkbClosedEv @ 55 NONAME - _ZN20MsgUnifiedEditorView9vkbOpenedEv @ 56 NONAME - _ZN20MsgUnifiedEditorViewC1EP13QGraphicsItem @ 57 NONAME - _ZN20MsgUnifiedEditorViewC2EP13QGraphicsItem @ 58 NONAME - _ZN20MsgUnifiedEditorViewD0Ev @ 59 NONAME - _ZN20MsgUnifiedEditorViewD1Ev @ 60 NONAME - _ZN20MsgUnifiedEditorViewD2Ev @ 61 NONAME - _ZNK20MsgUnifiedEditorView10metaObjectEv @ 62 NONAME - _ZTI20MsgUnifiedEditorView @ 63 NONAME - _ZTV20MsgUnifiedEditorView @ 64 NONAME - _ZThn16_N20MsgUnifiedEditorViewD0Ev @ 65 NONAME - _ZThn16_N20MsgUnifiedEditorViewD1Ev @ 66 NONAME - _ZThn8_N20MsgUnifiedEditorViewD0Ev @ 67 NONAME - _ZThn8_N20MsgUnifiedEditorViewD1Ev @ 68 NONAME + _ZN20MsgUnifiedEditorView13deleteMessageEv @ 19 NONAME + _ZN20MsgUnifiedEditorView13fetchContactsEv @ 20 NONAME + _ZN20MsgUnifiedEditorView13imagesFetchedERK8QVariant @ 21 NONAME + _ZN20MsgUnifiedEditorView14addAttachmentsE11QStringList @ 22 NONAME + _ZN20MsgUnifiedEditorView14changePriorityEv @ 23 NONAME + _ZN20MsgUnifiedEditorView14forwardMessageER18ConvergedMessageIdN16ConvergedMessage11MessageTypeE @ 24 NONAME + _ZN20MsgUnifiedEditorView14sendingOptionsEv @ 25 NONAME + _ZN20MsgUnifiedEditorView15contactsFetchedERK8QVariant @ 26 NONAME + _ZN20MsgUnifiedEditorView15populateContentERK5QListI8QVariantE @ 27 NONAME + _ZN20MsgUnifiedEditorView16createTempFolderEv @ 28 NONAME + _ZN20MsgUnifiedEditorView16enableSendButtonEb @ 29 NONAME + _ZN20MsgUnifiedEditorView16generateFileNameER7QString @ 30 NONAME + _ZN20MsgUnifiedEditorView16onContentChangedEv @ 31 NONAME + _ZN20MsgUnifiedEditorView16removeTempFolderEv @ 32 NONAME + _ZN20MsgUnifiedEditorView16staticMetaObjectE @ 33 NONAME DATA 16 + _ZN20MsgUnifiedEditorView17onDialogDeleteMsgEP8HbAction @ 34 NONAME + _ZN20MsgUnifiedEditorView17openDraftsMessageERK5QListI8QVariantE @ 35 NONAME + _ZN20MsgUnifiedEditorView19getStaticMetaObjectEv @ 36 NONAME + _ZN20MsgUnifiedEditorView19onDialogMmsSettingsEP8HbAction @ 37 NONAME + _ZN20MsgUnifiedEditorView19onDialogSmsSettingsEP8HbAction @ 38 NONAME + _ZN20MsgUnifiedEditorView19saveContentToDraftsEv @ 39 NONAME + _ZN20MsgUnifiedEditorView19serviceRequestErrorEiRK7QString @ 40 NONAME + _ZN20MsgUnifiedEditorView20activateInputBlockerEv @ 41 NONAME + _ZN20MsgUnifiedEditorView21doDelayedConstructionEv @ 42 NONAME + _ZN20MsgUnifiedEditorView22deactivateInputBlockerEv @ 43 NONAME + _ZN20MsgUnifiedEditorView22setAttachOptionEnabledENS_16TBE_AttachOptionEb @ 44 NONAME + _ZN20MsgUnifiedEditorView23handleViewExtnActivatedEP16HbListWidgetItem @ 45 NONAME + _ZN20MsgUnifiedEditorView25populateContentIntoEditorERK16ConvergedMessageb @ 46 NONAME + _ZN20MsgUnifiedEditorView25removeAttachmentContainerEv @ 47 NONAME + _ZN20MsgUnifiedEditorView25updateOtherRecipientCountEb @ 48 NONAME + _ZN20MsgUnifiedEditorView4sendEv @ 49 NONAME + _ZN20MsgUnifiedEditorView7addMenuEv @ 50 NONAME + _ZN20MsgUnifiedEditorView8addCcBccEv @ 51 NONAME + _ZN20MsgUnifiedEditorView8initViewEv @ 52 NONAME + _ZN20MsgUnifiedEditorView8setFocusEP26MsgUnifiedEditorBaseWidget @ 53 NONAME + _ZN20MsgUnifiedEditorView9vkbClosedEv @ 54 NONAME + _ZN20MsgUnifiedEditorView9vkbOpenedEv @ 55 NONAME + _ZN20MsgUnifiedEditorViewC1EP13QGraphicsItem @ 56 NONAME + _ZN20MsgUnifiedEditorViewC2EP13QGraphicsItem @ 57 NONAME + _ZN20MsgUnifiedEditorViewD0Ev @ 58 NONAME + _ZN20MsgUnifiedEditorViewD1Ev @ 59 NONAME + _ZN20MsgUnifiedEditorViewD2Ev @ 60 NONAME + _ZNK20MsgUnifiedEditorView10metaObjectEv @ 61 NONAME + _ZTI20MsgUnifiedEditorView @ 62 NONAME + _ZTV20MsgUnifiedEditorView @ 63 NONAME + _ZThn16_N20MsgUnifiedEditorViewD0Ev @ 64 NONAME + _ZThn16_N20MsgUnifiedEditorViewD1Ev @ 65 NONAME + _ZThn8_N20MsgUnifiedEditorViewD0Ev @ 66 NONAME + _ZThn8_N20MsgUnifiedEditorViewD1Ev @ 67 NONAME diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/inc/msgbaseview.h --- a/messagingapp/msgui/inc/msgbaseview.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/inc/msgbaseview.h Wed Jun 23 18:09:17 2010 +0300 @@ -45,7 +45,8 @@ UNIEDITOR, UNIVIEWER, MSGSETTINGS, - SERVICE + SERVICE, + AUDIOFETCHER }; /** diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgapp/inc/msgactivityhandler.h --- a/messagingapp/msgui/msgapp/inc/msgactivityhandler.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgapp/inc/msgactivityhandler.h Wed Jun 23 18:09:17 2010 +0300 @@ -47,12 +47,6 @@ */ void saveActivity(); - /** - * Open the activity which is requested. - * @param activitry data. - */ - void handleActivity(const QVariant &activityData); - public: /** * Set the message main window pointer. @@ -65,6 +59,14 @@ */ void clearActivities(); + /** + * Parses the activity data. + * @param activitry data. + * @return valid message Id if its editor activity + * else Invalid message id( i.e. -1) for list view activity + */ + int parseActivityData(const QVariant &activityData); + private: /** * main window reference not owned. diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgapp/inc/msgmainwindow.h --- a/messagingapp/msgui/msgapp/inc/msgmainwindow.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgapp/inc/msgmainwindow.h Wed Jun 23 18:09:17 2010 +0300 @@ -40,7 +40,9 @@ /** * Constructor */ - MsgMainWindow(bool serviceRequest, QWidget *parent = 0); + MsgMainWindow(bool serviceRequest, + int activityMsgId = -1, + QWidget *parent = 0); /** * Destructor diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgapp/inc/msgviewmanager.h --- a/messagingapp/msgui/msgapp/inc/msgviewmanager.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgapp/inc/msgviewmanager.h Wed Jun 23 18:09:17 2010 +0300 @@ -20,6 +20,7 @@ #define MSGVIEWMANAGER_H_ #include +#include #include class HbMainWindow; @@ -32,6 +33,7 @@ class MsgSettingsView; class HbAction; class HbView; +class MsgAudioFetcherView; class MsgViewManager: public QObject { @@ -41,7 +43,8 @@ /** * constructor */ - MsgViewManager(bool serviceRequest, HbMainWindow* mainWindow, QObject* parent = 0); + MsgViewManager(bool serviceRequest, HbMainWindow* mainWindow, + QObject* parent = 0,int activityMsgId = -1); /** * Destructor. @@ -88,7 +91,11 @@ * Returns the current active view. */ int currentView(); - + + /** + * Saves the content of editor or Cv to draft. + */ + int saveContentToDraft(); private: /** * swiches back to last view after service request is complete. @@ -163,6 +170,29 @@ * Appends the views to be deleted into a QList to be deleted when view is ready */ void appendViewToBeDeleted(HbView* view); + + /** + * Save the editor data to be populated + * @param editorData QVariantList + */ + void populateUniEditorAfterViewReady(const QVariantList& editorData); + + /** + * Launch Audio fetcher view + */ + void switchToAudioFetcher(const QVariantList& data); + + /** + * opens unieditor as activity. + * @param activityMsgId activity msg id. + */ + void openUniEditorActivity(int activityMsgId); + + /** + * find contact id corresponding to given phone no. + * @param phoneNum + */ + qint32 findContactId(const QString address); private slots: /** @@ -196,6 +226,11 @@ * @param action selected action (yes or no). */ void onDialogSaveTone(HbAction* action); + + /** + * When this slot is called the saved editor data is set to the editor + */ + void populateUniEditorView(); private: /** @@ -212,6 +247,7 @@ UnifiedViewer* mUniViewer; DraftsListView* mDraftsListView; MsgSettingsView* mSettingsView; + MsgAudioFetcherView* mAudioFetcherView; HbAction* mBackAction; int mPreviousView; @@ -223,6 +259,8 @@ QList mViewTobeDeleted; HbView* mDummyview; int mMessageId; + + QVariantList mEditorData; }; #endif /* MSGVIEWMANAGER_H_ */ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgapp/msgapp.pro --- a/messagingapp/msgui/msgapp/msgapp.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgapp/msgapp.pro Wed Jun 23 18:09:17 2010 +0300 @@ -23,6 +23,7 @@ INCLUDEPATH += . INCLUDEPATH += ../inc INCLUDEPATH += ../../../inc +INCLUDEPATH += ../msgaudiofetcher/inc INCLUDEPATH += ../unifiededitor/inc INCLUDEPATH += ../appengine/inc INCLUDEPATH += ../conversationview/inc @@ -99,6 +100,6 @@ -lQtContacts \ -lsettingsview \ -lringbc \ - -lunidatamodelloader - + -lunidatamodelloader \ + -lmsgaudiofetcher diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgapp/src/main.cpp --- a/messagingapp/msgui/msgapp/src/main.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgapp/src/main.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -32,6 +32,7 @@ const QString debugFileName("c:/art2_app_log.txt"); const QString activityParam("-activity"); +const int INVALID_MSGID = -1; #ifdef _DEBUG_TRACES_ void debugInit(QtMsgType type, const char *msg) @@ -123,23 +124,23 @@ MsgActivityHandler* activityHandler = new MsgActivityHandler(&app); - // clear the old activities - activityHandler->clearActivities(); - // connect to aboutToQuit signal to save activity QObject::connect(&app, SIGNAL(aboutToQuit()), activityHandler, SLOT(saveActivity())); - + + int activityMsgId = INVALID_MSGID; if(app.activateReason() == Hb::ActivationReasonActivity) { // restoring an activity, not a fresh startup or a service QVariant data = app.activateData(); - activityHandler->handleActivity(data); + activityMsgId = activityHandler->parseActivityData(data); // set service request to false , since its a activity launch serviceRequest = false; } - + // clear the old activities + activityHandler->clearActivities(); + // Main window - QPointer mainWindow = new MsgMainWindow(serviceRequest); + QPointer mainWindow = new MsgMainWindow(serviceRequest,activityMsgId); // Set the main window pointer to activity handler. activityHandler->setMainWindow(mainWindow); mainWindow->show(); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgapp/src/msgactivityhandler.cpp --- a/messagingapp/msgui/msgapp/src/msgactivityhandler.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgapp/src/msgactivityhandler.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -25,8 +25,10 @@ #include #include +const int INVALID_MSGID = -1; // Activity Names const QString ListViewActivityName("MsgConversationsList"); +const QString EditorActivityName("MsgCreate"); //----------------------------------------------------------------------------- // MsgActivityHandler::MsgActivityHandler @@ -55,18 +57,35 @@ { HbActivityManager* activityManager = qobject_cast(qApp)->activityManager(); - - if( mMainWindow->viewManager()->currentView()== MsgBaseView::CLV) + + int currentView = mMainWindow->viewManager()->currentView(); + int msgId = INVALID_MSGID; + if((currentView == MsgBaseView::CV) || (currentView== MsgBaseView::UNIEDITOR)) + { + msgId = mMainWindow->viewManager()->saveContentToDraft(); + } + + // get a screenshot for saving to the activity manager + QVariantHash metadata; + metadata.insert("screenshot", + QPixmap::grabWidget(mMainWindow, mMainWindow->rect())); + + // save any data necessary to save the state + QByteArray serializedActivity; + QDataStream stream(&serializedActivity, + QIODevice::WriteOnly | QIODevice::Append); + + if( msgId != INVALID_MSGID) { - // get a screenshot for saving to the activity manager - QVariantHash metadata; - metadata.insert("screenshot", - QPixmap::grabWidget(mMainWindow, mMainWindow->rect())); + stream << EditorActivityName; + stream << msgId; - // save any data necessary to save the state - QByteArray serializedActivity; - QDataStream stream(&serializedActivity, - QIODevice::WriteOnly | QIODevice::Append); + // add the activity to the activity manager + bool ok = activityManager->addActivity(EditorActivityName, + serializedActivity, metadata); + } + else + { stream << ListViewActivityName; // add the activity to the activity manager @@ -76,13 +95,22 @@ } //----------------------------------------------------------------------------- -// MsgActivityHandler::handleActivity +// MsgActivityHandler::parseActivityData // @see header //----------------------------------------------------------------------------- -void MsgActivityHandler::handleActivity(const QVariant &activityData) +int MsgActivityHandler::parseActivityData(const QVariant &activityData) { - // To be handled later - Q_UNUSED(activityData) + QByteArray serializedModel = activityData.toByteArray(); + QDataStream stream(&serializedModel, QIODevice::ReadOnly); + + QString activityName; + int msgId = INVALID_MSGID; + stream >> activityName; + if( activityName == EditorActivityName) + { + stream >> msgId; + } + return msgId; } //----------------------------------------------------------------------------- @@ -94,6 +122,7 @@ HbActivityManager* activityManager = qobject_cast(qApp)->activityManager(); activityManager->removeActivity(ListViewActivityName); + activityManager->removeActivity(EditorActivityName); } //----------------------------------------------------------------------------- diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgapp/src/msgmainwindow.cpp --- a/messagingapp/msgui/msgapp/src/msgmainwindow.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgapp/src/msgmainwindow.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -28,10 +28,10 @@ // MsgMainWindow::MsgMainWindow // Constructor //--------------------------------------------------------------- -MsgMainWindow::MsgMainWindow(bool serviceRequest, QWidget *parent) : +MsgMainWindow::MsgMainWindow(bool serviceRequest,int activityMsgId,QWidget *parent) : HbMainWindow(parent), mMsgSI(0), mMsgSendSI(0) { - mViewManager = new MsgViewManager(serviceRequest,this,this); + mViewManager = new MsgViewManager(serviceRequest,this,this,activityMsgId); mMsgSI = new MsgServiceInterface(NULL,mViewManager); mMsgSendSI = new MsgSendServiceInterface(NULL,mViewManager); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgapp/src/msgviewmanager.cpp --- a/messagingapp/msgui/msgapp/src/msgviewmanager.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgapp/src/msgviewmanager.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -39,6 +39,9 @@ #include "ringbc.h" #include "unidatamodelloader.h" #include "unidatamodelplugininterface.h" +#include "msgcontacthandler.h" +#include "debugtraces.h" +#include "msgaudiofetcherview.h" // LOCALIZATION #define LOC_BUTTON_DELETE hbTrId("txt_common_button_delete") @@ -49,10 +52,10 @@ const qint64 NULL_CONVERSATIONID = -1; -MsgViewManager::MsgViewManager(bool serviceRequest, HbMainWindow* mainWindow, QObject* parent) : +MsgViewManager::MsgViewManager(bool serviceRequest, HbMainWindow* mainWindow, QObject* parent,int activityMsgId) : QObject(parent), mMainWindow(mainWindow), mUniEditor(0), mListView(0), mConversationView(0), - mUniViewer(0), mDraftsListView(0), mSettingsView(0), mBackAction(0), mServiceRequest( - serviceRequest), mConversationId(-1), mViewServiceRequest(false),mMessageId(-1) + mUniViewer(0), mDraftsListView(0), mSettingsView(0), mAudioFetcherView(0), mBackAction(0), + mServiceRequest(serviceRequest), mConversationId(-1), mViewServiceRequest(false),mMessageId(-1) { //creating back action. mBackAction = new HbAction(Hb::BackNaviAction, this); @@ -60,10 +63,18 @@ //create clv as first view if not a service request. if (!mServiceRequest) { + + if(activityMsgId == NULL_CONVERSATIONID) + { QVariantList param; param << MsgBaseView::CLV; param << MsgBaseView::CLV; switchView(param); + } + else + { + openUniEditorActivity(activityMsgId); + } } else { @@ -77,6 +88,7 @@ MsgViewManager::~MsgViewManager() { // TODO Auto-generated destructor stub + mEditorData.clear(); } void MsgViewManager::onBackAction() @@ -110,7 +122,7 @@ // reset the conversation id published mConversationView->setPSCVId(false); - + //clearing content of cv. mConversationView->clearContent(); @@ -202,6 +214,18 @@ switchView(param); break; } + case MsgBaseView::AUDIOFETCHER: + { + // switch to CV. + QVariantList param; + param << mPreviousView; + param << MsgBaseView::AUDIOFETCHER; + if(mPreviousView == MsgBaseView::CV) + { + param << mConversationId; + } + switchView(param); + } default: { break; @@ -211,9 +235,10 @@ void MsgViewManager::switchView(const QVariantList& data) { + QCRITICAL_WRITE("MsgViewManager::switchView start."); int viewId = data.at(0).toInt(); - + switch (viewId) { case MsgBaseView::DEFAULT: { @@ -256,7 +281,13 @@ switchToMsgSettings(data); break; } + case MsgBaseView::AUDIOFETCHER: + { + switchToAudioFetcher(data); + break; } + } + QCRITICAL_WRITE("MsgViewManager::switchView end."); } void MsgViewManager::deletePreviousView() @@ -267,7 +298,6 @@ mMainWindow->removeView(v); delete v; } - disconnect(mMainWindow, SIGNAL(viewReady()), this, SLOT(deletePreviousView())); } @@ -366,7 +396,7 @@ if (conversationId < 0) { param << MsgBaseView::CLV; param << MsgBaseView::SERVICE; - + if( mCurrentView == MsgBaseView::CV && mConversationView) { mConversationView->setPSCVId(false); @@ -450,12 +480,26 @@ mCurrentView = MsgBaseView::CLV; mPreviousView = data.at(1).toInt(); - // delete case from viewer service + // delete case from viewer service if (mViewServiceRequest && (mPreviousView == MsgBaseView::UNIVIEWER)) { - // quit the application + // quit the application HbApplication::quit(); } + //delete UniEditor + if (mUniEditor) + { + appendViewToBeDeleted(mUniEditor); + mUniEditor = NULL; + } + + //delete UniViewer + if (mUniViewer) + { + appendViewToBeDeleted(mUniViewer); + mUniViewer = NULL; + } + if (mConversationView) { mConversationView->saveContentToDrafts(); //clearing content of cv. @@ -471,20 +515,6 @@ } mMainWindow->setCurrentView(mListView); - - //delete UniEditor - if (mUniEditor) - { - appendViewToBeDeleted(mUniEditor); - mUniEditor = NULL; - } - - //delete UniViewer - if (mUniViewer) - { - appendViewToBeDeleted(mUniViewer); - mUniViewer = NULL; - } } void MsgViewManager::switchToCv(const QVariantList& data) @@ -495,44 +525,64 @@ // delete case from viewer service if (mViewServiceRequest && (mPreviousView == MsgBaseView::UNIVIEWER)) { - // quit the application + // quit the application HbApplication::quit(); } + // delete Audio Fetcher view + if(mAudioFetcherView) + { + appendViewToBeDeleted(mAudioFetcherView); + mAudioFetcherView = NULL; + } + + //delete UniEditor + if (mUniEditor) + { + appendViewToBeDeleted(mUniEditor); + mUniEditor = NULL; + } + + //delete UniViewer + if (mUniViewer) + { + appendViewToBeDeleted(mUniViewer); + mUniViewer = NULL; + } + QVariant var = data.at(2); qint64 conversationId; if (var.type() == QVariant::String) { QString phoneNumber = var.toString(); - conversationId = findConversationId(phoneNumber); + qint32 contactId = findContactId(phoneNumber); + if (contactId != -1) { + conversationId = ConversationsEngine::instance()->getConversationIdFromContactId(contactId); + } + else { + conversationId = findConversationId(phoneNumber); + } if (conversationId == NULL_CONVERSATIONID) { QVariantList param; param << MsgBaseView::CLV; param << MsgBaseView::CV; - + if( mCurrentView == MsgBaseView::CV && mConversationView){ mConversationView->setPSCVId(false); } - + switchView(param); return; } } else if (var.type() == QVariant::Invalid) { - // this case comes when a message is deleted from - // Unified viewer set curent view as conversation view + // this case comes when a message is deleted from + // Unified viewer set curent view as conversation view // and return mMainWindow->setCurrentView(mConversationView); - + // publish already opened conversation's id mConversationView->setPSCVId(true); - - if (mUniViewer) - { - appendViewToBeDeleted(mUniViewer); - mUniViewer = NULL; - } - return; } else { @@ -554,30 +604,10 @@ mConversationView->saveContentToDrafts(); //clearing content of current cv. mConversationView->clearContent(); - } + } mConversationView->openConversation(conversationId); - - if (mServiceRequest) { - mMainWindow->setCurrentView(mConversationView); - } - else { - mMainWindow->setCurrentView(mConversationView); - } - - //delete UniEditor - if (mUniEditor) - { - appendViewToBeDeleted(mUniEditor); - mUniEditor = NULL; - } - - //delete UniViewer - if (mUniViewer) - { - appendViewToBeDeleted(mUniViewer); - mUniViewer = NULL; - } + mMainWindow->setCurrentView(mConversationView); } void MsgViewManager::switchToDlv(const QVariantList& data) @@ -603,24 +633,40 @@ * Editor is tried to open again before exiting the previously * opened editor. Multi taping in DLV or Forward. */ - if (mUniEditor) { + if (mUniEditor && !mAudioFetcherView) + { return; } mCurrentView = MsgBaseView::UNIEDITOR; mPreviousView = data.at(1).toInt(); - if (mConversationView) { + // delete Audio Fetcher view + if(mAudioFetcherView) + { + appendViewToBeDeleted(mAudioFetcherView); + mAudioFetcherView = NULL; + } + + // delete UniViewer + if (mUniViewer ) + { + appendViewToBeDeleted(mUniViewer); + mUniViewer = NULL; + } + + if (mConversationView) + { //clearing content of cv. mConversationView->clearContent(); } - // reset conversation id published - if(mPreviousView == MsgBaseView::CV && mConversationView) - { - mConversationView->setPSCVId(false); - } - + // reset conversation id published + if(mPreviousView == MsgBaseView::CV && mConversationView) + { + mConversationView->setPSCVId(false); + } + //swich to unieditor. if (!mUniEditor) { mUniEditor = new MsgUnifiedEditorView(); @@ -639,25 +685,15 @@ } if (MsgBaseView::DLV == mPreviousView) { - mUniEditor->openDraftsMessage(editorData); + //Populate editor after view ready indication + populateUniEditorAfterViewReady(editorData); } else { mUniEditor->populateContent(editorData); } } - if (mServiceRequest) { - mMainWindow->setCurrentView(mUniEditor); - } - else { - mMainWindow->setCurrentView(mUniEditor); - } - //delete UniViewer - if (mUniViewer ) - { - appendViewToBeDeleted(mUniViewer); - mUniViewer = NULL; - } + mMainWindow->setCurrentView(mUniEditor); } void MsgViewManager::switchToUniViewer(const QVariantList& data) @@ -679,7 +715,7 @@ qint32 messageId = data.at(3).toInt(); int msgCount = data.at(4).toInt(); int canForwardMessage = data.at(5).toInt(); - + if (!mUniViewer) { mUniViewer = new UnifiedViewer(messageId, canForwardMessage); mUniViewer->setNavigationAction(mBackAction); @@ -687,14 +723,14 @@ connect(mUniViewer, SIGNAL(switchView(const QVariantList&)), this, SLOT(switchView(const QVariantList&))); } - mUniViewer->populateContent(messageId, true, msgCount); + mUniViewer->populateContent(messageId, true, msgCount); } - + if(mPreviousView==MsgBaseView::CV && mConversationView) { mConversationView->setPSCVId(false); } - + mMainWindow->setCurrentView(mUniViewer); } void MsgViewManager::switchToMsgSettings(const QVariantList& data) @@ -703,14 +739,14 @@ mPreviousView = data.at(1).toInt(); if (!mSettingsView) { - + MsgSettingsView::SettingsView view = MsgSettingsView::DefaultView; if (mPreviousView == MsgBaseView::UNIEDITOR || mPreviousView == MsgBaseView::CV) { - view = (MsgSettingsView::SettingsView)data.at(2).toInt(); + view = (MsgSettingsView::SettingsView)data.at(2).toInt(); } - + mSettingsView = new MsgSettingsView(view); mSettingsView->setNavigationAction(mBackAction); mMainWindow->addView(mSettingsView); @@ -881,7 +917,7 @@ { mMainWindow->setInteractive(true); } - + disconnect(mMainWindow, SIGNAL(viewReady()),this,SLOT(setViewInteractive())); } @@ -890,11 +926,38 @@ if (view) { mViewTobeDeleted << view; - connect(mMainWindow, SIGNAL(viewReady()), this, SLOT(deletePreviousView())); + connect(mMainWindow, SIGNAL(viewReady()), this, SLOT(deletePreviousView()), Qt::UniqueConnection); } } // ---------------------------------------------------------------------------- +// MsgViewManager::populateEditorAfterViewReady +// @see header +// ---------------------------------------------------------------------------- +void MsgViewManager::populateUniEditorAfterViewReady(const QVariantList& editorData) + { + //Save the editor data and use it in ViewReady handler + mEditorData = editorData; + connect(mMainWindow, SIGNAL(viewReady()), this, SLOT(populateUniEditorView())); + } + +// ---------------------------------------------------------------------------- +// MsgViewManager::populateUniEditorView +// @see header +// ---------------------------------------------------------------------------- +void MsgViewManager::populateUniEditorView() + { + if (mUniEditor) + { + mUniEditor->openDraftsMessage(mEditorData); + } + mEditorData.clear(); + + disconnect(mMainWindow, SIGNAL(viewReady()), this, + SLOT(populateUniEditorView())); +} + +// ---------------------------------------------------------------------------- // MsgViewManager::onDialogDeleteMsg // @see header // ---------------------------------------------------------------------------- @@ -949,3 +1012,111 @@ { return mCurrentView; } + +// ---------------------------------------------------------------------------- +// MsgViewManager::switchToAudioFetcher +// @see header +// ---------------------------------------------------------------------------- +void MsgViewManager::switchToAudioFetcher(const QVariantList& data) + { + /** + * Audio Fetcher is tried to open again before exiting + * opened editor. + */ + if(mAudioFetcherView) + { + return; + } + + //switch to Audio Fetcher view + mCurrentView = MsgBaseView::AUDIOFETCHER; + mPreviousView = data.at(1).toInt(); + + mAudioFetcherView = new MsgAudioFetcherView(); + mAudioFetcherView->setNavigationAction(mBackAction); + connect(mAudioFetcherView, SIGNAL(switchView(const QVariantList&)), this, + SLOT(switchView(const QVariantList&))); + + if(mPreviousView==MsgBaseView::CV && mConversationView) + { + mConversationView->setPSCVId(false); + } + + mMainWindow->addView(mAudioFetcherView); + mMainWindow->setCurrentView(mAudioFetcherView); + } + +// ---------------------------------------------------------------------------- +// MsgViewManager::saveContentToDraft +// @see header +// ---------------------------------------------------------------------------- +int MsgViewManager::saveContentToDraft() + { + int msgId = NULL_CONVERSATIONID; + if( mCurrentView == MsgBaseView::CV ) + { + msgId = mConversationView->saveContentToDrafts(); + } + else if( mCurrentView ==MsgBaseView::UNIEDITOR) + { + msgId = mUniEditor->saveContentToDrafts(); + } + return msgId; + } + +// ---------------------------------------------------------------------------- +// MsgViewManager::saveContentToDraft +// @see header +// ---------------------------------------------------------------------------- +void MsgViewManager::openUniEditorActivity(int activityMsgId) +{ + int msgType; + int msgSubType; + + qint32 messageId(activityMsgId); + // get the message type + ConversationsEngine::instance()->markAsReadAndGetType(messageId, msgType, msgSubType); + + if (!mUniEditor) { + mUniEditor = new MsgUnifiedEditorView(); + mMainWindow->addView(mUniEditor); + mUniEditor->setNavigationAction(mBackAction); + connect(mUniEditor, SIGNAL(switchView(const QVariantList&)), this, + SLOT(switchView(const QVariantList&))); + } + + // buffer data to open the draft message + ConvergedMessageId convergedMsgId(activityMsgId); + ConvergedMessage message; + message.setMessageType((ConvergedMessage::MessageType) msgType); + message.setMessageId(convergedMsgId); + + // Launch uni-editor view + QByteArray dataArray; + QDataStream messageStream(&dataArray, QIODevice::WriteOnly | QIODevice::Append); + message.serialize(messageStream); + + QVariantList editorData; + editorData << dataArray; + mUniEditor->openDraftsMessage(editorData); + + // set the current view + mCurrentView = MsgBaseView::UNIEDITOR; + mMainWindow->setCurrentView(mUniEditor); +} + +// ---------------------------------------------------------------------------- +// MsgViewManager::findContactId +// @see header +// ---------------------------------------------------------------------------- +qint32 MsgViewManager::findContactId(QString address) + { + QString displayLabel; + int count; + int localId = + MsgContactHandler::resolveContactDisplayName(address, + displayLabel, + count); + + return localId; + } \ No newline at end of file diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetchermodel.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetchermodel.h Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,127 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The header file for messaging's audio fetcher model + * + */ + +#ifndef MSGAUDIOFETCHERMODEL_H +#define MSGAUDIOFETCHERMODEL_H + +// SYSTEM INCLUDES +#include +#include +#include + +// FORWARD DECLARATIONS +class MsgAudioSelectionEngine; + +/** + * @class MsgAudioFetcherModel + * @brief This class is messaging's audio fetcher model + */ +class MsgAudioFetcherModel : public QStandardItemModel +{ +Q_OBJECT + +public: + /** + * Constructor + */ + explicit MsgAudioFetcherModel(QObject *parent); + + /** + * Destructor + */ + virtual ~MsgAudioFetcherModel(); + + /** + * Clears model + */ + void clearAll(); + + /** + * adds a row into the model + */ + void addRow(QString filepath); + +public: //from QAbstractItemModel + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + +private: + /** + * binary search (ascendant) for the correct index to insert. + * @param low the start of search + * @param high the end of search. + * @return the correct index + */ + int insertIndex(int low, int high, QString variant); + + /** + * Add audio files into the model + * @param toneDir, Dir from which to get audio files to add to model + */ + void addToneFiles(QDir& toneDir); + + /** + * Finds and adds audio files into the model + */ + void getRomToneFiles(); + + /** + * Initialize the model + */ + void init(); + + /** + * checks if the given file is DRM protected + * @param filepath, path of audio file + */ + bool isDRM(QString filepath); + +private slots: + /** + * Handle MDS session open + */ + void mdeSessionOpened(); + + /** + * Handle MDS session open error + */ + void mdeSessionError(int error); + + /** + * Handle MDS query complete + */ + void queryComplete(const QStringList &nameList, + const QStringList &uriList); + + /** + * Handle MDS query error + */ + void queryError(int error); + + /** + * Handle object observer callback + */ + void onObjectChanged(); + +private: + /** + * audio selection engine + */ + MsgAudioSelectionEngine* mSelectionEngine; +}; + +#endif /* MsgAudioFetcherModel_H_ */ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetcherview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetcherview.h Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,106 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The header file for messaging's audio fetcher view. + * + */ + +#ifndef MSGAUDIOFETCHERVIEW_H +#define MSGAUDIOFETCHERVIEW_H + +#ifdef BUILD_MSGAUDIOFETCHER_DLL +#define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_EXPORT +#else +#define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_IMPORT +#endif + +// SYSTEM INCLUDES +#include +#include + +// USER INCLUDES +#include "msgbaseview.h" + +// FORWARD DECLARATIONS +class MsgAudioFetcherWidget; +class HbAction; + +/** + * @class MsgAudioFetcherView + * @brief This class is messaging's audio fetcher view + */ +class MSGAUDIOFETCHER_DLL_EXPORT MsgAudioFetcherView : public MsgBaseView +{ +Q_OBJECT + +public: + /** + * Constructor + */ + explicit MsgAudioFetcherView(); + + /** + * Destructor + */ + ~MsgAudioFetcherView(); +private: + /** + * Creates a widget and sets it to the view + */ + void initMainWidget(); + + /** + * Initializes view's toolbar actions + */ + void initToolBar(); + + /** + * tool bar actions must to be removed in case the app crashes. + */ + void removeToolBarAction(); + +private slots: + /** + * Handles toolbar's leftaction (play/pause) + */ + void on_leftAction_triggered(); + + /** + * Handles toolbar's rightaction (select) + */ + void on_rightAction_triggered(); + + /** + * enable toolbar actions, only when an item is selected + */ + void enableToolBar(bool enable); + +private: + /** + * view's main widget + */ + MsgAudioFetcherWidget *mWidget; + + /** + * Toolbar's left action + */ + HbAction *mToolBarLeftAction; + + /** + * Toolbar's right action + */ + HbAction *mToolBarRightAction; +}; + +#endif /* MSGAUDIOFETCHERVIEW_H */ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetcherwidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetcherwidget.h Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The header file for messaging's audio fetcher widget. + * + */ +#ifndef MSGAUDIOFETCHERWIDGET_H +#define MSGAUDIOFETCHERWIDGET_H + +// SYSTEM INCLUDES +#include + +// USER INCLUDES +class HbListView; +class QGraphicsLinearLayout; +class MsgAudioFetcherView; +class MsgAudioFetcherModel; +class HbLabel; +class MsgAudioPreview; + +/** + * @class MsgAudioFetcherWidget + * @brief This class is messaging's audio fetcher view's mainwidget + */ +class MsgAudioFetcherWidget : public HbWidget +{ +Q_OBJECT + +public: + /** + * Constructor + */ + explicit MsgAudioFetcherWidget(); + + /** + * Destructor + */ + ~MsgAudioFetcherWidget(); + + /** + * Get the path of item selected in the list + */ + QString getCurrentItemPath(); + + /** + * Play or pause the audio file + */ + void playOrPause(); + +signals: + /** + * Signal to enable/disable the toolbar + */ + void triggerToolBar(bool enable); + +private slots: + /** + * Handles selection of a list item + */ + void on_list_activated(const QModelIndex &index); +private: + /** + * initializes widget + */ + void init(); + +private: + /** + * label of the list view + * owned + */ + HbLabel *mLabel; + + /** + * list view + * owned + */ + HbListView *mListView; + + /** + * list's layout + * owned + */ + QGraphicsLinearLayout *mLayout; + + /** + * populating model + * owned + */ + MsgAudioFetcherModel *mFetcherModel; + + /** + * For previewing audio files + * owned + */ + MsgAudioPreview* mAudioPreview; + + /** + * selection state + */ + bool mSelected; + + /** + * last selected item + */ + QModelIndex mOldSeletedItem; +}; + +#endif /* MSGAUDIOFETCHERWIDGET_H_ */ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/inc/msgaudiopreview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudiopreview.h Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,211 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The header file for tone previewing. + * + */ + +#ifndef MSGAUDIOPPREVIEW_H +#define MSGAUDIOPPREVIEW_H + +#include +#include +#include +#include +#include +#include // for RApaLsSession +#include +#include + +class C3DRingingToneInterface; +class RWindow; + +/** + * CMFPreviewHandlerBase + * + * Base class for CMFAudioPreviewHandler. + */ +class CMFPreviewHandlerBase: public QObject, public CBase + +{ +Q_OBJECT +public: + + enum TMediaFileType + { + EMediaFileTypeAudio = 0, EMediaFileTypeVideo + }; + enum TPlayerStatus + { + EPlayerNotCreated, + EPlayerInitializing, + EPlayerReady, + EPlayerPlaying, + EPlayerInitialized, + EPlayerPlayingWith3DEffect + }; + + // these must match with the ones in Profile Engine + enum TRingingTypes + { + ERingingTypeRinging = 0, + ERingingTypeAscending, + ERingingTypeRingOnce, + ERingingTypeBeepOnce, + ERingingTypeSilent + }; + + enum TFLAllowScreenSaver + { + EFLScreenSaverAllowed = 0, EFLScreenSaverNotAllowed + }; + +protected: + + virtual ~CMFPreviewHandlerBase(); + +protected: + + /** + * C++ default constructor. + */ + CMFPreviewHandlerBase(QObject *parent); + + /** + * By default Symbian OS constructor is private. + */ + void ConstructL(); + +public: + void SetAttr(const QString &file); + TInt Attr(TInt aAttr); + virtual void Play() = 0; + virtual void Stop() = 0; + virtual TBool IsPlaying() = 0; + QString normalizeSeperator(const QString &path); +protected: + TInt ConvertVolume(TInt aVolume); + void ReadActiveProfileL(); + TInt GetDataType(const TDesC& aFileName, TDataType& aDataType); + void ReadDefaultToneL(); + + void DisableBackLight(); + + static TInt DoResetInactivityTimer(TAny* aObject); +protected: + TInt RingingVolume(); + TInt RingingType(); + TInt Vibra(); + TInt Echo3D(); + TInt Effect3D(); + +protected: + static TInt ConvertVolume(TInt aVolume, TInt aMaxVolume); + +protected: + TInt iRingingVolume; + TInt iRingingType; + TInt iVibra; + TInt i3DEffect; + TInt i3DEcho; + TInt iMediaType; + TInt iFileSize; + HBufC* iFullName; + + TBool iActiveProfileRead; + TInt iActiveProfileRingingVolume; + TInt iActiveProfileRingingType; + TInt iActiveProfileVibra; + TInt iActiveProfile3DEffect; + TInt iActiveProfile3DEcho; + + TInt iPlayerStatus; + + // handle to window + RWindow* iWindow; // does not own + + // for getting file MIME types + RApaLsSession iApaSession; + + // for setting screensaver on/off + RProperty iProperty; + + // default ringing tone + TFileName iDefaultTone; + + /** + * Timer for resetting the user inactivity timeout + */ + CPeriodic* iBacklightTimer; +}; + +// CLASS DECLARATION +/** + * This class is used for previewing the tones. + * + */ + +class MsgAudioPreview: public CMFPreviewHandlerBase, + public MDrmAudioPlayerCallback, + public MMdaAudioToneObserver + +{ +Q_OBJECT +public: + MsgAudioPreview(QObject *parent); + virtual ~MsgAudioPreview(); +signals: + // void notifyPreviewEvent(ToneFetcherEngine::TPreviewEvent event, int errorId); + +public: + void Play(); + void Stop(); + TBool IsPlaying(); + +private: + void Cancel(); + void SetAudioRingingType(TInt aRingingType); + void SetToneRingingType(TInt aRingingType); + TInt ConvertVolume(TInt aVolume); + void PlayL(); + +private: + // from MMdaAudioToneObserver + virtual void MatoPrepareComplete(TInt aError); + virtual void MatoPlayComplete(TInt aError); + +private: + // from MDrmAudioPlayerCallback + void MdapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration); + void MdapcPlayComplete(TInt aError); + +private: + // audio player + CDrmPlayerUtility* iAudioPlayer; + + /// Audioplayer status + TPlayerStatus iAudioPlayerStatus; + + /// toneplayer + CMdaAudioToneUtility* iTonePlayer; + + /// Toneplayer status + TPlayerStatus iTonePlayerStatus; + + // plugin for playing 3D effects + C3DRingingToneInterface* i3dRingingTonePlugin; + +}; + +#endif /* MSGAUDIOPPREVIEW_H */ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/inc/msgaudioselectionengine.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudioselectionengine.h Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,138 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The header file for mde tone fetcher. + * + */ +#ifndef MSGAUDIOSELECTIONENGINE_H +#define MSGAUDIOSELECTIONENGINE_H + +// SYSTEM INCLUDES +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// FORWARD DECLARATIONS + +/** + * This class is used for quering tones from mde. + */ +class MsgAudioSelectionEngine : public QObject, + public CBase, + public MMdESessionObserver, + public MMdEQueryObserver, + public MMdEObjectObserver, + public MMdEObjectPresentObserver +{ +Q_OBJECT + +public: + + enum TStorageType + { + EPhoneMemory = 0, ERomStorage, EMassStorage, EMemoryCard + }; + + enum TQueryAttribute + { + EAttrMediaType = 20, // integer + EAttrFileSize, // integer + EAttrStorageType, // integer + EAttrMediaFileId, // integer + EAttrFileName, // string + EAttrFullName, // string + EAttrSongName, // string + EAttrArtist, // string + EAttrAlbum, // string + EAttrGenre, // string + EAttrComposer + // string + }; + +public: + MsgAudioSelectionEngine(); + virtual ~MsgAudioSelectionEngine(); + void CreateMetaDataSession(); +signals: + void mdeSessionOpened(); + void mdeSessionError(int error); + void queryComplete(QStringList nameList, QStringList uriList); + void queryError(int error); + void notifyObjectChanged(); + +public: + static CMdEPropertyDef& PropertyDefL(CMdESession* aSession, TInt aAttr); + void QueryTones(); + void SetAttr(int attr, int value); + +private: + void LeaveIfSessionClosedL(); + CMdEPropertyDef& PropertyDefL(TInt aAttr); + void QueryTonesL(); + void HandleQueryCompletedL(CMdEQuery& aQuery, TInt aError); + +private: + // from MMdESessionObserver + void HandleSessionOpened(CMdESession& aSession, TInt aError); + void HandleSessionError(CMdESession& aSession, TInt aError); + +private: + // from MMdEQueryObserver (mdequery.h) + void HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex, + TInt aNewItemCount); + void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError); +private: + // from MMdEObjectObserver + void HandleObjectNotification(CMdESession& aSession, + TObserverNotificationType aType, + const RArray& aObjectIdArray); + +private: + // from MMdEObjectPresentObserver + void HandleObjectPresentNotification(CMdESession& aSession, + TBool aPresent, const RArray& aObjectIdArray); + void AddObjectObserverL(); +private: + + + // session to metadata engine + CMdESession* iSession; + + // metadata query + CMdEObjectQuery* iQuery; + + // used for saving the quering result. + //both name and uri. + QStringList iNameList; + QStringList iUriList; + + // is metadata session open + TBool iSessionOpen; + + // max audio file file size + TInt iMaxFileSize; + + // query error + TInt iQueryError; +}; +#endif /* MSGAUDIOSELECTIONENGINE_H */ + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/msgaudiofetcher.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/msgaudiofetcher.pro Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,81 @@ +# +# Copyright (c) 2009 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +TEMPLATE = lib +TARGET = msgaudiofetcher +DEFINES += BUILD_MSGAUDIOFETCHER_DLL + +DEPENDPATH += . \ + inc \ + src + +INCLUDEPATH += ../inc +INCLUDEPATH += ../../../inc +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + +CONFIG += hb + +TARGET.UID3 = 0x2001FE67 +TARGET.CAPABILITY = All -TCB +TARGET.EPOCALLOWDLLDATA = 1 + +# Platforms +SYMBIAN_PLATFORMS = WINSCW \ + ARMV5 + +# Build.inf rules +BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " \ + "rom/msgaudiofetcher.iby CORE_APP_LAYER_IBY_EXPORT_PATH(msgaudiofetcher.iby)" + +# Input +HEADERS += msgaudioselectionengine.h \ + msgaudiofetchermodel.h \ + msgaudiofetcherwidget.h \ + msgaudiofetcherview.h \ + msgaudiopreview.h \ + ../inc/msgbaseview.h + +SOURCES += msgaudioselectionengine.cpp \ + msgaudiofetchermodel.cpp \ + msgaudiofetcherwidget.cpp \ + msgaudiofetcherview.cpp \ + msgaudiopreview.cpp + +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/msgaudiofetcher.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/msgaudiofetcher.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + +# Libs +LIBS += -lconvergedmessageutils \ + -lxqutils \ + -lmdeclient \ + -lcentralrepository \ + -lProfileEng \ + -lmediaclientaudio \ + -lDrmAudioPlayUtility \ + -lDRMCommon \ + -lDrmRights \ + -lDrmHelper \ + -ldrmutility \ + -lapmime \ + -lecom \ + -lxqservice \ + -lapgrfx diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/rom/msgaudiofetcher.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/rom/msgaudiofetcher.iby Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,23 @@ +/* +* Copyright (c) 2009 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __MSGAUDIOFETCHER_IBY__ +#define __MSGAUDIOFETCHER_IBY__ + +REM DLL +file=ABI_DIR\UREL\msgaudiofetcher.dll SHARED_LIB_DIR\msgaudiofetcher.dll + +#endif // __MSGAUDIOFETCHER_IBY__ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/src/msgaudiofetchermodel.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/src/msgaudiofetchermodel.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,192 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The source file for messaging's audio fetcher model + */ + +// SYSTEM INCLUDES +#include +#include + +// USER INCLUDES +#include "msgaudiofetchermodel.h" +#include "msgaudioselectionengine.h" + +MsgAudioFetcherModel::MsgAudioFetcherModel(QObject *parent) : + QStandardItemModel(parent), mSelectionEngine(0) +{ + init(); +} + +MsgAudioFetcherModel::~MsgAudioFetcherModel() +{ + delete mSelectionEngine; +} + +void MsgAudioFetcherModel::init() +{ + mSelectionEngine = new MsgAudioSelectionEngine(); + + connect(mSelectionEngine, SIGNAL(mdeSessionOpened()), this, SLOT(mdeSessionOpened())); + connect(mSelectionEngine, SIGNAL(mdeSessionError(int)), this, SLOT(mdeSessionError(int))); + connect(mSelectionEngine, SIGNAL(queryComplete(QStringList, QStringList)), this, + SLOT(queryComplete(QStringList, QStringList))); + connect(mSelectionEngine, SIGNAL(queryError(int)), this, SLOT(queryError(int))); + + connect(mSelectionEngine, SIGNAL(notifyObjectChanged()), this, SLOT(onObjectChanged())); + mSelectionEngine->CreateMetaDataSession(); +} + +void MsgAudioFetcherModel::getRomToneFiles() +{ + // z:\data\sounds\digital + QDir digitalsoundPath(XQUtils::romRootPath() + XQUtils::digitalSoundsPath()); + addToneFiles(digitalsoundPath); + + //z:\data\sounds\simple + QDir simpleSoundPath(XQUtils::romRootPath() + XQUtils::simpleSoundsPath()); + addToneFiles(simpleSoundPath); + + //z:\data\sounds + QDir soundPath(XQUtils::romRootPath() + XQUtils::soundsPath()); + addToneFiles(soundPath); +} + +void MsgAudioFetcherModel::addToneFiles(QDir& toneDir) +{ + // List only xx.amr files + QStringList filters; + filters << "*.amr"; + toneDir.setNameFilters(filters); + + QStringList soundList = toneDir.entryList(); + for (int i = 0; i < soundList.size(); ++i) { + QString fullPath = QDir::toNativeSeparators(toneDir.absolutePath()); + fullPath.append(QDir::separator()); + fullPath.append(soundList.at(i)); + addRow(fullPath); + } +} + +QVariant MsgAudioFetcherModel::data(const QModelIndex &index, int role) const +{ + return QStandardItemModel::data(index, role); +} + +void MsgAudioFetcherModel::addRow(QString filepath) +{ + if(isDRM(filepath)) + { + // don't insert DRM protected files, as sending itself + // is not allowed in 'Restricted Mode' + return; + } + + QFileInfo fInfo(filepath); + QStandardItem* item = new QStandardItem(); + QString filename = fInfo.baseName(); + item->setData(filename, Qt::DisplayRole); + item->setData(filepath, Qt::UserRole); + + // get insert index + int index = this->insertIndex(0, rowCount(), filename); + insertRow(index, item); +} + +int MsgAudioFetcherModel::insertIndex(int low, int high, QString value) +{ + if (low == high) { + return low; + } + int middle = (low + high - 1) / 2; + QModelIndex lowItemIndex = ((QStandardItemModel *) this)->index(low, 0); + QModelIndex highItemIndex = ((QStandardItemModel *) this)->index(high - 1, 0); + QModelIndex middleItemIndex = ((QStandardItemModel *) this)->index(middle, 0); + QString lowString = data(lowItemIndex).toString(); + QString highString = data(highItemIndex).toString(); + QString middleString = data(middleItemIndex).toString(); + + if (value >= highString) { + return high; + } + if (value < lowString) { + return low; + } + high = high - 1; + while (low < high) { + middle = (low + high) / 2; + middleItemIndex = ((QStandardItemModel *) this)->index(middle, 0); + middleString = data(middleItemIndex).toString(); + if (value >= middleString) { + low = middle + 1; + } + else { + high = middle; + } + } + return low; +} + +void MsgAudioFetcherModel::clearAll() +{ + QStandardItemModel::clear(); +} + +void MsgAudioFetcherModel::mdeSessionOpened() +{ + mSelectionEngine->QueryTones(); + getRomToneFiles(); +} + +void MsgAudioFetcherModel::queryComplete(const QStringList &nameList, const QStringList &uriList) +{ + for (int i = 0; i < nameList.size(); ++i) { + addRow(uriList.at(i)); + } +} + +void MsgAudioFetcherModel::queryError(int error) +{ + Q_UNUSED(error); +} + +void MsgAudioFetcherModel::mdeSessionError(int error) +{ + Q_UNUSED(error); +} + +void MsgAudioFetcherModel::onObjectChanged() +{ + clearAll(); + getRomToneFiles(); + mSelectionEngine->QueryTones(); +} + +bool MsgAudioFetcherModel::isDRM(QString filepath) +{ + QList attrNames; + attrNames.append(XQApplicationManager::IsProtected); + + QFile file(filepath); + QVariantList attrValues; + XQApplicationManager appmgr; + bool ok = appmgr.getDrmAttributes(file, attrNames, attrValues); + if(!ok) + { + return true; + } + return (0 < attrValues.at(0).toInt()); +} + +//End of File diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/src/msgaudiofetcherview.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/src/msgaudiofetcherview.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,110 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The source file for messaging's audio fetcher view. + * + */ + +// SYSTEM INCLUDES +#include +#include + +// USER INCLUDES +#include "msgaudiofetcherview.h" +#include "msgaudiofetcherwidget.h" +#include "convergedmessage.h" + +MsgAudioFetcherView::MsgAudioFetcherView() +{ + initToolBar(); + initMainWidget(); + QMetaObject::connectSlotsByName(this); +} + +MsgAudioFetcherView::~MsgAudioFetcherView() +{ + removeToolBarAction(); +} + +void MsgAudioFetcherView::initMainWidget() +{ + mWidget = new MsgAudioFetcherWidget(); + Q_ASSERT(mWidget); + setWidget(mWidget); + connect(mWidget, SIGNAL(triggerToolBar(bool)), this, SLOT(enableToolBar(bool))); +} + +void MsgAudioFetcherView::initToolBar() +{ + mToolBarLeftAction = new HbAction(this); + mToolBarLeftAction->setObjectName("leftAction"); + //TODO: need localized string + mToolBarLeftAction->setText(hbTrId("Play/Pause")); + toolBar()->addAction(mToolBarLeftAction); + mToolBarLeftAction->setEnabled(false); + + mToolBarRightAction = new HbAction(this); + mToolBarRightAction->setObjectName("rightAction"); + //TODO: need localized string + mToolBarRightAction->setText(hbTrId("Select")); + mToolBarRightAction->setEnabled(false); + toolBar()->addAction(mToolBarRightAction); + + toolBar()->setOrientation(Qt::Horizontal); + toolBar()->setEnabled(false); +} + +void MsgAudioFetcherView::removeToolBarAction() +{ + toolBar()->removeAction(mToolBarRightAction); + toolBar()->removeAction(mToolBarLeftAction); +} + +void MsgAudioFetcherView::on_leftAction_triggered() +{ + mWidget->playOrPause(); +} + +void MsgAudioFetcherView::on_rightAction_triggered() +{ + // param list for switching to editor view + QVariantList params; + QByteArray dataArray; + QDataStream messageStream + (&dataArray, QIODevice::WriteOnly | QIODevice::Append); + + ConvergedMessage message; + QString filepath(mWidget->getCurrentItemPath()); + ConvergedMessageAttachment* attachment = + new ConvergedMessageAttachment(filepath); + ConvergedMessageAttachmentList attachmentList; + attachmentList.append(attachment); + message.addAttachments(attachmentList); + + message.serialize(messageStream); + params << MsgBaseView::UNIEDITOR; + params << MsgBaseView::AUDIOFETCHER; + params << dataArray; + params << MsgBaseView::ADD_AUDIO; + emit switchView(params); +} + +void MsgAudioFetcherView::enableToolBar(bool enable) +{ + mToolBarRightAction->setEnabled(enable); + mToolBarLeftAction->setEnabled(enable); + toolBar()->setEnabled(enable); +} + +//End of File diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/src/msgaudiofetcherwidget.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/src/msgaudiofetcherwidget.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2009 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The source file for messaging's audio fetcher widget. + * + */ + +// SYSTEM INCLUDES +#include +#include +#include +#include +#include + +// USER INCLUDES +#include "msgaudiofetcherwidget.h" +#include "msgaudiofetchermodel.h" +#include "msgaudiopreview.h" + +// LOCALIZED CONSTANTS +#define LOC_SELECT_SOUND hbTrId("txt_messaging_title_select_a_sound") + + +MsgAudioFetcherWidget::MsgAudioFetcherWidget() + : HbWidget(this), + mLabel(0), + mListView(0), + mLayout(0), + mFetcherModel(0), + mAudioPreview(0), + mSelected(false) +{ + init(); +} + +MsgAudioFetcherWidget::~MsgAudioFetcherWidget() +{ +} + +QString MsgAudioFetcherWidget::getCurrentItemPath() +{ + QModelIndexList modelIndexList = mListView->selectionModel()->selectedIndexes(); + if(modelIndexList.count() > 0) + { + QModelIndex index = modelIndexList.at(0); + QString temppath = + mFetcherModel->data(index, Qt::UserRole).toString(); + return QDir::toNativeSeparators(temppath); + } + return QString(); +} + +void MsgAudioFetcherWidget::playOrPause() +{ + mAudioPreview->SetAttr(getCurrentItemPath()); + mAudioPreview->Play(); +} + +void MsgAudioFetcherWidget::on_list_activated(const QModelIndex &index) +{ + QModelIndexList modelIndexList = mListView->selectionModel()->selectedIndexes(); + + //stop previewing when clicking another item. + if (mAudioPreview->IsPlaying()) { + mAudioPreview->SetAttr(getCurrentItemPath()); + mAudioPreview->Play(); + + } + + /* + * when one item is selected, reselecting it will deselect it. selecting another + * will also deselect it, while the other is selected. + */ + if(mSelected) + { + if(mOldSeletedItem != index) + { + mListView->selectionModel()->select(index, QItemSelectionModel::Select); + mOldSeletedItem = index; + emit triggerToolBar(true); + } + else + { + mListView->selectionModel()->select(index, QItemSelectionModel::Deselect); + mSelected = false; + emit triggerToolBar(false); + } + return; + } + + if(modelIndexList.count() > 0) + { + QModelIndexList::const_iterator it; + for(it=modelIndexList.begin(); it!=modelIndexList.end(); ++it) + { + if((*it) == index) + { + mSelected = true; + mOldSeletedItem = index; + emit triggerToolBar(true); + } + } + } +} + +void MsgAudioFetcherWidget::init() +{ + mLayout = new QGraphicsLinearLayout(this); + mLayout->setOrientation(Qt::Vertical); + setLayout(mLayout); + + mLabel = new HbLabel(this); + // TODO: need localized string + mLabel->setPlainText(LOC_SELECT_SOUND); + mLayout->addItem(mLabel); + + mListView = new HbListView(this); + mListView->setObjectName("list"); + mLayout->addItem(mListView); + mListView->setSelectionMode(HbAbstractItemView::SingleSelection); + + mFetcherModel = new MsgAudioFetcherModel(this); + mListView->setModel(mFetcherModel); + connect(mListView, SIGNAL(activated(QModelIndex)), + this, SLOT(on_list_activated(QModelIndex))); + mAudioPreview = new MsgAudioPreview(this); +} + +//End of File diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/src/msgaudiopreview.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/src/msgaudiopreview.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,629 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The source file for tone previewing. + * + */ +#include "msgaudiopreview.h" +#include // KAudioPriorityPreview +#include // C3DRingingToneInterface +#include // for phone call states +#include +#include +#include +#include "TProfileToneSettings.h" +#include +#include +#include +#include // KProEngDefaultRingingTone +#include +#include +#include + + +CMFPreviewHandlerBase::CMFPreviewHandlerBase( QObject *parent ) : QObject( parent ) + { + iMediaType = KErrNotFound; + iRingingVolume = KErrNotFound; + iRingingType = KErrNotFound; + iVibra = KErrNotFound; + i3DEffect = KErrNotFound; + i3DEcho = KErrNotFound; + iFileSize = KErrNotFound; + iFullName = 0; + iActiveProfileRead = EFalse; + iPlayerStatus = EPlayerNotCreated; + + } + +void CMFPreviewHandlerBase::ConstructL() + { + // To allow/not allow screensaver + // Errors ignored, no actions needed if API is not available + //iProperty.Attach( KPSUidScreenSaver, KScreenSaverAllowScreenSaver ); + TRAP_IGNORE(User::LeaveIfError( iApaSession.Connect() ) ); + + TRAP_IGNORE( ReadDefaultToneL() ); + // To keep backlight on while a video is being previewed + iBacklightTimer = CPeriodic::NewL( EPriorityLow ); + } + +CMFPreviewHandlerBase::~CMFPreviewHandlerBase() + { + delete iFullName; + iProperty.Close(); + iApaSession.Close(); + } + +void CMFPreviewHandlerBase::SetAttr(const QString &file ) + { + if ( !file.isNull() ) + { + QString path = normalizeSeperator(file); + delete iFullName; + iFullName = 0; + iFullName = XQConversions::qStringToS60Desc( path ); + } + } + +TInt CMFPreviewHandlerBase::RingingVolume() + { + const TInt KDefaultVolumeLevel = 7; // see profile.hrh for volume levels + + if ( iRingingVolume != KErrNotFound ) + { + return iRingingVolume; + } + + if ( iActiveProfileRead ) + { + return iActiveProfileRingingVolume; + } + + return KDefaultVolumeLevel; + } + +TInt CMFPreviewHandlerBase::RingingType() + { + if ( iRingingType != KErrNotFound ) + { + return iRingingType; + } + + if ( iActiveProfileRead ) + { + return iActiveProfileRingingType; + } + + return ERingingTypeRinging; + } + +TInt CMFPreviewHandlerBase::Vibra() + { + if ( iVibra != KErrNotFound ) + { + return iVibra; + } + + if ( iActiveProfileRead ) + { + return iActiveProfileVibra; + } + + return 0; // in case of error vibra is off + } + +TInt CMFPreviewHandlerBase::Echo3D() + { + if ( i3DEcho != KErrNotFound ) + { + return i3DEcho; + } + + if ( iActiveProfileRead ) + { + return iActiveProfile3DEcho; + } + + return EProfile3DEchoOff; // from ProfileInternal.hrh + } + +TInt CMFPreviewHandlerBase::Effect3D() + { + if ( i3DEffect != KErrNotFound ) + { + return i3DEffect; + } + + if ( iActiveProfileRead ) + { + return iActiveProfile3DEffect; + } + + return EProfile3DEffectOff; + } + +TInt CMFPreviewHandlerBase::ConvertVolume( TInt aVolume, TInt aMaxVolume ) + { + const TInt KMinVolumeLevel = 1; + const TInt KMaxVolumeLevel = 10; + + TInt result = aMaxVolume * aVolume / KMaxVolumeLevel; + + // if user has selected minimum volume level set HW volume 1 + if ( aVolume == KMinVolumeLevel && result == 0 ) + { + result = 1; + } + + return result; + } + +void CMFPreviewHandlerBase::ReadActiveProfileL() + { + iActiveProfileRead = EFalse; + + MProfileEngine* profileEngine = CreateProfileEngineL(); + CleanupReleasePushL( *profileEngine ); + + MProfile* activeProfile = profileEngine->ActiveProfileL(); + CleanupReleasePushL( *activeProfile ); + + const MProfileTones& profileTones = activeProfile->ProfileTones(); + + const TProfileToneSettings& toneSettings = profileTones.ToneSettings(); + iActiveProfileVibra = toneSettings.iVibratingAlert; + iActiveProfileRingingVolume = toneSettings.iRingingVolume; + iActiveProfileRingingType = toneSettings.iRingingType; + + const MProfileExtraSettings& extra = activeProfile->ProfileExtraSettings(); + const MProfile3DToneSettings& threeD = extra.Profile3DToneSettings(); + + iActiveProfile3DEffect = threeD.Effect(); + iActiveProfile3DEcho = threeD.Echo(); + + CleanupStack::PopAndDestroy( activeProfile ); + CleanupStack::PopAndDestroy( profileEngine ); + + iActiveProfileRead = ETrue; + } + +void CMFPreviewHandlerBase::ReadDefaultToneL() + { + CRepository* cenrep = CRepository::NewLC( KCRUidProfileEngine ); + + User::LeaveIfError( cenrep->Get( KProEngDefaultRingingTone, iDefaultTone ) ); + CleanupStack::PopAndDestroy( cenrep ); + } + +TInt CMFPreviewHandlerBase::GetDataType( const TDesC& aFileName, TDataType& aDataType ) + { + TUid dummyUid( KNullUid ); + return iApaSession.AppForDocument( aFileName, dummyUid, aDataType ); + } + +TInt CMFPreviewHandlerBase::DoResetInactivityTimer( TAny* /*aObject*/ ) + { + User::ResetInactivityTime(); + return KErrNone; + } + +void CMFPreviewHandlerBase::DisableBackLight() + { + const TInt KResetInactivityTimerDelay = 2000000; + iBacklightTimer->Cancel(); // Just in case + // Disable backlight turn off during video preview + iBacklightTimer->Start( KResetInactivityTimerDelay, + KResetInactivityTimerDelay, + TCallBack( DoResetInactivityTimer, 0 ) ); + + } + + + +MsgAudioPreview::MsgAudioPreview( QObject *parent ) : CMFPreviewHandlerBase( parent ) + { + iAudioPlayerStatus = EPlayerNotCreated; + TRAP_IGNORE(CMFPreviewHandlerBase::ConstructL()); + iTonePlayerStatus = EPlayerNotCreated; + } + +MsgAudioPreview::~MsgAudioPreview() + { + Cancel(); + + delete iAudioPlayer; + delete iTonePlayer; + delete i3dRingingTonePlugin; + } + +TBool MsgAudioPreview::IsPlaying() + { + if ( iAudioPlayerStatus != EPlayerNotCreated ) + { + return ETrue; + } + + if ( iTonePlayerStatus != EPlayerNotCreated ) + { + return ETrue; + } + + return EFalse; + } + +void MsgAudioPreview::Play() + { + TRAP_IGNORE(PlayL()); + } + +void MsgAudioPreview::PlayL() + { + if( IsPlaying() ) + { + Stop(); + return; + } + //sequence for playing a beep once sound + _LIT8( KFileListBeepSequence, "\x00\x11\x06\x0A\x08\x73\x0A\x40\x28\x0A\xF7\ + \x05\xFC\x40\x64\x0A\x08\x40\x32\x0A\xF7\x06\x0B" ); + + // rng mime type + _LIT( KFileListRngMimeType, "application/vnd.nokia.ringing-tone" ); + + Cancel(); // stop previous play + + if ( !iFullName || iFullName->Des().Length() == 0 ) + { + User::Leave( KErrNotFound ); + } + + TRAP_IGNORE( ReadActiveProfileL() ); + + TPtrC fileName( iFullName->Des() ); + TDataType dataType; + TInt err = GetDataType( fileName, dataType ); + if ( err == KErrNotFound ) + { + fileName.Set( iDefaultTone ); + if ( fileName.Length() == 0 ) + { + User::Leave( KErrNotFound ); + } + } + else if ( err != KErrNone ) + { + User::Leave( err ); + } + + TBool mimeTypeRng = EFalse; + + if ( err == KErrNone ) + { + if( dataType.Des().CompareF( KFileListRngMimeType ) == 0 ) + { + mimeTypeRng = ETrue; + } + } + + TInt ringingType = RingingType(); + if ( ringingType == ERingingTypeBeepOnce ) + { + // Active profile ringing tone is set to Beep Once + // Don't initialize a FileSequence but use DesSequence instead + iTonePlayer = CMdaAudioToneUtility::NewL( *this ); + iTonePlayer->PrepareToPlayDesSequence( KFileListBeepSequence() ); + iTonePlayerStatus = EPlayerInitializing; + } + else + { + if( mimeTypeRng ) + { + //Ringingtone is a RNG-file + iTonePlayer = CMdaAudioToneUtility::NewL( *this ); + iTonePlayer->PrepareToPlayFileSequence( fileName ); + iTonePlayerStatus = EPlayerInitializing; + } + else + { + delete iAudioPlayer; + iAudioPlayer = 0; + + iAudioPlayer = CDrmPlayerUtility::NewFilePlayerL( + fileName, *this, KAudioPriorityRingingTonePreview, + ( TMdaPriorityPreference )KAudioPrefRingFilePreview ); + + iAudioPlayerStatus = EPlayerInitializing; + } + } + DisableBackLight(); + } + +void MsgAudioPreview::Stop() + { + Cancel(); + } + +TInt MsgAudioPreview::ConvertVolume( TInt aVolume ) + { + TInt result = 0; + if ( iAudioPlayer ) + { + result = CMFPreviewHandlerBase::ConvertVolume( aVolume, iAudioPlayer->MaxVolume() ); + } + else if ( iTonePlayer ) + { + result = CMFPreviewHandlerBase::ConvertVolume( aVolume, iTonePlayer->MaxVolume() ); + } + + //if user has selected silent ringing type, set volume off + TInt ringingType = RingingType(); + if( ringingType == ERingingTypeSilent ) + { + result = 0; + } + + return result; + } + +void MsgAudioPreview::SetToneRingingType( TInt aRingingType ) + { + const TInt KToneInterval = 1000000; // 1 second pause between tones + const TInt KAscendingVolumeInterval = 3000000; // 3 seconds + + if ( !iTonePlayer ) + { + return; + } + + + TInt ringingVolume = RingingVolume(); + + switch( aRingingType ) + { + case ERingingTypeRinging: + case ERingingTypeSilent: + { + iTonePlayer->SetRepeats( KMdaAudioToneRepeatForever, + TTimeIntervalMicroSeconds( KToneInterval ) ); + break; + } + case ERingingTypeAscending: + { + iTonePlayer->SetRepeats( KMdaAudioToneRepeatForever, + TTimeIntervalMicroSeconds( KToneInterval ) ); + + TInt volRamp = KAscendingVolumeInterval * ringingVolume; + iTonePlayer->SetVolumeRamp( TTimeIntervalMicroSeconds( volRamp ) ); + break; + } + case ERingingTypeRingOnce: + case ERingingTypeBeepOnce: + { + iTonePlayer->SetRepeats( 0, TTimeIntervalMicroSeconds( KToneInterval ) ); + break; + } + default: + { + break; + } + } + } + +void MsgAudioPreview::SetAudioRingingType( TInt aRingingType ) + { + const TInt KToneInterval = 1000000; // 1 second pause between tones + const TInt KAscendingVolumeInterval = 3000000; // 3 seconds + + if ( !iAudioPlayer ) + { + return; + } + + TInt ringingVolume = RingingVolume(); + + switch( aRingingType ) + { + case ERingingTypeRinging: + case ERingingTypeSilent: + { + iAudioPlayer->SetRepeats( KMdaAudioToneRepeatForever, + TTimeIntervalMicroSeconds( KToneInterval ) ); + break; + } + case ERingingTypeAscending: + { + iAudioPlayer->SetRepeats( KMdaAudioToneRepeatForever, + TTimeIntervalMicroSeconds( KToneInterval ) ); + TInt volRamp = KAscendingVolumeInterval * ringingVolume; + iAudioPlayer->SetVolumeRamp( TTimeIntervalMicroSeconds( volRamp ) ); + break; + } + case ERingingTypeRingOnce: + { + iAudioPlayer->SetRepeats( 0, TTimeIntervalMicroSeconds( KToneInterval ) ); + break; + } + + default: + { + break; + } + } + } + +void MsgAudioPreview::Cancel() + { + TBool isPlaying = EFalse; + + if ( iAudioPlayer ) + { + isPlaying = ETrue; + if ( iAudioPlayerStatus == EPlayerPlayingWith3DEffect ) + { + i3dRingingTonePlugin->Stop(); + // plugin calls AudioPlayer->Stop() + iAudioPlayer->Close(); + } + if ( iAudioPlayerStatus == EPlayerPlaying ) + { + iAudioPlayer->Stop(); + iAudioPlayer->Close(); + } + + delete iAudioPlayer; + iAudioPlayer = 0; + iAudioPlayerStatus = EPlayerNotCreated; + } + + if ( iTonePlayer ) + { + isPlaying = ETrue; + if ( iTonePlayerStatus == EPlayerPlaying ) + { + iTonePlayer->CancelPlay(); + } + + delete iTonePlayer; + iTonePlayer = 0; + iTonePlayerStatus = EPlayerNotCreated; + } + + + if ( isPlaying ) + { + //User::InfoPrint(_L("cancel")); +// EnableScreenSaver( ETrue ); + iBacklightTimer->Cancel(); + } + } + +void MsgAudioPreview::MatoPlayComplete( TInt aError ) + { + Q_UNUSED(aError); + Cancel(); + // emit notifyPreviewEvent( ToneFetcherEngine::EAudioPreviewComplete, aError ); + } + +void MsgAudioPreview::MatoPrepareComplete( TInt aError ) + { + if ( aError != KErrNone ) + { + Cancel(); + + // emit notifyPreviewEvent( ToneFetcherEngine::EPreviewError, aError ); + return; + } + + TInt ringingVolume = RingingVolume(); + TInt ringingType = RingingType(); + TInt vibra = Vibra(); + + iTonePlayerStatus = EPlayerInitialized; + SetToneRingingType( ringingType ); + iTonePlayer->SetVolume( ConvertVolume( ringingVolume ) ); + + TMdaPriorityPreference pref = (TMdaPriorityPreference) KAudioPrefRingFilePreview; + if ( vibra ) + { + pref = (TMdaPriorityPreference) KAudioPrefRingFilePreviewVibra; + } + iTonePlayer->SetPriority( KAudioPriorityPreview, pref ); + + iTonePlayer->Play(); + iTonePlayerStatus = EPlayerPlaying; + } + +void MsgAudioPreview::MdapcInitComplete( TInt aError, + const TTimeIntervalMicroSeconds& /* aDuration */ ) + { + if ( aError != KErrNone ) + { + Cancel(); + // emit notifyPreviewEvent( ToneFetcherEngine::EPreviewError, aError ); + return; + } + + + TInt ringingVolume = RingingVolume(); + TInt ringingType = RingingType(); + TInt vibra = Vibra(); + TInt echo3D = Echo3D(); + TInt effect3D = Effect3D(); + + + + iAudioPlayerStatus = EPlayerInitialized; + SetAudioRingingType( ringingType ); + iAudioPlayer->SetVolume( ConvertVolume( ringingVolume ) ); + + TMdaPriorityPreference pref = (TMdaPriorityPreference) KAudioPrefRingFilePreview; + if ( vibra ) + { + pref = (TMdaPriorityPreference) KAudioPrefRingFilePreviewVibra; + } + iAudioPlayer->SetPriority( KAudioPriorityPreview, pref ); + + iAudioPlayerStatus = EPlayerPlaying; + + if ( effect3D == EProfile3DEffectOff ) + { + iAudioPlayer->Play(); // 3D not used + return; + } + + if ( !i3dRingingTonePlugin ) + { + TUid emptyUid = { 0 }; + TRAPD( err, i3dRingingTonePlugin = C3DRingingToneInterface::NewL( emptyUid ) ); + if ( err != KErrNone || !i3dRingingTonePlugin ) + { + iAudioPlayer->Play(); + return; + } + } + + i3dRingingTonePlugin->SetAttr( E3DRTIAttr3DEffect, effect3D ); + i3dRingingTonePlugin->SetAttr( E3DRTIAttr3DEcho, echo3D ); + i3dRingingTonePlugin->SetAttr( E3DRTIAttrDrmPlayerUtility, iAudioPlayer ); + TRAP_IGNORE( i3dRingingTonePlugin->PlayL() ); + + iAudioPlayerStatus = EPlayerPlayingWith3DEffect; + } + +void MsgAudioPreview::MdapcPlayComplete( TInt aError ) + { + Q_UNUSED(aError); + Cancel(); + // emit notifyPreviewEvent( ToneFetcherEngine::EAudioPreviewComplete, aError ); + + + } + + +QString CMFPreviewHandlerBase::normalizeSeperator(const QString &path) +{ + QString standardpath( path ); + QChar c('/'); + QChar c1('\\'); + if (standardpath.contains(c, Qt::CaseSensitive)) { + standardpath.replace(c, QDir::separator()); + } + if (standardpath.contains(c1, Qt::CaseSensitive)) { + standardpath.replace(c1, QDir::separator()); + } + return standardpath; +} + + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgaudiofetcher/src/msgaudioselectionengine.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/src/msgaudioselectionengine.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -0,0 +1,279 @@ +/* + * Copyright (c) 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" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The source file for mde tone fetcher. + * + */ + +// SYSTEM INCLUDES +#include +#include +#include +#include +#include + +// USER INCLUDES +#include "msgaudioselectionengine.h" + +// CONSTANTS +_LIT( KAmrMime, "audio/amr" ); + +MsgAudioSelectionEngine::MsgAudioSelectionEngine() + { + + } + +MsgAudioSelectionEngine::~MsgAudioSelectionEngine() + { + delete iQuery; + delete iSession; + } + + +void MsgAudioSelectionEngine::CreateMetaDataSession() +{ + TRAP_IGNORE(iSession = CMdESession::NewL(*this)); +} + + +void MsgAudioSelectionEngine::HandleSessionOpened(CMdESession& /*aSession*/, + TInt aError) + { + if (aError != KErrNone) + { + delete iSession; + iSession = 0; + iSessionOpen = EFalse; + emit mdeSessionError(aError); + } + else + { + iSessionOpen = ETrue; + TRAP_IGNORE( AddObjectObserverL() ); + emit mdeSessionOpened(); + } + } + +void MsgAudioSelectionEngine::HandleSessionError(CMdESession& /*aSession*/, + TInt aError) + { + if (aError == KErrNone) + { + return; + } + + delete iSession; + iSession = 0; + iSessionOpen = EFalse; + emit mdeSessionError(aError); + } + +void MsgAudioSelectionEngine::HandleQueryNewResults(CMdEQuery& /*aQuery*/, + TInt /*aFirstNewItemIndex*/, TInt /*aNewItemCount*/) + { + } + +void MsgAudioSelectionEngine::HandleObjectNotification( + CMdESession& /*aSession*/, TObserverNotificationType aType, + const RArray& /*aObjectIdArray*/) + { + if (aType == ENotifyAdd || aType == ENotifyModify || aType + == ENotifyRemove) + { + emit notifyObjectChanged(); + } + } + +void MsgAudioSelectionEngine::AddObjectObserverL() + { + if (iSessionOpen) + { + TUint32 notificationType = ENotifyAdd | ENotifyModify | ENotifyRemove; + User::LeaveIfNull(iSession); + CMdENamespaceDef& defNS = iSession->GetDefaultNamespaceDefL(); + iSession->AddObjectObserverL(*this, 0, notificationType, &defNS); + iSession->AddObjectPresentObserverL(*this); + } + } + +void MsgAudioSelectionEngine::HandleObjectPresentNotification( + CMdESession& /*aSession*/, TBool /*aPresent*/, + const RArray& aObjectIdArray) + { + if (aObjectIdArray.Count() > 0) + { + emit notifyObjectChanged(); + } + } + +void MsgAudioSelectionEngine::HandleQueryCompleted(CMdEQuery& aQuery, + TInt aError) + { + TRAP_IGNORE(HandleQueryCompletedL(aQuery, aError)); + } + +void MsgAudioSelectionEngine::HandleQueryCompletedL(CMdEQuery& aQuery, + TInt aError) + { + iNameList.clear(); + iUriList.clear(); + if (aError == KErrCancel) + { + emit queryError(aError); + return; + } + else + { + CMdEObjectQuery* query = static_cast (&aQuery); + TInt count = query->Count(); + for (TInt i = 0; i < count; ++i) + { + CMdEObject* object = + (CMdEObject*) query->TakeOwnershipOfResult(i); + CleanupStack::PushL(object); + CMdEPropertyDef& propDef = MsgAudioSelectionEngine::PropertyDefL( + iSession, MsgAudioSelectionEngine::EAttrFileName); + + CMdEProperty* property = 0; + TInt err = object->Property(propDef, property, 0); + if (err != KErrNotFound && property) + { + QString songName(XQConversions::s60DescToQString( + property->TextValueL())); + QString uriValue(XQConversions::s60DescToQString( + object->Uri())); + iNameList.append(songName); + iUriList.append(uriValue); + } + CleanupStack::PopAndDestroy(object); + } + emit queryComplete(iNameList, iUriList); + } + } + +void MsgAudioSelectionEngine::QueryTones() + { + TRAP_IGNORE(QueryTonesL()); + } + +void MsgAudioSelectionEngine::QueryTonesL() + { + LeaveIfSessionClosedL(); + CMdENamespaceDef& defNS = iSession->GetDefaultNamespaceDefL(); + CMdEObjectDef& musicObjectDef = defNS.GetObjectDefL( + MdeConstants::Audio::KAudioObject); + + delete iQuery; + iQuery = 0; + iQuery = iSession->NewObjectQueryL(defNS, musicObjectDef, this); + CMdEPropertyDef& titlePropertyDef = musicObjectDef.GetPropertyDefL( + MdeConstants::Object::KTitleProperty); + CMdEPropertyDef& typePropertyDef = musicObjectDef.GetPropertyDefL( + MdeConstants::Object::KItemTypeProperty); + + // set attributes that are included in query result + iQuery->AddPropertyFilterL(&titlePropertyDef); + iQuery->AddPropertyFilterL(&typePropertyDef); + + iQuery->SetResultMode(EQueryResultModeItem); + + + // get root condition + CMdELogicCondition& conditions = iQuery->Conditions(); + conditions.AddPropertyConditionL(typePropertyDef, + ETextPropertyConditionCompareEquals, KAmrMime); + + iQuery->FindL(); + } + +void MsgAudioSelectionEngine::LeaveIfSessionClosedL() + { + if (!iSession || !iSessionOpen) + { + User::Leave(KErrDisconnected); + } + } + +CMdEPropertyDef& MsgAudioSelectionEngine::PropertyDefL(TInt aAttr) + { + User::LeaveIfNull(iSession); + return PropertyDefL(iSession, aAttr); + } + +CMdEPropertyDef& MsgAudioSelectionEngine::PropertyDefL(CMdESession* aSession, + TInt aAttr) + { + CMdENamespaceDef& defNS = aSession->GetDefaultNamespaceDefL(); + + CMdEObjectDef& objectDef = defNS.GetObjectDefL( + MdeConstants::Audio::KAudioObject); + + if (aAttr == EAttrFileSize) + { + return objectDef.GetPropertyDefL(MdeConstants::Object::KSizeProperty); + } + else if (aAttr == EAttrMediaType) + { + return objectDef.GetPropertyDefL( + MdeConstants::Object::KItemTypeProperty); + } + else if (aAttr == EAttrSongName || aAttr == EAttrFileName) + { + return objectDef.GetPropertyDefL(MdeConstants::Object::KTitleProperty); + } + else if (aAttr == EAttrArtist) + { + return objectDef.GetPropertyDefL( + MdeConstants::MediaObject::KArtistProperty); + } + else if (aAttr == EAttrAlbum) + { + return objectDef.GetPropertyDefL(MdeConstants::Audio::KAlbumProperty); + } + else if (aAttr == EAttrGenre) + { + return objectDef.GetPropertyDefL( + MdeConstants::MediaObject::KGenreProperty); + } + else if (aAttr == EAttrComposer) + { + return objectDef.GetPropertyDefL( + MdeConstants::Audio::KComposerProperty); + } + else + { + User::Leave(KErrNotSupported); + } + + return objectDef.GetPropertyDefL(MdeConstants::Object::KTitleProperty); + } + + +void MsgAudioSelectionEngine::SetAttr(int attr, int value) + { + switch (attr) + { + case MsgAudioSelectionEngine::EAttrFileSize: + { + iMaxFileSize = value; + break; + } + default: + { + break; + } + } +} +// End of File + diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msgui.pro --- a/messagingapp/msgui/msgui.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msgui.pro Wed Jun 23 18:09:17 2010 +0300 @@ -19,6 +19,7 @@ SYMBIAN_PLATFORMS = WINSCW ARMV5 # DLLs +SUBDIRS += msgaudiofetcher/msgaudiofetcher.pro SUBDIRS += msguiutils/msguiutils.pro SUBDIRS += appengine/appengine.pro SUBDIRS += conversationview/conversationview.pro diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msguiutils/inc/mmsconformancecheck.h --- a/messagingapp/msgui/msguiutils/inc/mmsconformancecheck.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msguiutils/inc/mmsconformancecheck.h Wed Jun 23 18:09:17 2010 +0300 @@ -70,6 +70,16 @@ */ int checkModeForInsert(const QString& file,bool showNote = true); + /** + * Validates if message can be forwarded + * The validation checks include slide count check,MMS size check and + * media conformance checks and this fucntion should be called only for mms + * @param messageId message Id of the message to be validate + * @return true if message can be forwarded + * false if message cant be forwarded + */ + bool validateMsgForForward(int messageId); + private: /* diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msguiutils/msguiutils.pro --- a/messagingapp/msgui/msguiutils/msguiutils.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msguiutils/msguiutils.pro Wed Jun 23 18:09:17 2010 +0300 @@ -24,7 +24,6 @@ INCLUDEPATH += ../../../inc INCLUDEPATH += ../../msgutils/unieditorutils/editorgenutils/inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE CONFIG += hb @@ -43,6 +42,16 @@ BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " \ "rom/msguiutils.iby CORE_APP_LAYER_IBY_EXPORT_PATH(msguiutils.iby)" + +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/msguiutils.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/msguiutils.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + # Input HEADERS += msgsendutil.h \ mmsconformancecheck.h \ @@ -60,11 +69,11 @@ -leditorgenutils \ -lconvergedmessageutils \ -lcentralrepository \ - -ls60qconversions \ -lDRMHelper \ -lmsgmedia \ -lapmime \ -lunidatamodelloader \ - -lxqutils + -lxqutils \ + -lefsrv + - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/msguiutils/src/mmsconformancecheck.cpp --- a/messagingapp/msgui/msguiutils/src/mmsconformancecheck.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/msguiutils/src/mmsconformancecheck.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -34,12 +34,13 @@ #include "unidatamodelloader.h" #include "unidatamodelplugininterface.h" #include "UniEditorGenUtils.h" // This is needed for KDefaultMaxSize -#include "s60qconversions.h" +#include #include "debugtraces.h" //DEFINES #define RMODE_INSERT_ERROR hbTrId("Unable to insert. Object format not supported in restricted creation mode.") #define INSERT_ERROR hbTrId("txt_messaging_dpopinfo_unable_to_attach_item_file") +#define INSERT_PROTECTED_ERROR hbTrId("txt_messaging_dpopinfo_unable_to_attach_protected") #define INSERT_QUERY_CONFRM hbTrId("The receiving phone may not support this object. Continue?") // ----------------------------------------------------------------------------- // MmsConformanceCheck::MmsConformanceCheck @@ -49,7 +50,7 @@ { QDEBUG_WRITE("MmsConformanceCheck::MmsConformanceCheck start"); - TRAP_IGNORE( + TRAP_IGNORE( CRepository* repository = CRepository::NewL(KCRUidMmsEngine); CleanupStack::PushL(repository); @@ -63,7 +64,7 @@ repository->Get( KMmsEngineMaximumSendSize, maxSize ); iMaxMmsSize = maxSize; - CleanupStack::PopAndDestroy(repository); + CleanupStack::PopAndDestroy(repository); ); QDEBUG_WRITE("MmsConformanceCheck::MmsConformanceCheck end"); @@ -86,33 +87,33 @@ bool showNote) { QDEBUG_WRITE("MmsConformanceCheck::CheckModeForInsert start"); - HBufC* filePath = S60QConversions::qStringToS60Desc(file); + HBufC* filePath = XQConversions::qStringToS60Desc(file); if (filePath) { CleanupStack::PushL(filePath); CMmsConformance* mmsConformance = CMmsConformance::NewL(); mmsConformance->CheckCharacterSet(EFalse); - + CleanupStack::PushL(mmsConformance); - - CMsgMediaResolver* mediaResolver = CMsgMediaResolver::NewL(); + + CMsgMediaResolver* mediaResolver = CMsgMediaResolver::NewL(); mediaResolver->SetCharacterSetRecognition(EFalse); - + CleanupStack::PushL(mediaResolver); - + RFile fileHandle = mediaResolver->FileHandleL(*filePath); CleanupClosePushL(fileHandle); CMsgMediaInfo* info = mediaResolver->CreateMediaInfoL(fileHandle); mediaResolver->ParseInfoDetailsL(info,fileHandle); - + TMmsConformance conformance = mmsConformance->MediaConformance(*info); iConfStatus = conformance.iConfStatus; CleanupStack::PopAndDestroy(4); - + // In "free" mode user can insert images that are larger by dimensions than allowed by conformance if (iCreationMode != EMmsCreationModeRestricted) { @@ -152,7 +153,15 @@ // "Not conformant" assumed if check fails. if(showNote) { - showPopup(INSERT_ERROR); + // For protected objects. + if (EFileProtNoProtection != info->Protection()) + { + showPopup(INSERT_PROTECTED_ERROR); + } + else + { + showPopup(INSERT_ERROR); + } } return EInsertNotSupported; @@ -163,6 +172,78 @@ return EInsertSuccess; } +// --------------------------------------------------------- +// MmsConformanceCheck::validateMsgForForward +// --------------------------------------------------------- +// +bool MmsConformanceCheck::validateMsgForForward(int messageId) +{ + UniDataModelLoader* pluginLoader = new UniDataModelLoader(); + UniDataModelPluginInterface* pluginInterface = + pluginLoader->getDataModelPlugin(ConvergedMessage::Mms); + pluginInterface->setMessageId(messageId); + + //Check if slide count is greater than 1 + if (pluginInterface->slideCount() > 1) + { + delete pluginLoader; + return false; + } + + //Check if message size is inside max mms composition limits + if (pluginInterface->messageSize() > iMaxMmsSize) + { + return false; + } + + //If there is restricted content then return false + UniMessageInfoList slideContentList = pluginInterface->slideContent(0); + bool retValue = true; + + for (int i = 0; i < slideContentList.size(); ++i) + { + if (checkModeForInsert(slideContentList.at(i)->path(), false) + != EInsertSuccess) + { + retValue = false; + break; + } + } + + foreach(UniMessageInfo *slide,slideContentList) + { + delete slide; + } + + if (!retValue) + { + delete pluginLoader; + + return false; + } + + UniMessageInfoList modelAttachmentList = pluginInterface->attachmentList(); + + for (int i = 0; i < modelAttachmentList.count(); ++i) + { + if (checkModeForInsert(modelAttachmentList.at(i)->path(), false) + != EInsertSuccess) + { + retValue = false; + break; + } + } + + foreach(UniMessageInfo *attachment,modelAttachmentList) + { + delete attachment; + } + + delete pluginLoader; + + return retValue; +} + // ----------------------------------------------------------------------------- // MmsConformanceCheck::onDialogInsertMedia // ----------------------------------------------------------------------------- diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiededitor/inc/msgunieditorview.h --- a/messagingapp/msgui/unifiededitor/inc/msgunieditorview.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiededitor/inc/msgunieditorview.h Wed Jun 23 18:09:17 2010 +0300 @@ -75,7 +75,7 @@ /** * Saves the content inside editor to save */ - void saveContentToDrafts(); + int saveContentToDrafts(); protected: /** @@ -222,11 +222,6 @@ void imagesFetched(const QVariant& result ); /** - * slot to fetch audio files - */ - void audiosFetched(const QVariant& result ); - - /** * slot to receive fetched contacts */ void contactsFetched(const QVariant& value); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiededitor/src/msgunieditorattachment.cpp --- a/messagingapp/msgui/unifiededitor/src/msgunieditorattachment.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiededitor/src/msgunieditorattachment.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -36,7 +36,7 @@ #include "msgcontactsutil.h" #include "msgunieditorattachment.h" #include "UniEditorGenUtils.h" -#include "s60qconversions.h" +#include #include "msgunieditorutils.h" // Constants @@ -176,9 +176,9 @@ bool MsgUnifiedEditorAttachment::isMultimediaContent() { bool ret = true; - QString vcard = S60QConversions::s60Desc8ToQString(KMsgMimeVCard()); - QString vcal = S60QConversions::s60Desc8ToQString(KMsgMimeVCal()); - QString ical = S60QConversions::s60Desc8ToQString(KMsgMimeICal()); + QString vcard = XQConversions::s60Desc8ToQString(KMsgMimeVCard()); + QString vcal = XQConversions::s60Desc8ToQString(KMsgMimeVCal()); + QString ical = XQConversions::s60Desc8ToQString(KMsgMimeICal()); if( !QString::compare(mMimeType, vcard, Qt::CaseInsensitive) || !QString::compare(mMimeType, vcal, Qt::CaseInsensitive) || !QString::compare(mMimeType, ical, Qt::CaseInsensitive) ) diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp --- a/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -41,13 +41,13 @@ #include #include #include - +#include // USER INCLUDES #include "msgunieditorbody.h" #include "UniEditorGenUtils.h" #include "UniSendingSettings.h" #include "msgunieditormonitor.h" -#include "s60qconversions.h" + #include "mmsconformancecheck.h" #include "unieditorpluginloader.h" #include "unieditorplugininterface.h" @@ -209,7 +209,7 @@ if( error == KErrNone) { mMediaResolver->SetCharacterSetRecognition(EFalse); - HBufC *name = S60QConversions::qStringToS60Desc(imagefile); + HBufC *name = XQConversions::qStringToS60Desc(imagefile); RFile file; TRAP(error, file = mMediaResolver->FileHandleL(*name)); if(error == KErrNone) @@ -636,7 +636,7 @@ if (aEvent == EUniEditorProcessImageOperationComplete && aFileName.Length() > 0) { - mImageFile = S60QConversions::s60DescToQString(aFileName); + mImageFile = XQConversions::s60DescToQString(aFileName); } else { diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiededitor/src/msgunieditorlineedit.cpp --- a/messagingapp/msgui/unifiededitor/src/msgunieditorlineedit.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiededitor/src/msgunieditorlineedit.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -106,10 +106,10 @@ {// all user inputs get appended at the end this->setCursorPosition(this->text().length()); } - - HbAbstractEdit::inputMethodEvent(event); - event->accept(); } + + HbAbstractEdit::inputMethodEvent(event); + event->accept(); } void MsgUnifiedEditorLineEdit::keyPressEvent(QKeyEvent *event) diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp --- a/messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -1055,12 +1055,13 @@ } } -void MsgUnifiedEditorView::saveContentToDrafts() +int MsgUnifiedEditorView::saveContentToDrafts() { if(!mCanSaveToDrafts) { - return; + return mOpenedMessageId.getId(); // return currently opened message id } + activateInputBlocker(); ConvergedMessage::MessageType messageType = MsgUnifiedEditorMonitor::messageType(); @@ -1091,7 +1092,7 @@ // if empty msg, do not save deactivateInputBlocker(); - return; + return INVALID_MSGID; } ConvergedMessageAddressList ccAddresses; @@ -1124,7 +1125,7 @@ } // if empty msg, do not send deactivateInputBlocker(); - return; + return INVALID_MSGID; } ConvergedMessage msg; packMessage(msg, true); @@ -1150,6 +1151,7 @@ { HbNotificationDialog::launchDialog(LOC_SAVED_TO_DRAFTS); } + return msgId; } void MsgUnifiedEditorView::resizeEvent( QGraphicsSceneResizeEvent * event ) @@ -1360,7 +1362,7 @@ { QString service("photos"); QString interface("com.nokia.symbian.IImageFetch"); - QString operation("fetch(void)"); + QString operation("fetch()"); XQAiwRequest* request = NULL; XQApplicationManager appManager; request = appManager.create(service,interface, operation, true);//embedded @@ -1390,30 +1392,11 @@ //--------------------------------------------------------------- void MsgUnifiedEditorView::fetchAudio() { - QString service("musicplayer"); - QString interface("com.nokia.symbian.IMusicFetch"); - QString operation("fetch()"); - XQAiwRequest* request = NULL; - XQApplicationManager appManager; - request = appManager.create(service, interface, operation, true); //embedded - request->setSynchronous(true); // synchronous - if(!request) - { - QCRITICAL_WRITE("AIW-ERROR: NULL request"); - return; - } - - connect(request, SIGNAL(requestOk(const QVariant&)), - this, SLOT(audiosFetched(const QVariant&))); - connect(request, SIGNAL(requestError(int,const QString&)), - this, SLOT(serviceRequestError(int,const QString&))); - - // Make the request - if (!request->send()) - { - QDEBUG_WRITE_FORMAT("AIW-ERROR: Request Send failed :",request->lastError()); - } - delete request; + // Launch Audio fetcher view + QVariantList params; + params << MsgBaseView::AUDIOFETCHER; // target view + params << MsgBaseView::UNIEDITOR; // source view + emit switchView(params); } //--------------------------------------------------------------- @@ -1448,24 +1431,6 @@ } //--------------------------------------------------------------- -// MsgUnifiedEditorView::audiosFetched -// @see header file -//--------------------------------------------------------------- -void MsgUnifiedEditorView::audiosFetched(const QVariant& result ) -{ - if(result.canConvert()) - { - QStringList fileList = result.value(); - if ( fileList.size()>0 && !fileList.at(0).isEmpty()) - { - QString filepath(QDir::toNativeSeparators(fileList.at(0))); - QDEBUG_WRITE_FORMAT("Received audio file path = ", fileList.at(0)); - mBody->setAudio(filepath); - } - } -} - -//--------------------------------------------------------------- // MsgUnifiedEditorView::serviceRequestError // @see header file //--------------------------------------------------------------- diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiededitor/unifiededitor.pro --- a/messagingapp/msgui/unifiededitor/unifiededitor.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiededitor/unifiededitor.pro Wed Jun 23 18:09:17 2010 +0300 @@ -26,7 +26,6 @@ INCLUDEPATH += ../msguiutils/inc INCLUDEPATH += ../../msgutils/unieditorutils/editorgenutils/inc INCLUDEPATH += ../../msgutils/unidatautils/unidatamodelloader/inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc INCLUDEPATH += ../../msgsettings/settingsview/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE @@ -45,6 +44,15 @@ BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " \ "rom/unifiededitor.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unifiededitor.iby)" +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/unifiededitor.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/unifiededitor.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + # Input HEADERS += msgunieditormonitor.h \ msgunieditoraddress.h \ @@ -81,8 +89,7 @@ RESOURCES += unifiededitor.qrc # Libs -LIBS += -ls60qconversions \ - -lconvergedmessageutils \ +LIBS += -lconvergedmessageutils \ -lmsguiutils \ -lunieditorpluginloader \ -leditorgenutils \ @@ -101,7 +108,7 @@ -lgsmu \ -lsmcm \ -lxqserviceutil \ - -lcommonengine - + -lcommonengine \ + -lefsrv \ No newline at end of file diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h Wed Jun 23 18:09:17 2010 +0300 @@ -27,6 +27,7 @@ class HbIcon; class HbFrameItem; class UniViewerUtils; +class UniMessageInfo; /** * @class UniViewerAttachmentWidget @@ -50,10 +51,9 @@ /** * Populates the widget contents. - * @param mimeType Mime type of media. - * @param filePath File path of media. + * @param info Object information. */ - void populate(const QString &mimeType, const QString &filePath); + void populate(UniMessageInfo *info); signals: diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h Wed Jun 23 18:09:17 2010 +0300 @@ -20,6 +20,7 @@ // FORWARD DECLARATIONS class UniViewerUtils; +class UniMessageInfo; #include @@ -45,10 +46,9 @@ /** * Populates the widget contents. - * @param mimeType Mime type of media. - * @param filePath File path of media. + * @param info Object information. */ - void populate(const QString &mimeType, const QString &filePath); + void populate(UniMessageInfo *info); signals: diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h Wed Jun 23 18:09:17 2010 +0300 @@ -54,21 +54,21 @@ /** * Called to insert image content in viewer. - * @param medialist list of absolute paths of media. + * @param info Object information. */ - void setPixmap(const QString &mimeType, const QString &pixmapFile); + void setPixmap(UniMessageInfo *info); /** * Called to insert audio content in viewer. - * @param medialist list of absolute paths of media. + * @param info Object information. */ - void setAudio(const QString &mimeType, const QString &audiofile); + void setAudio(UniMessageInfo *info); /** * Called to insert video content in viewer. - * @param medialist list of absolute paths of media. + * @param info Object information. */ - void setVideo(const QString &mimeType, const QString &videofile); + void setVideo(UniMessageInfo *info); /** * Called to insert text content in viewer. diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h Wed Jun 23 18:09:17 2010 +0300 @@ -22,6 +22,9 @@ // FORWARD DECLARATIONS class UniViewerUtils; +class UniMessageInfo; +class ThumbnailManager; + /** * This widget displays the pixmap content in viewer. @@ -44,10 +47,9 @@ /** * Sets the pixmap content to be displayed. - * @param mimeType Mime type of the pixmap. - * @param pixmapPath File path of the pixmap. + * @param info Object information. */ - void populate(const QString &mimeType, const QString &pixmapPath); + void populate(UniMessageInfo *info); signals: @@ -83,16 +85,26 @@ * */ void handleSave(); - + /** * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture * events back to back. */ void regrabGesture(); + /** + * Slot hit when the thumbnail is ready. + */ + void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error); + private: /** + * Initialization function. + */ + void init(); + + /** * Handles short tap event. */ void handleShortTap(); @@ -112,6 +124,12 @@ UniViewerUtils *mViewerUtils; /** + * ThumbnailManager + * Own. + */ + ThumbnailManager *mThumbnailManager; + + /** * Mime Type of pixmap. */ QString mMimeType; diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -31,6 +31,7 @@ // USER INCLUDES #include "univiewerutils.h" +#include "unidatamodelplugininterface.h" // LOCAL CONSTANTS #define LOC_OPEN hbTrId("txt_common_menu_open") @@ -40,6 +41,7 @@ const QString BG_FRAME_NORMAL("qtg_fr_list_normal"); const QString BG_FRAME_PRESSED("qtg_fr_list_pressed"); const QString ATTACHMENT_ICON("qtg_small_attachment"); +const QString CORRUPTED_ATTACH_ICON("qtg_small_corrupted"); const QString VCARD_MIMETYPE("text/X-vCard"); const int KILOBYTE = 1024; @@ -83,14 +85,24 @@ // UniViewerAttachmentWidget::populate // @see header file //---------------------------------------------------------------------------- -void UniViewerAttachmentWidget::populate(const QString &mimeType, const QString &filePath) +void UniViewerAttachmentWidget::populate(UniMessageInfo *info) { - mMimeType = mimeType; - mMediaPath = filePath; + mMimeType = info->mimetype(); + mMediaPath = info->path(); - mMediaIcon->setIconName(ATTACHMENT_ICON); + QString attachIcon; + if (info->isProtected()) { + attachIcon = ATTACHMENT_ICON; + } + else if (info->isCorrupted()) { + attachIcon = CORRUPTED_ATTACH_ICON; + } + else { + attachIcon = ATTACHMENT_ICON; + } - QFileInfo fileInfo(filePath); + mMediaIcon->setIconName(attachIcon); + QFileInfo fileInfo(mMediaPath); mName->setText(fileInfo.fileName()); QString sizeString('B'); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -24,12 +24,14 @@ // USER INCLUDES #include "msgmediautil.h" #include "univiewerutils.h" +#include "unidatamodelplugininterface.h" // LOCAL CONSTANTS #define LOC_OPEN hbTrId("txt_common_menu_open") #define LOC_SAVE hbTrId("txt_common_menu_save") const QString AUDIO_ICON("qtg_mono_audio"); +const QString CORRUPTED_AUDIO_ICON("qtg_mono_corrupted"); //---------------------------------------------------------------------------- // UniViewerAudioWidget::UniViewerAudioWidget @@ -54,12 +56,23 @@ // UniViewerAudioWidget::~UniViewerAudioWidget // @see header file //---------------------------------------------------------------------------- -void UniViewerAudioWidget::populate(const QString &mimeType, const QString &filePath) +void UniViewerAudioWidget::populate(UniMessageInfo *info) { - mMimeType = mimeType; - mMediaPath = filePath; + mMimeType = info->mimetype(); + mMediaPath = info->path(); - this->setIcon(HbIcon(AUDIO_ICON)); + HbIcon audioIcon; + if (info->isProtected()) { + audioIcon.setIconName(AUDIO_ICON); + } + else if (info->isCorrupted()) { + audioIcon.setIconName(CORRUPTED_AUDIO_ICON); + } + else { + audioIcon.setIconName(AUDIO_ICON); + } + + this->setIcon(audioIcon); QFileInfo fileInfo(mMediaPath); this->setText(fileInfo.baseName()); this->setTextAlignment(Qt::AlignLeft); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/src/univiewerbodywidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerbodywidget.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerbodywidget.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -56,7 +56,7 @@ //UniViewerBodyWidget::setImage // @see header file //--------------------------------------------------------------- -void UniViewerBodyWidget::setPixmap(const QString &mimeType, const QString &pixmapFile) +void UniViewerBodyWidget::setPixmap(UniMessageInfo *info) { setHasPixmap(true); //create image item instance @@ -65,7 +65,7 @@ HbStyle::setItemName(mPixmapItem, "pixmap"); } mPixmapItem->hide(); - mPixmapItem->populate(mimeType, pixmapFile); + mPixmapItem->populate(info); this->repolish(); } @@ -74,14 +74,14 @@ //UniViewerBodyWidget::setAudio // @see header file //--------------------------------------------------------------- -void UniViewerBodyWidget::setAudio(const QString &mimeType, const QString &audiofile) +void UniViewerBodyWidget::setAudio(UniMessageInfo *info) { if (!mAudioItem) { mAudioItem = new UniViewerAudioWidget(this); HbStyle::setItemName(mAudioItem, "audioItem"); } mAudioItem->hide(); - mAudioItem->populate(mimeType, audiofile); + mAudioItem->populate(info); this->repolish(); } @@ -90,10 +90,18 @@ //UniViewerBodyWidget::setVideo // @see header file //--------------------------------------------------------------- -void UniViewerBodyWidget::setVideo(const QString &mimeType, const QString &videofile) +void UniViewerBodyWidget::setVideo(UniMessageInfo *info) { - Q_UNUSED(mimeType) - Q_UNUSED(videofile) + setHasPixmap(true); + //create image item instance + if (!mPixmapItem) { + mPixmapItem = new UniViewerPixmapWidget(this); + HbStyle::setItemName(mPixmapItem, "pixmap"); + } + mPixmapItem->hide(); + mPixmapItem->populate(info); + + this->repolish(); } //--------------------------------------------------------------- @@ -191,14 +199,14 @@ setText(textContent); } } - else if (mimeType.contains(VIDEO_MIMETYPE)) { - setVideo(mimeType, info->path()); + else if (mimeType.contains(AUDIO_MIMETYPE)) { + setAudio(info); } - else if (mimeType.contains(AUDIO_MIMETYPE)) { - setAudio(mimeType, info->path()); + else if (mimeType.contains(VIDEO_MIMETYPE)) { + setVideo(info); } else if (mimeType.contains(IMAGE_MIMETYPE)) { - setPixmap(mimeType, info->path()); + setPixmap(info); } delete info; diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/src/univiewerfeeder_p.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerfeeder_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerfeeder_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -18,7 +18,6 @@ #include "univiewerfeeder_p.h" // SYSTEM INCLUDES #include -#include #include // USER INCLUDES diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -180,7 +180,7 @@ UniMessageInfo* info = attachList.at(a); UniViewerAttachmentWidget *attachmentWidget = new UniViewerAttachmentWidget(this); mUniViewerAttachmentstList.append(attachmentWidget); - attachmentWidget->populate(info->mimetype(), info->path()); + attachmentWidget->populate(info); delete info; mMainLayout->addItem(attachmentWidget); } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -24,22 +24,46 @@ #include #include #include +#include // USER INCLUDES #include "univiewerutils.h" +#include "unidatamodelplugininterface.h" // LOCAL CONSTANTS #define LOC_OPEN hbTrId("txt_common_menu_open") #define LOC_SAVE hbTrId("txt_common_menu_save") +const QString PIXMAP_ICON("qtg_small_image"); +const QString CORRUPTED_PIXMAP_ICON("qtg_large_corrupted"); +const QString VIDEO_MIMETYPE("video"); +const QString MSG_VIDEO_ICON("qtg_large_video_player"); + //--------------------------------------------------------------- // UniViewerPixmapWidget::UniViewerPixmapWidget // @see header file //--------------------------------------------------------------- UniViewerPixmapWidget::UniViewerPixmapWidget(QGraphicsItem *parent) : - HbIconItem(parent), mViewerUtils(0) + HbIconItem(parent), mViewerUtils(0), mThumbnailManager(0) { this->grabGesture(Qt::TapGesture); + init(); +} + +//--------------------------------------------------------------- +// UniViewerPixmapWidget::init +// @see header file +//--------------------------------------------------------------- +void UniViewerPixmapWidget::init() +{ + mThumbnailManager = new ThumbnailManager(this); + mThumbnailManager->setMode(ThumbnailManager::Default); + mThumbnailManager->setQualityPreference(ThumbnailManager::OptimizeForQuality); + mThumbnailManager->setThumbnailSize(ThumbnailManager::ThumbnailLarge); + + connect(mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void*, int, int)), this, + SLOT(thumbnailReady(QPixmap, void*, int, int))); + } //--------------------------------------------------------------- @@ -54,12 +78,25 @@ // UniViewerPixmapWidget::setPixmap // @see header file //--------------------------------------------------------------- -void UniViewerPixmapWidget::populate(const QString &mimeType, const QString &pixmapPath) +void UniViewerPixmapWidget::populate(UniMessageInfo *info) { - mMimeType = mimeType; - mPixmapPath = pixmapPath; - QPixmap pixmap(mPixmapPath); - this->setIcon(HbIcon(pixmap)); + mMimeType = info->mimetype(); + mPixmapPath = info->path(); + if (mMimeType.contains(VIDEO_MIMETYPE)) { + this->setIcon(MSG_VIDEO_ICON); + mThumbnailManager->getThumbnail(mPixmapPath); + this->ungrabGesture(Qt::TapGesture); + } + else if (info->isProtected()) { + this->setIconName(PIXMAP_ICON); + } + else if (info->isCorrupted()) { + this->setIconName(CORRUPTED_PIXMAP_ICON); + } + else { + QPixmap pixmap(mPixmapPath); + this->setIcon(HbIcon(pixmap)); + } } //--------------------------------------------------------------- @@ -113,12 +150,12 @@ void UniViewerPixmapWidget::handleOpen() { this->ungrabGesture(Qt::TapGesture); - + if (!mViewerUtils) { mViewerUtils = new UniViewerUtils(this); } mViewerUtils->launchContentViewer(mMimeType, mPixmapPath); - + //fire timer to regrab gesture after some delay. QTimer::singleShot(300,this,SLOT(regrabGesture())); } @@ -167,4 +204,22 @@ { this->grabGesture(Qt::TapGesture); } + +//--------------------------------------------------------------- +// UniViewerPixmapWidget::thumbnailReady +// @see header +//--------------------------------------------------------------- +void UniViewerPixmapWidget::thumbnailReady(const QPixmap& pixmap, void *data, int id, int error) +{ + Q_UNUSED(data) + Q_UNUSED(id) + this->grabGesture(Qt::TapGesture); + if (!error) { + this->setIcon(HbIcon(pixmap)); + this->hide(); + // calling the sizeint forcefully as thumbnailReady is a async call + // by the time this call has come sizeint would have already been calculated. + this->parentWidget()->resize(-1, -1); + } +} // EOF diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/src/univiewertextitem.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewertextitem.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/src/univiewertextitem.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -24,7 +24,8 @@ #include #include #include - +#include +#include #include #include #include @@ -425,6 +426,8 @@ QString url = action->data().toString(); url.remove(URL_RULE); //invoke browser service & pass url. + QUrl uri(url); + QDesktopServices::openUrl(uri); } } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/src/univiewerutils.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerutils.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerutils.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -32,6 +32,7 @@ const QString IMAGE_MIMETYPE("image"); const QString AUDIO_MIMETYPE("audio"); const QString VCARD_MIMETYPE("text/X-vCard"); +const QString VIDEO_MIMETYPE("video"); //--------------------------------------------------------------- // UniViewerUtils::UniViewerUtils @@ -56,7 +57,8 @@ //--------------------------------------------------------------- void UniViewerUtils::launchContentViewer(const QString &mimeType, const QString &filePath) { - if (mimeType.contains(IMAGE_MIMETYPE) || mimeType.contains(AUDIO_MIMETYPE)) { + if (mimeType.contains(IMAGE_MIMETYPE) || mimeType.contains(AUDIO_MIMETYPE) || + mimeType.contains(VIDEO_MIMETYPE)) { launchViaSharableFile(filePath); } else if (mimeType.contains(VCARD_MIMETYPE, Qt::CaseInsensitive)) { diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgui/unifiedviewer/unifiedviewer.pro --- a/messagingapp/msgui/unifiedviewer/unifiedviewer.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgui/unifiedviewer/unifiedviewer.pro Wed Jun 23 18:09:17 2010 +0300 @@ -25,7 +25,6 @@ INCLUDEPATH += ../appengine/inc INCLUDEPATH += ../msguiutils/inc INCLUDEPATH += . ../../msgutils/unieditorutils/editorgenutils/inc -INCLUDEPATH += . ../../msgutils/s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE #QMAKE_CXXFLAGS.ARMCC -= --no_hide_all @@ -49,6 +48,15 @@ "$${LITERAL_HASH}include " \ "rom/unifiedviewer.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unifiedviewer.iby)" +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/unifiedviewer.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/unifiedviewer.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + # Input HEADERS += inc/unifiedviewer.h \ inc/unicontentswidget.h \ @@ -88,8 +96,7 @@ RESOURCES += unifiedviewer.qrc # Libs -LIBS = -ls60qconversions \ - -letext \ +LIBS = -letext \ -lmsgs \ -lconvergedmessageutils \ -lappengine \ @@ -98,4 +105,5 @@ -lQtContacts \ -lmsguiutils \ -lcentralrepository \ + -lthumbnailmanagerqt \ -lxqserviceutil diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/bwins/s60qconversionsu.def --- a/messagingapp/msgutils/bwins/s60qconversionsu.def Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - ?qStringToS60Desc@S60QConversions@@SAPAVHBufC16@@ABVQString@@@Z @ 1 NONAME ; class HBufC16 * S60QConversions::qStringToS60Desc(class QString const &) - ?s60DescToQString@S60QConversions@@SA?AVQString@@ABVTDesC16@@@Z @ 2 NONAME ; class QString S60QConversions::s60DescToQString(class TDesC16 const &) - ?s60Desc8ToQString@S60QConversions@@SA?AVQString@@ABVTDesC8@@@Z @ 3 NONAME ; class QString S60QConversions::s60Desc8ToQString(class TDesC8 const &) - ?qStringToS60Desc8@S60QConversions@@SAPAVHBufC8@@ABVQString@@@Z @ 4 NONAME ; class HBufC8 * S60QConversions::qStringToS60Desc8(class QString const &) - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/convergedmessageutils/convergedmessageutils.pro --- a/messagingapp/msgutils/convergedmessageutils/convergedmessageutils.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/convergedmessageutils/convergedmessageutils.pro Wed Jun 23 18:09:17 2010 +0300 @@ -47,6 +47,15 @@ "$${LITERAL_HASH}include " \ "rom/convergedmessageutils.iby CORE_APP_LAYER_IBY_EXPORT_PATH(convergedmessageutils.iby)" +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/convergedmessageutils.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/convergedmessageutils.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + symbian { TARGET.UID3 = 0x20024319 TARGET.CAPABILITY = CAP_GENERAL_DLL diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/eabi/s60qconversionsu.def --- a/messagingapp/msgutils/eabi/s60qconversionsu.def Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN15S60QConversions16qStringToS60DescERK7QString @ 1 NONAME - _ZN15S60QConversions16s60DescToQStringERK7TDesC16 @ 2 NONAME - _ZN15S60QConversions17qStringToS60Desc8ERK7QString @ 3 NONAME - _ZN15S60QConversions17s60Desc8ToQStringERK6TDesC8 @ 4 NONAME - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/msgutils.pro --- a/messagingapp/msgutils/msgutils.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/msgutils.pro Wed Jun 23 18:09:17 2010 +0300 @@ -20,7 +20,6 @@ SYMBIAN_PLATFORMS = WINSCW ARMV5 -SUBDIRS += s60qconversions/s60qconversions.pro SUBDIRS += convergedmessageutils/convergedmessageutils.pro SUBDIRS += unieditorutils/unieditorutils.pro SUBDIRS += unidatautils/unidatautils.pro \ No newline at end of file diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/bwins/s60qconversionsu.def --- a/messagingapp/msgutils/s60qconversions/bwins/s60qconversionsu.def Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - ?qStringToS60Desc8@S60QConversions@@SAPAVHBufC8@@ABVQString@@@Z @ 1 NONAME ; class HBufC8 * S60QConversions::qStringToS60Desc8(class QString const &) - ?qStringToS60Desc@S60QConversions@@SAPAVHBufC16@@ABVQString@@@Z @ 2 NONAME ; class HBufC16 * S60QConversions::qStringToS60Desc(class QString const &) - ?s60Desc8ToQString@S60QConversions@@SA?AVQString@@ABVTDesC8@@@Z @ 3 NONAME ; class QString S60QConversions::s60Desc8ToQString(class TDesC8 const &) - ?s60DescToQString@S60QConversions@@SA?AVQString@@ABVTDesC16@@@Z @ 4 NONAME ; class QString S60QConversions::s60DescToQString(class TDesC16 const &) - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/inc/s60qconversiondefines.h --- a/messagingapp/msgutils/s60qconversions/inc/s60qconversiondefines.h Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2009 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" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Global DLL defines - * -*/ - - -#ifndef S60QCONV_DEFINES_H -#define S60QCONV_DEFINES_H - -#include - -#ifdef BUILD_S60QCONV_DLL -#define S60QCONV_EXPORT Q_DECL_EXPORT -#else -#define S60QCONV_EXPORT Q_DECL_IMPORT -#endif - -#endif // S60QCONV_DEFINES_H diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/inc/s60qconversions.h --- a/messagingapp/msgutils/s60qconversions/inc/s60qconversions.h Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2009 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" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef S60QCONVERSIONS -#define S60QCONVERSIONS - -#include -#include -#include "s60qconversiondefines.h" - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class S60QCONV_EXPORT S60QConversions - { - public: - static QString s60DescToQString(const TDesC& desc); - static HBufC* qStringToS60Desc(const QString& string); - static QString s60Desc8ToQString(const TDesC8& desc); - static HBufC8* qStringToS60Desc8(const QString& string); - }; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // S60QCONVERSIONS - -// End of file - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/rom/s60qconversions.iby --- a/messagingapp/msgutils/s60qconversions/rom/s60qconversions.iby Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2009 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" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef __S60QCONVERSIONS_IBY__ -#define __S60QCONVERSIONS_IBY__ - -REM DLL -file=ABI_DIR\UREL\s60qconversions.dll SHARED_LIB_DIR\s60qconversions.dll - -#endif // __S60QCONVERSIONS_IBY__ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/s60qconversions.pro --- a/messagingapp/msgutils/s60qconversions/s60qconversions.pro Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -# -# Copyright (c) 2009 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" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = lib -TARGET = s60qconversions -DEPENDPATH += . inc src -INCLUDEPATH += . -INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - -DEFINES += BUILD_S60QCONV_DLL -#QMAKE_CXXFLAGS.ARMCC -= --no_hide_all - -# UID3 -TARGET.UID3 = 0x2001FE7B - -# Capability -TARGET.CAPABILITY = CAP_GENERAL_DLL - -TARGET.EPOCALLOWDLLDATA = 1 - -# Platforms -SYMBIAN_PLATFORMS = WINSCW ARMV5 - -# Build.inf rules -BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "rom/s60qconversions.iby CORE_APP_LAYER_IBY_EXPORT_PATH(s60qconversions.iby)" - -# Input -HEADERS += inc/s60qconversions.h -SOURCES += src/s60qconversions.cpp - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/src/s60qconversions.cpp --- a/messagingapp/msgutils/s60qconversions/src/s60qconversions.cpp Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2009 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" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "s60qconversions.h" -#include "utf.h" - -/*! - \class S60QConversions - \brief S60QConversions class offers functions for converting Symbian/Series60 data types to Qt data types and vice versa. - */ - - -/*! - Converts Symbian/Series60 descriptor (string) to QString - - \param desc descriptor to be converted - \return QString containing converted string - */ -QString S60QConversions::s60DescToQString(const TDesC& desc) - { - return QString::fromUtf16(desc.Ptr(),desc.Length()); - } - -/*! - Converts QString to Symbian/Series60 descriptor (string). - Note: Ownership of returned descriptor (string) is transferred to caller - - \param string QString to be converted - \return pointer to Symbian/Series60 descriptor on success; - otherwise returns NULL pointer - */ -HBufC* S60QConversions::qStringToS60Desc(const QString& string) - { - TPtrC16 str(reinterpret_cast(string.utf16())); - return str.Alloc(); - } - -/*! - Converts Symbian/Series60 8 bit descriptor (UTF8 string) to QString - - \param desc 8 bit descriptor to be converted - \return QString on success; otherwise returns null QString - */ -QString S60QConversions::s60Desc8ToQString(const TDesC8& desc) - { - QString qtString; - HBufC* s60str = NULL; - TRAPD(error, s60str = CnvUtfConverter::ConvertToUnicodeFromUtf8L(desc)); - if (error == KErrNone) { - qtString = QString::fromUtf16(s60str->Ptr(),s60str->Length()); - delete s60str; - } - return qtString; - } - -/*! - Converts QString to Symbian/Series60 8 bit descriptor (UTF8 string). - Note: Ownership of returned descriptor (string) is transferred to caller - - \param string QString to be converted - \return pointer to UTF8 string in Symbian/Series60 descriptor on success; - otherwise returns NULL pointer - */ -HBufC8* S60QConversions::qStringToS60Desc8(const QString& string) - { - TPtrC16 str(reinterpret_cast(string.utf16())); - HBufC8* s60str = NULL; - TRAPD(error, s60str = CnvUtfConverter::ConvertFromUnicodeToUtf8L(str)); - if (error != KErrNone) { - return NULL; - } - return s60str; - } - -// End of file - - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/tsrc/ut/bwins/t_s60qconversionsu.def --- a/messagingapp/msgutils/s60qconversions/tsrc/ut/bwins/t_s60qconversionsu.def Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - ?Tests60DescToQString@TestS60QConversions@@AAEXXZ @ 1 NONAME ; void TestS60QConversions::Tests60DescToQString(void) - ?TestqStringToS60Desc@TestS60QConversions@@AAEXXZ @ 2 NONAME ; void TestS60QConversions::TestqStringToS60Desc(void) - ?staticMetaObject@TestS60QConversions@@2UQMetaObject@@B @ 3 NONAME ; struct QMetaObject const TestS60QConversions::staticMetaObject - ?tr@TestS60QConversions@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString TestS60QConversions::tr(char const *, char const *) - ?qt_metacall@TestS60QConversions@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 5 NONAME ; int TestS60QConversions::qt_metacall(enum QMetaObject::Call, int, void * *) - ?getStaticMetaObject@TestS60QConversions@@SAABUQMetaObject@@XZ @ 6 NONAME ; struct QMetaObject const & TestS60QConversions::getStaticMetaObject(void) - ?metaObject@TestS60QConversions@@UBEPBUQMetaObject@@XZ @ 7 NONAME ; struct QMetaObject const * TestS60QConversions::metaObject(void) const - ?qt_metacast@TestS60QConversions@@UAEPAXPBD@Z @ 8 NONAME ; void * TestS60QConversions::qt_metacast(char const *) - ?initTestCase@TestS60QConversions@@AAEXXZ @ 9 NONAME ; void TestS60QConversions::initTestCase(void) - ?cleanupTestCase@TestS60QConversions@@AAEXXZ @ 10 NONAME ; void TestS60QConversions::cleanupTestCase(void) - ?Tests60Desc8ToQString@TestS60QConversions@@AAEXXZ @ 11 NONAME ; void TestS60QConversions::Tests60Desc8ToQString(void) - ?trUtf8@TestS60QConversions@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString TestS60QConversions::trUtf8(char const *, char const *) - ?TestqStringToS60Desc8@TestS60QConversions@@AAEXXZ @ 13 NONAME ; void TestS60QConversions::TestqStringToS60Desc8(void) - ?trUtf8@TestS60QConversions@@SA?AVQString@@PBD0H@Z @ 14 NONAME ; class QString TestS60QConversions::trUtf8(char const *, char const *, int) - ?tr@TestS60QConversions@@SA?AVQString@@PBD0H@Z @ 15 NONAME ; class QString TestS60QConversions::tr(char const *, char const *, int) - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/tsrc/ut/ut_s60qconversions/t_s60qconversions.cpp --- a/messagingapp/msgutils/s60qconversions/tsrc/ut/ut_s60qconversions/t_s60qconversions.cpp Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2009 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" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include -#include -#include - - -void TestS60QConversions::initTestCase() -{ - - mS60QConversions=0; -} - - -void TestS60QConversions::Tests60DescToQString() -{ - HBufC* temp = HBufC::NewLC(10); - temp->Des().Copy(_L("Sometext")); - - QString text= S60QConversions::s60DescToQString(temp->Des()); - QVERIFY(text==QString("Sometext")); - CleanupStack::PopAndDestroy(temp); - -} - -void TestS60QConversions::TestqStringToS60Desc() -{ - QString str ="ExampleText"; - HBufC* s60text = S60QConversions::qStringToS60Desc(str); - QVERIFY(str==QString("ExampleText")); - -} - -void TestS60QConversions::Tests60Desc8ToQString() -{ - HBufC8* temp = HBufC8::NewLC(10); - temp->Des().Copy(_L("Sometext")); - - QString text= S60QConversions::s60Desc8ToQString(temp->Des() ); - QVERIFY(text==QString("Sometext")); - - CleanupStack::PopAndDestroy(temp); -} - -void TestS60QConversions::TestqStringToS60Desc8() -{ - QString str ="ExampleText"; - _LIT8(qStr8,"ExampleText"); - HBufC8* s60text = S60QConversions::qStringToS60Desc8(str); - QVERIFY(s60text->Des() == qStr8); - -} - -void TestS60QConversions::cleanupTestCase() -{ - delete mS60QConversions; -} - - - - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/tsrc/ut/ut_s60qconversions/t_s60qconversions.h --- a/messagingapp/msgutils/s60qconversions/tsrc/ut/ut_s60qconversions/t_s60qconversions.h Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2008 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" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef T_S60QCONVERSIONS_H -#define T_S60QCONVERSIONS_H - - -#ifdef BUILD_TEST_DLL -#define TEST_EXPORT Q_DECL_EXPORT -#else -#define TEST_EXPORT Q_DECL_IMPORT -#endif - - -#include -#include "s60qconversions.h" - - -class TEST_EXPORT TestS60QConversions: public QObject -{ - Q_OBJECT - -private slots: - - void initTestCase(); - - void Tests60DescToQString(); - - void TestqStringToS60Desc(); - - void Tests60Desc8ToQString(); - - void TestqStringToS60Desc8(); - - void cleanupTestCase(); - - -private: - - S60QConversions* mS60QConversions; -}; - -#endif //TEST_S60QCONVERSIONS_H diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/s60qconversions/tsrc/ut/ut_s60qconversions/t_s60qconversions.pro --- a/messagingapp/msgutils/s60qconversions/tsrc/ut/ut_s60qconversions/t_s60qconversions.pro Fri Jun 11 13:35:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -# -# Copyright (c) 2009 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" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -QT += testlib - -TEMPLATE = lib -TARGET = - - -INCLUDEPATH += . - -INCLUDEPATH += ../../../../../inc -INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -INCLUDEPATH += ../../../inc - - - -DEFINES += BUILD_TEST_DLL -HEADERS += \ - t_s60qconversions.h - -SOURCES += \ - t_s60qconversions.cpp - -SYMBIAN_PLATFORMS = WINSCW ARMV5 -symbian { - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.EPOCSTACKSIZE = 0x8000 - TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 - TARGET.EPOCALLOWDLLDATA = 1 - } -LIBS+= -ls60qconversions - diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodel/unidatamodel.pro --- a/messagingapp/msgutils/unidatautils/unidatamodel/unidatamodel.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodel/unidatamodel.pro Wed Jun 23 18:09:17 2010 +0300 @@ -32,7 +32,6 @@ INCLUDEPATH += inc INCLUDEPATH += ../../../../inc INCLUDEPATH += /s60/app/messaging/inc -INCLUDEPATH += ../s60qconversions/inc INCLUDEPATH += ../../unieditorutils/editorgenutils/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE @@ -53,6 +52,15 @@ MMP_RULES += "TARGETPATH resource" MMP_RULES += "RESOURCE UniDataModel.rss" +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/unidatamodel.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/unidatamodel.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + SOURCES += inc/UniDataUtils.inl \ src/UniDataUtils.cpp \ inc/UniDataModel.inl \ @@ -116,7 +124,6 @@ -lcaf \ -lDrmServerInterfaces \ -lmsgcommonutils \ - -ls60qconversions \ -lQtCore \ -leditorgenutils diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelloader/unidatamodelloader.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelloader/unidatamodelloader.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelloader/unidatamodelloader.pro Wed Jun 23 18:09:17 2010 +0300 @@ -50,6 +50,15 @@ MMP_RULES += "SOURCEPATH ." +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/unidatamodelloader.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/unidatamodelloader.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + SOURCES += src/unidatamodelloader.cpp LIBS += -lQtCore diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -18,7 +18,7 @@ //SYSTEM INCLUDES #include #include -#include +#include //USER INCLUDES #include "unibiomessagedataplugin.h" @@ -138,7 +138,7 @@ User::LeaveIfError(file.FullName(fullName)); User::LeaveIfError(file.Size(size)); - path = S60QConversions::s60DescToQString(*fullName.AllocL()); + path = XQConversions::s60DescToQString(*fullName.AllocL()); UniMessageInfo *msgobj = new UniMessageInfo(path, size, mimetype); attlist << msgobj; diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin_p.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -30,7 +30,7 @@ #include "debugtraces.h" #include -#include +#include #include #include #include "convergedmessage.h" @@ -150,7 +150,7 @@ HBufC* buf = HBufC::NewL(len); TPtr bufPtr = buf->Des(); textBody.ExtractSelectively(bufPtr, 0, len, CPlainText::EExtractAll); - aBodyText = S60QConversions::s60DescToQString(*buf); + aBodyText = XQConversions::s60DescToQString(*buf); delete buf; } @@ -192,8 +192,8 @@ ConvergedMessageAddress * messageAddress = - new ConvergedMessageAddress(S60QConversions::s60DescToQString(address), - S60QConversions::s60DescToQString(name)); + new ConvergedMessageAddress(XQConversions::s60DescToQString(address), + XQConversions::s60DescToQString(name)); mAddressList.append(messageAddress); } CleanupStack::PopAndDestroy(3, pText); @@ -218,7 +218,7 @@ smsHeader->RestoreL(*store); messageAddress - = S60QConversions::s60DescToQString(smsHeader->FromAddress()); + = XQConversions::s60DescToQString(smsHeader->FromAddress()); CleanupStack::PopAndDestroy(3, pText); } @@ -290,8 +290,6 @@ iAttachmentCount = attachMan.AttachmentCount(); - RFile file ; - if(iAttachmentCount) { file = attachMan.GetAttachmentFileL(0); } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/testunidatamodelvcalplugin.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/testunidatamodelvcalplugin.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/testunidatamodelvcalplugin.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -128,10 +128,10 @@ origFile.Read(readBuf); readBuf16->Des().Copy(readBuf); - QString orig = S60QConversions::s60DescToQString(*readBuf16); + QString orig = XQConversions::s60DescToQString(*readBuf16); origFile.Close(); - HBufC* filepath = S60QConversions::qStringToS60Desc(path); + HBufC* filepath = XQConversions::qStringToS60Desc(path); RFile file; op = file.Open(iFs, *filepath, EFileRead); @@ -139,7 +139,7 @@ file.Read(readBuf); readBuf16->Des().Copy(readBuf); - QString bod = S60QConversions::s60DescToQString(*readBuf16); + QString bod = XQConversions::s60DescToQString(*readBuf16); delete readBuf16; file.Close(); @@ -197,10 +197,10 @@ origFile.Read(readBuf); readBuf16->Des().Copy(readBuf); - QString orig = S60QConversions::s60DescToQString(*readBuf16); + QString orig = XQConversions::s60DescToQString(*readBuf16); origFile.Close(); - HBufC* filepath = S60QConversions::qStringToS60Desc(path); + HBufC* filepath = XQConversions::qStringToS60Desc(path); RFile file; op = file.Open(iFs, *filepath, EFileRead); @@ -210,7 +210,7 @@ readBuf16->Des().Copy(readBuf); - QString bod = S60QConversions::s60DescToQString(*readBuf16); + QString bod = XQConversions::s60DescToQString(*readBuf16); delete readBuf16; file.Close(); @@ -476,7 +476,7 @@ TBufC telNumber; QString recepient(TEST_MSG_FROM1); - tempNumber = S60QConversions::qStringToS60Desc(recepient); + tempNumber = XQConversions::qStringToS60Desc(recepient); telNumber = tempNumber->Des(); newBioEntry.iDetails.Set(telNumber); @@ -533,9 +533,9 @@ QString recepient2(TEST_MSG_FROM2); QString alias(TEST_MSG_ALIAS1); - HBufC* addr = S60QConversions::qStringToS60Desc(recepient); - HBufC* addr2 = S60QConversions::qStringToS60Desc(recepient2); - HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); + HBufC* addr = XQConversions::qStringToS60Desc(recepient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); + HBufC* alias1 = XQConversions::qStringToS60Desc(alias); CSmsHeader* smsHeader = CSmsHeader::NewL(CSmsPDU::ESmsSubmit, *pText); CleanupStack::PushL(smsHeader); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/testunidatamodelvcalplugin.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/testunidatamodelvcalplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/testunidatamodelvcalplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -23,7 +23,6 @@ INCLUDEPATH += . INCLUDEPATH += ../../../../../../inc -INCLUDEPATH += ../../../../../msgutils/s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += BUILD_TEST_DLL @@ -48,9 +47,17 @@ BLD_INF_RULES.prj_exports += "BioMtm.rsc /epoc32/winscw/c/resource/messaging/mtm/BioMtm.rsc" } +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/test_unidatamodel_vcal_plugin.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/test_unidatamodel_vcal_plugin.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + LIBS += -leuser \ -lconvergedmessageutils\ - -ls60qconversions \ -lmsgs \ -lsmcm \ -lgsmu \ @@ -61,6 +68,7 @@ -lbioc \ -lefsrv \ -lbiodb \ - -lbifu + -lbifu \ + -lxqutils diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/unibiomessagedataplugin.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/unibiomessagedataplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/unibiomessagedataplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -25,7 +25,6 @@ DEPENDPATH += . inc src INCLUDEPATH += ./inc -INCLUDEPATH += ../../../../msgutils/s60qconversions/inc INCLUDEPATH += ../../../../../inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE @@ -51,7 +50,6 @@ LIBS += -leuser \ -lconvergedmessageutils\ - -ls60qconversions \ -lmsgs \ -lSmcm \ -lgsmu \ @@ -59,7 +57,8 @@ -lQtCore \ -lefsrv \ -lbioc \ - -lbifu + -lbifu \ + -lxqutils # plugin stub deployment diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/src/unimmsdataplugin_p.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/src/unimmsdataplugin_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/src/unimmsdataplugin_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -30,10 +30,11 @@ #include #include #include +#include #include #include "convergedmessage.h" -#include "s60qconversions.h" +#include #include "convergedmessageaddress.h" #include "unimmsdataplugin_p.h" #include "debugtraces.h" @@ -117,7 +118,7 @@ TInt len = textBody.DocumentLength(); HBufC* buf = HBufC::NewL(len); TPtr bufPtr = buf->Des(); - aBodyText = S60QConversions::s60DescToQString(bufPtr); + aBodyText = XQConversions::s60DescToQString(bufPtr); } int UniMMSDataPluginPrivate::messageSize() @@ -129,7 +130,7 @@ QString UniMMSDataPluginPrivate::subject() { TPtrC sub = mMmsClient->SubjectL(); - return S60QConversions::s60DescToQString(sub); + return XQConversions::s60DescToQString(sub); } @@ -163,8 +164,8 @@ // populate address ConvergedMessageAddress * messageAddress = - new ConvergedMessageAddress(S60QConversions::s60DescToQString(address), - S60QConversions::s60DescToQString(name)); + new ConvergedMessageAddress(XQConversions::s60DescToQString(address), + XQConversions::s60DescToQString(name)); mAddressList.append(messageAddress); } @@ -203,8 +204,8 @@ // populate address ConvergedMessageAddress * messageAddress = - new ConvergedMessageAddress(S60QConversions::s60DescToQString(address), - S60QConversions::s60DescToQString(name)); + new ConvergedMessageAddress(XQConversions::s60DescToQString(address), + XQConversions::s60DescToQString(name)); mAddressList.append(messageAddress); } @@ -243,8 +244,8 @@ // populate address ConvergedMessageAddress * messageAddress = - new ConvergedMessageAddress(S60QConversions::s60DescToQString(address), - S60QConversions::s60DescToQString(name)); + new ConvergedMessageAddress(XQConversions::s60DescToQString(address), + XQConversions::s60DescToQString(name)); mAddressList.append(messageAddress); } @@ -257,7 +258,7 @@ { TPtrC sender = mMmsClient->Sender(); - messageAddress = S60QConversions::s60DescToQString(sender); + messageAddress = XQConversions::s60DescToQString(sender); } UniMessageInfoList UniMMSDataPluginPrivate::attachmentList() @@ -271,15 +272,17 @@ for (int i = 0; i < attcount; i++) { CUniObject *obj = mUniDataModel->AttachmentList().GetByIndex(i); + CMsgMediaInfo *mediaInfo = obj->MediaInfo(); - mimetype = S60QConversions::s60Desc8ToQString(obj->MimeType()); - path - = S60QConversions::s60DescToQString(obj->MediaInfo()->FullFilePath()); + mimetype = XQConversions::s60Desc8ToQString(obj->MimeType()); + path = XQConversions::s60DescToQString(mediaInfo->FullFilePath()); size = obj->Size(EFalse); UniMessageInfo *msgobj = new UniMessageInfo(path, size, mimetype); + msgobj->setProtected(EFileProtNoProtection != mediaInfo->Protection()); + msgobj->setCorrupted(mediaInfo->Corrupt()); attlist << msgobj; - } +} return attlist; } @@ -329,13 +332,15 @@ for (int i = 0; i < objcount; i++) { CUniObject *obj = mUniDataModel->ObjectList().GetByIndex(i); + CMsgMediaInfo *mediaInfo = obj->MediaInfo(); - mimetype = S60QConversions::s60Desc8ToQString(obj->MimeType()); - path - = S60QConversions::s60DescToQString(obj->MediaInfo()->FullFilePath()); + mimetype = XQConversions::s60Desc8ToQString(obj->MimeType()); + path = XQConversions::s60DescToQString(mediaInfo->FullFilePath()); size = obj->Size(EFalse); UniMessageInfo *msgobj = new UniMessageInfo(path, size, mimetype); + msgobj->setProtected(EFileProtNoProtection != mediaInfo->Protection()); + msgobj->setCorrupted(mediaInfo->Corrupt()); objlist << msgobj; } @@ -361,15 +366,16 @@ int size; for (int i = 0; i < slideobjcount; i++) { - CUniObject *obj = mUniDataModel->SmilModel().GetObjectByIndex(slidenum, - i); + CUniObject *obj = mUniDataModel->SmilModel().GetObjectByIndex(slidenum, i); + CMsgMediaInfo *mediaInfo = obj->MediaInfo(); - mimetype = S60QConversions::s60Desc8ToQString(obj->MimeType()); - path - = S60QConversions::s60DescToQString(obj->MediaInfo()->FullFilePath()); + mimetype = XQConversions::s60Desc8ToQString(obj->MimeType()); + path = XQConversions::s60DescToQString(mediaInfo->FullFilePath()); size = obj->Size(EFalse); UniMessageInfo *msgobj = new UniMessageInfo(path, size, mimetype); + msgobj->setProtected(EFileProtNoProtection != mediaInfo->Protection()); + msgobj->setCorrupted(mediaInfo->Corrupt()); slidecontent << msgobj; } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/tsrc/testunidatamodelmmsplugin/testunidatamodelmmsplugin.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/tsrc/testunidatamodelmmsplugin/testunidatamodelmmsplugin.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/tsrc/testunidatamodelmmsplugin/testunidatamodelmmsplugin.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -20,7 +20,7 @@ #include #include #include "convergedmessage.h" -#include "s60qconversions.h" +#include #include "unidatamodelplugininterface.h" #include "unidatamodelloader.h" #include @@ -168,13 +168,13 @@ if(subjectField) { QString subject(TEST_MSG_SUBJECT); - HBufC* subj = S60QConversions::qStringToS60Desc(subject); + HBufC* subj = XQConversions::qStringToS60Desc(subject); iMmsClientMtm->SetSubjectL(*subj); } //Sender QString sender(TEST_MSG_FROM1); - HBufC* addr = S60QConversions::qStringToS60Desc(sender); + HBufC* addr = XQConversions::qStringToS60Desc(sender); if (addr) @@ -191,7 +191,7 @@ //Recipient QString recipient(TEST_MSG_RECIEPIENT1); - HBufC* addr2 = S60QConversions::qStringToS60Desc(recipient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recipient); if (addr2) { CleanupStack::PushL(addr2); @@ -200,7 +200,7 @@ } QString recipient2(TEST_MSG_RECIEPIENT2); - HBufC* addr3 = S60QConversions::qStringToS60Desc(recipient2); + HBufC* addr3 = XQConversions::qStringToS60Desc(recipient2); if (addr3) { CleanupStack::PushL(addr3); @@ -209,7 +209,7 @@ } QString recipient3(TEST_MSG_RECIEPIENT3); - HBufC* addr4 = S60QConversions::qStringToS60Desc(recipient3); + HBufC* addr4 = XQConversions::qStringToS60Desc(recipient3); if (addr4) { CleanupStack::PushL(addr4); @@ -377,7 +377,7 @@ //Sender QString sender(TEST_MSG_FROM1); - HBufC* addr = S60QConversions::qStringToS60Desc(sender); + HBufC* addr = XQConversions::qStringToS60Desc(sender); if (addr) { @@ -393,7 +393,7 @@ //Recipient QString recipient(TEST_MSG_RECIEPIENT1); - HBufC* addr2 = S60QConversions::qStringToS60Desc(recipient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recipient); if (addr2) { CleanupStack::PushL(addr2); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/tsrc/testunidatamodelmmsplugin/testunidatamodelmmsplugin.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/tsrc/testunidatamodelmmsplugin/testunidatamodelmmsplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/tsrc/testunidatamodelmmsplugin/testunidatamodelmmsplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -9,7 +9,6 @@ INCLUDEPATH += . -INCLUDEPATH += ../../../../../msgutils/s60qconversions/inc INCLUDEPATH += ../../../../../internal/sf/app/messaging/mmsengine/mmsmessage/inc INCLUDEPATH += ../../../../../internal/sf/app/messaging/mmsengine/inc INCLUDEPATH += ../../../../../../inc @@ -38,9 +37,18 @@ BLD_INF_RULES.prj_exports += "photo.jpg C:/pictures/photo.jpg" } +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/test_unidatamodel_mms_plugin.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/test_unidatamodel_mms_plugin.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + LIBS += -leuser \ -lconvergedmessageutils\ - -ls60qconversions \ + -lxqutils \ -lmsgs \ -lsmcm \ -lgsmu \ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/unimmsdataplugin.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/unimmsdataplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/unimmsdataplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -26,7 +26,6 @@ DEPENDPATH += . inc src INCLUDEPATH += ./inc -INCLUDEPATH += ../../../../msgutils/s60qconversions/inc INCLUDEPATH += ../../../unieditorutils/unieditorutils/inc INCLUDEPATH += ../../../../../inc INCLUDEPATH += ../../../../mmsengine/mmsmessage/inc @@ -57,7 +56,6 @@ -lbafl \ -lestor \ -lconvergedmessageutils\ - -ls60qconversions \ -lmsgs \ -letext \ -lmmscli \ @@ -67,7 +65,8 @@ -lunidatamodel \ -lmmsserversettings \ -lmsgmedia \ - -leikctl + -leikctl \ + -lxqutils # plugin stub deployment plugin.sources = unimmsdataplugin.dll diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/src/unismsdataplugin_p.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/src/unismsdataplugin_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/src/unismsdataplugin_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -31,7 +31,7 @@ #include //USER INCLUDES -#include "s60qconversions.h" +#include #include "convergedmessageaddress.h" #include "convergedmessage.h" @@ -149,7 +149,7 @@ HBufC* buf = HBufC::NewL(len); TPtr bufPtr = buf->Des(); textBody.ExtractSelectively(bufPtr, 0, len, CPlainText::EExtractAll); - aBodyText = S60QConversions::s60DescToQString(*buf); + aBodyText = XQConversions::s60DescToQString(*buf); delete buf; } @@ -180,8 +180,8 @@ // populate address ConvergedMessageAddress * messageAddress = - new ConvergedMessageAddress(S60QConversions::s60DescToQString(address), - S60QConversions::s60DescToQString(name)); + new ConvergedMessageAddress(XQConversions::s60DescToQString(address), + XQConversions::s60DescToQString(name)); mAddressList.append(messageAddress); } @@ -195,8 +195,8 @@ extractNameAndAddress(emailRecipients.MdcaPoint(id), name, address); ConvergedMessageAddress * messageAddress = - new ConvergedMessageAddress(S60QConversions::s60DescToQString(address), - S60QConversions::s60DescToQString(name)); + new ConvergedMessageAddress(XQConversions::s60DescToQString(address), + XQConversions::s60DescToQString(name)); mAddressList.append(messageAddress); } } @@ -226,7 +226,7 @@ smsHeader->RestoreL(*store); messageAddress - = S60QConversions::s60DescToQString(smsHeader->FromAddress()); + = XQConversions::s60DescToQString(smsHeader->FromAddress()); CleanupStack::PopAndDestroy(4, pText); } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -17,7 +17,7 @@ #include #include #include -#include "s60qconversions.h" +#include #include #include "convergedmessage.h" @@ -111,7 +111,7 @@ //AddBody QString body(TEST_MSG_BODY); - HBufC* bodyText = S60QConversions::qStringToS60Desc(body); + HBufC* bodyText = XQConversions::qStringToS60Desc(body); if (bodyText) { CleanupStack::PushL(bodyText); @@ -131,9 +131,9 @@ QString recepient2(TEST_MSG_FROM2); QString alias(TEST_MSG_ALIAS1); - HBufC* addr = S60QConversions::qStringToS60Desc(recepient); - HBufC* addr2 = S60QConversions::qStringToS60Desc(recepient2); - HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); + HBufC* addr = XQConversions::qStringToS60Desc(recepient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); + HBufC* alias1 = XQConversions::qStringToS60Desc(alias); if (addr) { @@ -183,7 +183,7 @@ //AddBody QString body(TEST_MSG_BODY); - HBufC* bodyText = S60QConversions::qStringToS60Desc(body); + HBufC* bodyText = XQConversions::qStringToS60Desc(body); if (bodyText) { CleanupStack::PushL(bodyText); @@ -203,9 +203,9 @@ QString recepient2(TEST_MSG_FROM2); QString alias(TEST_MSG_ALIAS1); - HBufC* addr = S60QConversions::qStringToS60Desc(recepient); - HBufC* addr2 = S60QConversions::qStringToS60Desc(recepient2); - HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); + HBufC* addr = XQConversions::qStringToS60Desc(recepient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); + HBufC* alias1 = XQConversions::qStringToS60Desc(alias); if (addr) { @@ -258,7 +258,7 @@ //AddBody QString body(TEST_MSG_BODY); - HBufC* bodyText = S60QConversions::qStringToS60Desc(body); + HBufC* bodyText = XQConversions::qStringToS60Desc(body); if (bodyText) { CleanupStack::PushL(bodyText); @@ -278,9 +278,9 @@ QString recepient2(TEST_MSG_FROM2); QString alias(TEST_MSG_ALIAS1); - HBufC* addr = S60QConversions::qStringToS60Desc(recepient); - HBufC* addr2 = S60QConversions::qStringToS60Desc(recepient2); - HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); + HBufC* addr = XQConversions::qStringToS60Desc(recepient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); + HBufC* alias1 = XQConversions::qStringToS60Desc(alias); if (addr) { @@ -331,7 +331,7 @@ //AddBody QString body(TEST_MSG_BODY); - HBufC* bodyText = S60QConversions::qStringToS60Desc(body); + HBufC* bodyText = XQConversions::qStringToS60Desc(body); if (bodyText) { CleanupStack::PushL(bodyText); @@ -351,9 +351,9 @@ QString recipient2(TEST_MSG_FROM2); QString alias(TEST_MSG_ALIAS1); - HBufC* addr = S60QConversions::qStringToS60Desc(recipient); - HBufC* addr2 = S60QConversions::qStringToS60Desc(recipient2); - HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); + HBufC* addr = XQConversions::qStringToS60Desc(recipient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recipient2); + HBufC* alias1 = XQConversions::qStringToS60Desc(alias); if (addr) { @@ -396,7 +396,7 @@ //AddBody QString body(TEST_MSG_BODY); - HBufC* bodyText = S60QConversions::qStringToS60Desc(body); + HBufC* bodyText = XQConversions::qStringToS60Desc(body); if (bodyText) { CleanupStack::PushL(bodyText); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -23,7 +23,6 @@ INCLUDEPATH += . INCLUDEPATH += ../../../../../../inc -INCLUDEPATH += ../../../../../msgutils/s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += BUILD_TEST_DLL @@ -46,10 +45,19 @@ TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 TARGET.EPOCALLOWDLLDATA = 1 } + +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/test_unidatamodel_sms_plugin.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/test_unidatamodel_sms_plugin.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock LIBS += -leuser \ -lconvergedmessageutils\ - -ls60qconversions \ + -lxqutils \ -lmsgs \ -lsmcm \ -lgsmu \ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/unismsdataplugin.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/unismsdataplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/unismsdataplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -26,7 +26,6 @@ DEPENDPATH += . inc src INCLUDEPATH += ./inc -INCLUDEPATH += ../../../../msgutils/s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE INCLUDEPATH += ../../../../../inc @@ -49,12 +48,12 @@ LIBS += -leuser \ -lconvergedmessageutils\ - -ls60qconversions \ -lmsgs \ -lSmcm \ -lgsmu \ -letext \ - -lQtCore + -lQtCore \ + -lxqutils # plugin stub deployment plugin.sources = unismsdataplugin.dll diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/editorgenutils/editorgenutils.pro --- a/messagingapp/msgutils/unieditorutils/editorgenutils/editorgenutils.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/editorgenutils/editorgenutils.pro Wed Jun 23 18:09:17 2010 +0300 @@ -21,7 +21,6 @@ INCLUDEPATH += . INCLUDEPATH += ../../../../inc -INCLUDEPATH += ../../s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += BUILD_MUIU_UITLS_DLL @@ -50,11 +49,22 @@ SOURCES += src/MuiuOperationWait.cpp \ src/UniEditorGenUtils.cpp +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/editorgenutils.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/editorgenutils.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + LIBS += -leuser \ -lCentralRepository \ -lconvergedmessageutils \ -lsssettings \ - -ls60qconversions \ -lMsgMedia \ - -lapmime + -lapmime \ + -lxqutils \ + -lavkon \ + -lefsrv diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/editorgenutils/src/UniEditorGenUtils.cpp --- a/messagingapp/msgutils/unieditorutils/editorgenutils/src/UniEditorGenUtils.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/editorgenutils/src/UniEditorGenUtils.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -26,7 +26,7 @@ #include "MessagingVariant.hrh" #include "MessagingInternalCRKeys.h" // Keys #include "UniEditorGenUtils.h" -#include "s60qconversions.h" +#include // CONSTANTS const TInt KMuiuCharQuote = '\"'; @@ -204,7 +204,7 @@ // ---------------------------------------------------- TInt UniEditorGenUtils::UTF8Size( QString aText ) { - HBufC* text = S60QConversions::qStringToS60Desc(aText); + HBufC* text = XQConversions::qStringToS60Desc(aText); TPtrC ptr = text->Des(); TInt count = 0; @@ -301,7 +301,7 @@ QString& mimetype, TMsgMediaType& mediaType) { - HBufC* filepath = S60QConversions::qStringToS60Desc(filePath); + HBufC* filepath = XQConversions::qStringToS60Desc(filePath); int fileSize = 0; CMsgMediaResolver* mediaResolver; @@ -318,7 +318,7 @@ size = fileSize; TDataType datatype; mediaResolver->RecognizeL( file, datatype ); - mimetype = S60QConversions::s60Desc8ToQString(datatype.Des8()); + mimetype = XQConversions::s60Desc8ToQString(datatype.Des8()); mediaType = mediaResolver->MediaType(datatype.Des8()); CleanupStack::PopAndDestroy(mediaResolver); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorpluginloader/unieditorpluginloader.pro --- a/messagingapp/msgutils/unieditorutils/unieditorpluginloader/unieditorpluginloader.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorpluginloader/unieditorpluginloader.pro Wed Jun 23 18:09:17 2010 +0300 @@ -50,3 +50,11 @@ SOURCES += src/unieditorpluginloader.cpp +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/unieditorpluginloader.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/unieditorpluginloader.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/src/unieditormmsplugin_p.cpp --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/src/unieditormmsplugin_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/src/unieditormmsplugin_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -43,7 +43,7 @@ #include "UniSendingSettings.h" #include "unidatamodelloader.h" #include "unidatamodelplugininterface.h" -#include "s60qconversions.h" +#include #include "debugtraces.h" #include "UniEditorGenUtils.h" @@ -167,7 +167,7 @@ populateRecipientsL(aMessage); //populate convergedmessage with the subject - aMessage.setSubject(S60QConversions::s60DescToQString( + aMessage.setSubject(XQConversions::s60DescToQString( MmsMtmL()->SubjectL())); // Priority @@ -209,7 +209,7 @@ //populate convergedmessage with the subject prepended with FW: QString subject = - S60QConversions::s60DescToQString(MmsMtmL()->SubjectL()); + XQConversions::s60DescToQString(MmsMtmL()->SubjectL()); if (!(entry.Forwarded() || subject.startsWith(LOC_FWD, Qt::CaseInsensitive))) @@ -396,7 +396,7 @@ entry.SetForwarded(ETrue); iMessageForwarded = EFalse; } - HBufC* sub = S60QConversions::qStringToS60Desc(aMessage->subject()); + HBufC* sub = XQConversions::qStringToS60Desc(aMessage->subject()); if( sub ) { CleanupStack::PushL(sub); @@ -722,7 +722,7 @@ continue; } // convert from QString to HBufC - HBufC* addr = S60QConversions::qStringToS60Desc(array[i]->address()); + HBufC* addr = XQConversions::qStringToS60Desc(array[i]->address()); CleanupStack::PushL(addr); @@ -733,7 +733,7 @@ } else { - HBufC* displayName = S60QConversions::qStringToS60Desc(array[i]->alias()); + HBufC* displayName = XQConversions::qStringToS60Desc(array[i]->alias()); if(displayName) { CleanupStack::PushL(displayName); @@ -771,10 +771,10 @@ for (TInt i = 0; i < count; ++i) { //Address - QString address = S60QConversions::s60DescToQString( + QString address = XQConversions::s60DescToQString( TMmsGenUtils::PureAddress(addresses[i])); //Alias - QString alias = S60QConversions::s60DescToQString( + QString alias = XQConversions::s60DescToQString( TMmsGenUtils::Alias(addresses[i])); //add recipient to convergedMessage @@ -822,7 +822,7 @@ void CUniEditorMmsPluginPrivate::addObjectL(int aSlideNum, const QString& aFilePath) { - HBufC* filePath = S60QConversions::qStringToS60Desc(aFilePath); + HBufC* filePath = XQConversions::qStringToS60Desc(aFilePath); if (filePath) { @@ -851,7 +851,7 @@ // void CUniEditorMmsPluginPrivate::addAttachmentL(const QString& aFilePath) { - HBufC * filePath = S60QConversions::qStringToS60Desc(aFilePath); + HBufC * filePath = XQConversions::qStringToS60Desc(aFilePath); if (filePath) { CleanupStack::PushL(filePath); @@ -886,7 +886,7 @@ delete iEditor; iEditor = NULL; - HBufC* textContent = S60QConversions::qStringToS60Desc(aBodyText); + HBufC* textContent = XQConversions::qStringToS60Desc(aBodyText); if (textContent) { CleanupStack::PushL(textContent); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgplugin/testmmsplugin.pro --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgplugin/testmmsplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgplugin/testmmsplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -24,7 +24,6 @@ INCLUDEPATH += . INCLUDEPATH += ../../../../../../inc INCLUDEPATH += ../../../../unieditorutils/inc -INCLUDEPATH += ../../../../s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += BUILD_TEST_DLL @@ -51,9 +50,18 @@ TARGET.EPOCALLOWDLLDATA = 1 } +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/test_mms_plugin.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/test_mms_plugin.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + LIBS += -leuser \ -lconvergedmessageutils \ - -ls60qconversions \ + -lxqutils \ -lMsgMedia \ -leditorgenutils \ -lcone \ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgplugin/testmsg.h --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgplugin/testmsg.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgplugin/testmsg.h Wed Jun 23 18:09:17 2010 +0300 @@ -47,7 +47,7 @@ #include #include -#include +#include #include "testmmsplugin.ini" using namespace CommsDat; @@ -163,8 +163,8 @@ QString serviceCenter01(SERVICE_CENTER_01); QString serviceCenter02(SERVICE_CENTER_02); - HBufC* sC01 = S60QConversions::qStringToS60Desc(serviceCenter01); - HBufC* sC02 = S60QConversions::qStringToS60Desc(serviceCenter02); + HBufC* sC01 = XQConversions::qStringToS60Desc(serviceCenter01); + HBufC* sC02 = XQConversions::qStringToS60Desc(serviceCenter02); CleanupStack::PushL(sC01); CleanupStack::PushL(sC02); settings->AddServiceCenterL(_L("Nokia"), *sC01); @@ -249,7 +249,7 @@ //AddBody QString body(TEST_MSG_BODY); - HBufC* bodyText = S60QConversions::qStringToS60Desc(body); + HBufC* bodyText = XQConversions::qStringToS60Desc(body); if (bodyText) { CleanupStack::PushL(bodyText); @@ -268,7 +268,7 @@ //Add Address QString recipient(TEST_MSG_FROM1); // convert from QString to HBufC - HBufC* addr = S60QConversions::qStringToS60Desc(recipient); + HBufC* addr = XQConversions::qStringToS60Desc(recipient); if (addr) { CleanupStack::PushL(addr); @@ -336,7 +336,7 @@ //Subject QString subject(TEST_MSG_SUBJECT); - HBufC* sub = S60QConversions::qStringToS60Desc(subject); + HBufC* sub = XQConversions::qStringToS60Desc(subject); if (sub) { CleanupStack::PushL(sub); @@ -353,7 +353,7 @@ //Add Address QString recipient(TEST_MSG_FROM1); // convert from QString to HBufC - HBufC* addr = S60QConversions::qStringToS60Desc(recipient); + HBufC* addr = XQConversions::qStringToS60Desc(recipient); if (addr) { CleanupStack::PushL(addr); @@ -391,7 +391,7 @@ //body text QString bodyText(TEST_MSG_BODY); - HBufC* text = S60QConversions::qStringToS60Desc(bodyText); + HBufC* text = XQConversions::qStringToS60Desc(bodyText); if (text) { CleanupStack::PushL(text); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/unieditormmsplugin.pro --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/unieditormmsplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/unieditormmsplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -25,7 +25,6 @@ -INCLUDEPATH += ../../../s60qconversions/inc INCLUDEPATH += ../../editorgenutils/inc INCLUDEPATH += ../../../../../inc INCLUDEPATH += ../../../../../mmsengine/mmsmessage/inc @@ -56,10 +55,10 @@ -leditorgenutils \ -lunidatamodelloader \ -lconvergedmessageutils \ - -ls60qconversions \ -lunidatamodel \ -lmsgmedia \ - -leikctl + -leikctl \ + -lxqutils # Build.inf rules diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/src/unieditorsmsplugin.cpp --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/src/unieditorsmsplugin.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/src/unieditorsmsplugin.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -20,7 +20,7 @@ // USER INCLUDES #include "unieditorsmsplugin.h" #include "unieditorsmsplugin_p.h" -#include "s60qconversions.h" +#include // DEBUG #include "debugtraces.h" @@ -155,7 +155,7 @@ TSmsEncoding& aAlternativeEncodingType) { TBool ret = ETrue; - HBufC* buffer = S60QConversions::qStringToS60Desc(aBuf); + HBufC* buffer = XQConversions::qStringToS60Desc(aBuf); TRAPD(error,d_ptr->GetNumPDUsL(*buffer,aNumOfRemainingChars, aNumOfPDUs,aUnicodeMode,aAlternativeEncodingType)); delete buffer; diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/src/unieditorsmsplugin_p.cpp --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/src/unieditorsmsplugin_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/src/unieditorsmsplugin_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -57,13 +57,13 @@ #include "convergedmessage.h" #include "convergedmessageid.h" #include "convergedmessageattachment.h" -#include "s60qconversions.h" + #include "MuiuOperationWait.h" #include "UniEditorGenUtils.h" #include "unidatamodelloader.h" #include "unidatamodelplugininterface.h" #include // for translation support - +#include // resources // CONSTANTS @@ -436,8 +436,8 @@ int addrCount = addrList.count(); for(int i=0; iaddress() ); - HBufC* alt_alias = S60QConversions::qStringToS60Desc( addrList.at(i)->alias() ); + HBufC* addr = XQConversions::qStringToS60Desc( addrList.at(i)->address() ); + HBufC* alt_alias = XQConversions::qStringToS60Desc( addrList.at(i)->alias() ); if(addr->Length() > 0) { CleanupStack::PushL(addr); @@ -512,7 +512,7 @@ // set subject if ( !message->subject().isEmpty() ) { - HBufC* subj = S60QConversions::qStringToS60Desc( message->subject() ); + HBufC* subj = XQConversions::qStringToS60Desc( message->subject() ); if( subj ) { CleanupStack::PushL( subj ); @@ -531,7 +531,7 @@ // ----------------------------------------------------------------------------- void UniEditorSmsPluginPrivate::SetSmsBodyL(ConvergedMessage* message) { - HBufC8* bodytext = S60QConversions::qStringToS60Desc8( message->bodyText() ); + HBufC8* bodytext = XQConversions::qStringToS60Desc8( message->bodyText() ); if( bodytext->Length() > 0) { CleanupStack::PushL( bodytext ); @@ -585,7 +585,7 @@ { // create msv attachment in store CreateAttachmentL(store, - *S60QConversions::qStringToS60Desc(attachment->filePath())); + *XQConversions::qStringToS60Desc(attachment->filePath())); // check for mimetype of the attachment TPtrC8 mimetype; @@ -594,7 +594,7 @@ TMsgMediaType attMediaType = EMsgMediaUnknown; iGenUtils->getFileInfoL(attachment->filePath(), attSize, attMimeType, attMediaType); - mimetype.Set( *S60QConversions::qStringToS60Desc8(attMimeType) ); + mimetype.Set( *XQConversions::qStringToS60Desc8(attMimeType) ); if ( mimetype.CompareF( KMsgMimeTextPlain ) == 0 ) { @@ -634,7 +634,7 @@ } else if(!descr.isNull()) { - buf.Copy( *S60QConversions::qStringToS60Desc(descr) ); + buf.Copy( *XQConversions::qStringToS60Desc(descr) ); } tEntry.iDescription.Set( buf ); @@ -658,11 +658,11 @@ int attSize; QString mimeType; TMsgMediaType mediaType = EMsgMediaUnknown; - QString filepath = S60QConversions::s60DescToQString( aFilePath ); + QString filepath = XQConversions::s60DescToQString( aFilePath ); iGenUtils->getFileInfoL(filepath, attSize, mimeType, mediaType); attachment->SetSize( attSize ); - attachment->SetMimeTypeL( *S60QConversions::qStringToS60Desc8(mimeType) ); + attachment->SetMimeTypeL( *XQConversions::qStringToS60Desc8(mimeType) ); CMuiuOperationWait* wait = CMuiuOperationWait::NewLC(); attachmentManager->AddAttachmentL( aFilePath, attachment, wait->iStatus ); @@ -1765,8 +1765,8 @@ HBufC* pureAddr = TMmsGenUtils::PureAddress( emailRecipients.MdcaPoint( id ) ).AllocLC(); HBufC* aliasAddr = TMmsGenUtils::Alias( emailRecipients.MdcaPoint( id ) ).AllocLC(); ConvergedMessageAddress messageAddress( - S60QConversions::s60DescToQString(*pureAddr), - S60QConversions::s60DescToQString(*aliasAddr)); + XQConversions::s60DescToQString(*pureAddr), + XQConversions::s60DescToQString(*aliasAddr)); CleanupStack::PopAndDestroy(2, pureAddr ); aMessage->addToRecipient(messageAddress); } @@ -1784,8 +1784,8 @@ HBufC* aliasAddr = TMmsGenUtils::Alias(smsRecipients[i]).AllocLC(); ConvergedMessageAddress messageAddress( - S60QConversions::s60DescToQString(*pureAddr), - S60QConversions::s60DescToQString(*aliasAddr)); + XQConversions::s60DescToQString(*pureAddr), + XQConversions::s60DescToQString(*aliasAddr)); CleanupStack::PopAndDestroy(2, pureAddr ); aMessage->addToRecipient(messageAddress); } @@ -1793,7 +1793,7 @@ if( emailFields.Subject( ).Length( ) ) { // If email subject exists -> copy it - aMessage->setSubject(S60QConversions::s60DescToQString( + aMessage->setSubject(XQConversions::s60DescToQString( emailFields.Subject())); } @@ -1820,7 +1820,7 @@ CleanupStack::PushL( store ); MMsvAttachmentManager& manager = store->AttachmentManagerL(); CMsvAttachment *attachment = manager.GetAttachmentInfoL(0); - QString filepath = S60QConversions::s60DescToQString(attachment->FilePath()); + QString filepath = XQConversions::s60DescToQString(attachment->FilePath()); ConvergedMessageAttachment* conv_attachment = new ConvergedMessageAttachment(filepath, ConvergedMessageAttachment::EAttachment); ConvergedMessageAttachmentList conv_attList; @@ -1861,7 +1861,7 @@ HBufC* bodyText = HBufC::NewLC ( totalLength ); TPtr bodyTextPtr ( bodyText->Des() ); SmsMtmL()->Body().Extract( bodyTextPtr, 0, totalLength ); - aMessage->setBodyText(S60QConversions::s60DescToQString( + aMessage->setBodyText(XQConversions::s60DescToQString( bodyTextPtr)); CleanupStack::PopAndDestroy( bodyText ); } diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testmsg.h --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testmsg.h Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testmsg.h Wed Jun 23 18:09:17 2010 +0300 @@ -47,7 +47,7 @@ #include #include -#include +#include #include "testsmsplugin.ini" using namespace CommsDat; @@ -163,8 +163,8 @@ QString serviceCenter01(SERVICE_CENTER_01); QString serviceCenter02(SERVICE_CENTER_02); - HBufC* sC01 = S60QConversions::qStringToS60Desc(serviceCenter01); - HBufC* sC02 = S60QConversions::qStringToS60Desc(serviceCenter02); + HBufC* sC01 = XQConversions::qStringToS60Desc(serviceCenter01); + HBufC* sC02 = XQConversions::qStringToS60Desc(serviceCenter02); CleanupStack::PushL(sC01); CleanupStack::PushL(sC02); settings->AddServiceCenterL(_L("Nokia"), *sC01); @@ -249,7 +249,7 @@ //AddBody QString body(TEST_MSG_BODY); - HBufC* bodyText = S60QConversions::qStringToS60Desc(body); + HBufC* bodyText = XQConversions::qStringToS60Desc(body); if (bodyText) { CleanupStack::PushL(bodyText); @@ -268,7 +268,7 @@ //Add Address QString recipient(TEST_MSG_FROM1); // convert from QString to HBufC - HBufC* addr = S60QConversions::qStringToS60Desc(recipient); + HBufC* addr = XQConversions::qStringToS60Desc(recipient); if (addr) { CleanupStack::PushL(addr); @@ -336,7 +336,7 @@ //Subject QString subject(TEST_MSG_SUBJECT); - HBufC* sub = S60QConversions::qStringToS60Desc(subject); + HBufC* sub = XQConversions::qStringToS60Desc(subject); if (sub) { CleanupStack::PushL(sub); @@ -353,7 +353,7 @@ //Add Address QString recipient(TEST_MSG_FROM1); // convert from QString to HBufC - HBufC* addr = S60QConversions::qStringToS60Desc(recipient); + HBufC* addr = XQConversions::qStringToS60Desc(recipient); if (addr) { CleanupStack::PushL(addr); @@ -391,7 +391,7 @@ //body text QString bodyText(TEST_MSG_BODY); - HBufC* text = S60QConversions::qStringToS60Desc(bodyText); + HBufC* text = XQConversions::qStringToS60Desc(bodyText); if (text) { CleanupStack::PushL(text); diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.pro --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -24,7 +24,6 @@ INCLUDEPATH += . INCLUDEPATH += ../../../../../../inc INCLUDEPATH += ../../../../unieditorutils/inc -INCLUDEPATH += ../../../../s60qconversions/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += BUILD_TEST_DLL @@ -50,10 +49,19 @@ TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 TARGET.EPOCALLOWDLLDATA = 1 } + +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/test_sms_plugin.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/test_sms_plugin.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock LIBS += -leuser \ -lconvergedmessageutils \ - -ls60qconversions \ + -lxqutils \ -lMsgMedia \ -leditorgenutils \ -lcone \ diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/unieditorsmsplugin.pro --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/unieditorsmsplugin.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/unieditorsmsplugin.pro Wed Jun 23 18:09:17 2010 +0300 @@ -24,7 +24,6 @@ # UID 3 TARGET.UID3 = 0x102072DA -INCLUDEPATH += ../../../s60qconversions/inc INCLUDEPATH += ../../editorgenutils/inc INCLUDEPATH += ../../../../../inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE @@ -48,7 +47,6 @@ LIBS += -leuser \ -lconvergedmessageutils \ - -ls60qconversions \ -lMsgMedia \ -leditorgenutils \ -lcone \ @@ -67,7 +65,8 @@ -lCdlEngine \ -lFeatMgr \ -lapmime \ - -lunidatamodelloader + -lunidatamodelloader \ + -lxqutils # plugin stub deployment plugin.sources = unieditorsmsplugin.dll diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/shareui/shareui.pro --- a/messagingapp/shareui/shareui.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/shareui/shareui.pro Wed Jun 23 18:09:17 2010 +0300 @@ -42,6 +42,14 @@ "sis/shareui_stub.sis /epoc32/data/z/system/install/shareui_stub.sis" \ "rom/shareui.iby CORE_APP_LAYER_IBY_EXPORT_PATH(shareui.iby)" +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/shareui.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/shareui.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock HEADERS += shareuiprivate.h diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/smartmessaging/ringbc/ringbc.pro --- a/messagingapp/smartmessaging/ringbc/ringbc.pro Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/smartmessaging/ringbc/ringbc.pro Wed Jun 23 18:09:17 2010 +0300 @@ -26,7 +26,7 @@ INCLUDEPATH += . INCLUDEPATH += ../../../inc -INCLUDEPATH += ../../msgutils/s60qconversions/inc + symbian: { @@ -48,6 +48,15 @@ } +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/ringbc.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/ringbc.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + HEADERS += inc/ringbc.h \ inc/ringbc_p.h \ inc/ringbctoneconverter.h @@ -56,6 +65,7 @@ src/ringbc_p.cpp \ src/ringbctoneconverter.cpp -LIBS += -ls60qconversions \ - -lplatformenv +LIBS += -lplatformenv \ + -lxqutils \ + -lefsrv diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/smartmessaging/ringbc/src/ringbc.cpp --- a/messagingapp/smartmessaging/ringbc/src/ringbc.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/smartmessaging/ringbc/src/ringbc.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -24,7 +24,6 @@ #include "ringbc.h" #include "ringbc_p.h" #include "ringbctoneconverter.h" -#include "s60qconversions.h" #include "debugtraces.h" // ================= MEMBER FUNCTIONS ======================= diff -r 84197e66a4bd -r 35b64624a9e7 messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp --- a/messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp Fri Jun 11 13:35:48 2010 +0300 +++ b/messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp Wed Jun 23 18:09:17 2010 +0300 @@ -25,7 +25,7 @@ // USER INCLUDES #include "ringbc_p.h" #include "ringbctoneconverter.h" -#include "s60qconversions.h" +#include #include "debugtraces.h" //CONSTANTS @@ -129,7 +129,7 @@ CleanupClosePushL(fsSession); - HBufC* fileName = S60QConversions::qStringToS60Desc(path); + HBufC* fileName = XQConversions::qStringToS60Desc(path); RFile file; User::LeaveIfError(file.Open(fsSession, fileName->Des(), @@ -151,7 +151,7 @@ TFileName path = PathInfo::PhoneMemoryRootPath(); path.Append(PathInfo::SimpleSoundsPath()); path.Append(*title); - HBufC* fileExtension = S60QConversions::qStringToS60Desc(extension); + HBufC* fileExtension = XQConversions::qStringToS60Desc(extension); path.Append(fileExtension->Des()); CFileMan* fileMan = CFileMan::NewL(fsSession); @@ -183,7 +183,7 @@ QStringList pathList = path.split("."); QString extension = pathList.at(pathList.count() - 1); - HBufC* fileName = S60QConversions::qStringToS60Desc(path); + HBufC* fileName = XQConversions::qStringToS60Desc(path); TRAP_IGNORE( title = titleL(*fileName)); title.append(QChar('.')); @@ -226,7 +226,7 @@ if (valid) { HBufC* toneTitle = mConverter->TitleLC(data); - title = S60QConversions::s60DescToQString(*toneTitle); + title = XQConversions::s60DescToQString(*toneTitle); CleanupStack::PopAndDestroy(); //title } CleanupStack::PopAndDestroy(); //dataBuf diff -r 84197e66a4bd -r 35b64624a9e7 msg_plat/conversation_services_utilities_api/inc/ccsdefs.h --- a/msg_plat/conversation_services_utilities_api/inc/ccsdefs.h Fri Jun 11 13:35:48 2010 +0300 +++ b/msg_plat/conversation_services_utilities_api/inc/ccsdefs.h Wed Jun 23 18:09:17 2010 +0300 @@ -290,14 +290,22 @@ enum { - EPreviewNone = 0x0000, - EPreviewImage = 0x0001, - EPreviewAudio = 0x0002, - EPreviewVideo = 0x0004, - EPreviewAttachment = 0x0008, - EPreviewForward = 0x0010 + EPreviewNone = 0x0000, + EPreviewImage = 0x0001, + EPreviewAudio = 0x0002, + EPreviewVideo = 0x0004, + EPreviewAttachment = 0x0008, + EPreviewForward = 0x0010, + EPreviewProtectedImage = 0x0020, + EPreviewProtectedAudio = 0x0040, + EPreviewProtectedVideo = 0x0080, + EPreviewCorruptedImage = 0x0100, + EPreviewCorruptedAudio = 0x0200, + EPreviewCorruptedVideo = 0x0400 }; +typedef TUint16 TCsMsgPreviewProperty; + /** * @typedef TCsPreviewMsgProcessingState */ @@ -308,8 +316,6 @@ EPreviewMsgProcessed = 2 }; -typedef TUint8 TCsMsgPreviewProperty; - #endif // __C_CSSERVER_DEFS_H__ // End of file