Binary file messagingapp/conf/CI_messaging.confml has changed
Binary file messagingapp/conf/messaging.confml has changed
--- a/messagingapp/conf/messaging_conf.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/conf/messaging_conf.pro Fri Aug 06 23:19:50 2010 +0530
@@ -24,6 +24,7 @@
BLD_INF_RULES.prj_exports += \
"$${LITERAL_HASH}include <platform_paths.hrh>" \
"messaging.confml APP_LAYER_CONFML(messaging.confml)" \
+ "CI_messaging.confml APP_LAYER_CONFML(CI_messaging.confml)" \
"messaging_101F87EB.crml APP_LAYER_CRML(messaging_101F87EB.crml)" \
"messaging_101F87EC.crml APP_LAYER_CRML(messaging_101F87EC.crml)" \
"messaging_101F87ED.crml APP_LAYER_CRML(messaging_101F87ED.crml)" \
--- a/messagingapp/msgappfw/plugins/msgplugin/src/ccsmsghandler.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgappfw/plugins/msgplugin/src/ccsmsghandler.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -306,8 +306,26 @@
{
error = iSession->GetEntry(aSelection->At(i),service,entry);
- if ( entry.Visible() == EFalse )
- {
+ if (aParent == KMsvGlobalInBoxIndexEntryIdValue && KSenduiMtmSmsUidValue == entry.iMtm.iUid)
+ {
+ iSmsMtm->SwitchCurrentEntryL(entry.Id());
+ iSmsMtm->LoadMessageL();
+
+ CSmsHeader& header = static_cast<CSmsClientMtm*> (iSmsMtm)->SmsHeader();
+ CSmsPDU& pdu = header.Message().SmsPDU();
+ TSmsDataCodingScheme::TSmsClass smsClass;
+
+ if (pdu.Class(smsClass) && smsClass == TSmsDataCodingScheme::ESmsClass0
+ && entry.ReadOnly())
+ {
+ iSmsMtm->SwitchCurrentEntryL(entry.iServiceId);
+ // for class 0 sms dont create conversation entry..
+ continue;
+ }
+
+ }
+ if (entry.Visible() == EFalse)
+ {
// Do a delete if entry becomes invisible.
// e.g) My Nokia registration messages.
RPointerArray<CCsConversationEntry>* hiddenEntries =
@@ -630,7 +648,27 @@
CMsvEntry* msvEntry= iSession->
GetEntryL(iMessageArray->operator[](0));
CleanupStack::PushL(msvEntry);
+ TBool isNotClass0 = ETrue;
+
+ if (msvEntry->Entry().iMtm.iUid == KSenduiMtmSmsUidValue && msvEntry->Entry().Parent()
+ == KMsvGlobalInBoxIndexEntryIdValue)
+ {
+ iSmsMtm->SwitchCurrentEntryL(msvEntry->Entry().Id());
+ iSmsMtm->LoadMessageL();
+
+ CSmsHeader& header = static_cast<CSmsClientMtm*> (iSmsMtm)->SmsHeader();
+ CSmsPDU& pdu = header.Message().SmsPDU();
+ TSmsDataCodingScheme::TSmsClass smsClass;
+
+ if (pdu.Class(smsClass) && smsClass == TSmsDataCodingScheme::ESmsClass0)
+ {
+ isNotClass0 = EFalse;
+ }
+ }
+ if (isNotClass0)
+ {
ProcessResultsL(msvEntry->Entry());
+ }
CleanupStack::PopAndDestroy(msvEntry);
iMessageArray->Remove(0);
}
--- a/messagingapp/msgappfw/server/server.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgappfw/server/server.pro Fri Aug 06 23:19:50 2010 +0530
@@ -80,7 +80,6 @@
-leikcore \
-lefsrv \
-lestor \
- -laknnotify \
-lflogger \
-lecom \
-lcsutils \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/flashmsgnotifier/flashmsgnotifier.pro Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,58 @@
+# 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: Message Error Notifier Exe Pro File
+
+TEMPLATE = app
+TARGET = flashmsgnotifier
+CONFIG += hb service
+
+QT += core
+
+INCLUDEPATH += . inc ../inc
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+INCLUDEPATH += ../msgnotifier/inc
+INCLUDEPATH += ../../../inc
+
+
+HEADERS += inc/flashmsgnotifier.h \
+ inc/flashmsgnotifier_p.h
+
+SOURCES += src/main.cpp \
+ src/flashmsgnotifier.cpp \
+ src/flashmsgnotifier_p.cpp
+
+LIBS += -lxqservice \
+ -lxqserviceutil \
+ -lmsgs \
+ -letext \
+ -lsmcm \
+ -lgsmu \
+ -lxqutils \
+ -lcsserverclientapi \
+ -lxqsystemtoneservice
+
+SERVICE.FILE = service_conf.xml
+SERVICE.OPTIONS = embeddable
+SERVICE.OPTIONS += hidden
+
+# Capability
+symbian {
+ TARGET.UID3 = 0x2001FE72
+ TARGET.CAPABILITY = All -TCB
+}
+
+TRANSLATIONS = messaging.ts
+
+# Build.inf rules
+BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include <platform_paths.hrh>" \
+ "rom/flashmsgnotifier.iby CORE_APP_LAYER_IBY_EXPORT_PATH(flashmsgnotifier.iby)"
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/flashmsgnotifier/inc/flashmsgnotifier.h Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,89 @@
+/*
+ * 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: Implements interface for showing flash messages
+ *
+ */
+
+#ifndef FLASHMSGNOTIFIER_H
+#define FLASHMSGNOTIFIER_H
+
+#include <QObject>
+#include <xqserviceprovider.h>
+#include <qvariant.h>
+#include <qbytearray.h>
+
+class FlashMsgNotifierPrivate;
+class XQSystemToneService;
+
+/**
+ * @class FlashMsgNotifier
+ * Implements interface for showing flash messages
+ */
+class FlashMsgNotifier: public XQServiceProvider
+{
+Q_OBJECT
+
+public:
+ /**
+ * Constructor
+ */
+ FlashMsgNotifier(QObject *parent = 0);
+
+ /**
+ * Destructor
+ */
+ ~FlashMsgNotifier();
+
+private:
+ /**
+ * onDeleteAction
+ * @param msgId message Id
+ */
+ void onSaveAction(int msgId);
+
+ /**
+ * onDeleteAction
+ * @param msgId message Id
+ */
+ void onDeleteAction(int msgId);
+
+public slots:
+
+ /**
+ * displayFlashMsg
+ * @param displayParams QVariantList
+ */
+ void displayFlashMsg(QByteArray displayParams);
+
+private:
+
+ /**
+ * FlashMsgNotifierPrivate obj
+ * Owned.
+ */
+ FlashMsgNotifierPrivate* d_ptr;
+
+ /**
+ * XQSystemToneService obj
+ * Owned.
+ */
+ XQSystemToneService* mSts;
+
+ /**
+ * Address string
+ */
+ QString mAddress;
+};
+
+#endif // MSGERRORNOTIFIER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/flashmsgnotifier/inc/flashmsgnotifier_p.h Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,100 @@
+/*
+ * 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: handler for saving and deleting flash messages
+ *
+ */
+
+#ifndef FLASH_MSG_NOTIFIER_H
+#define FLASH_MSG_NOTIFIER_H
+
+// INCLUDE FILES
+#include <msvapi.h>
+
+// FORWARD DECLARATIONS
+class CMsvSession;
+class MMsvSessionObserver;
+class FlashMsgNotifier;
+class CCSRequestHandler;
+
+/**
+ * @class MsgStoreHandler
+ * handler for saving and deleting flash messages
+ */
+class FlashMsgNotifierPrivate: public CBase, public MMsvSessionObserver
+{
+public:
+
+ /**
+ * Constructor.
+ */
+ explicit FlashMsgNotifierPrivate(FlashMsgNotifier* notifier);
+
+ /**
+ * Destructor
+ */
+ virtual ~FlashMsgNotifierPrivate();
+
+ /**
+ * DeleteMessage
+ * @param aMsgId TMsvId
+ */
+ void DeleteMessage(TMsvId aMsgId);
+
+ /**
+ * SaveMessageL
+ * @param aMsgId TMsvId
+ */
+ void SaveMessageL(TMsvId aMsgId);
+
+ /**
+ * GetConversationIdFromAddressL
+ * @param aContactAddress
+ * @return conversationId
+ */
+ TInt GetConversationIdFromAddressL(TDesC& aContactAddress);
+
+public:
+
+ /**
+ * From MMsvSessionObserver. HandleSessionEventL.
+ */
+ void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
+
+private:
+ /**
+ * Initializes the MsgStoreHandler class.
+ */
+ void InitL();
+
+private:
+ /**
+ * Owned. Msv Session
+ */
+ CMsvSession* iMsvSession;
+
+ /**
+ * Conversation server client
+ * Owned
+ */
+ CCSRequestHandler* iRequestHandler;
+
+ /**
+ * Not Owned. Message notifier.
+ */
+ FlashMsgNotifier* iNotifier;
+
+};
+
+#endif // FLASH_MSG_NOTIFIER_H
+// EOF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/flashmsgnotifier/rom/flashmsgnotifier.iby Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,24 @@
+/*
+ * 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 __FLASH_MSG_NOTIFIER_IBY__
+#define __FLASH_MSG_NOTIFIER_IBY__
+
+file=ABI_DIR\UREL\flashmsgnotifier.exe SHARED_LIB_DIR\flashmsgnotifier.exe
+data=DATAZ_\resource\apps\flashmsgnotifier.rsc resource\apps\flashmsgnotifier.rsc
+data=DATAZ_\private\10003a3f\import\apps\flashmsgnotifier_reg.rsc private\10003a3f\import\apps\flashmsgnotifier_reg.rsc
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/flashmsgnotifier/service_conf.xml Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+ <name>flashmsgnotifier</name>
+ <filepath>No path</filepath>
+ <description>Messaging services</description>
+ <interface>
+ <name>com.nokia.symbian.IFlashMsgNotifier</name>
+ <version>1.0</version>
+ <description>Interface which will display the flash message.</description>
+ </interface>
+</service>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/flashmsgnotifier/src/flashmsgnotifier.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,184 @@
+/*
+ * 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: Implements interface for showing flash messages
+ *
+ */
+
+#include "flashmsgnotifier.h"
+
+#include <hbapplication.h>
+#include <hbdevicemessagebox.h>
+#include <hbmessagebox.h>
+#include <hbtextitem.h>
+#include <QAction>
+#include <debugtraces.h>
+#include <xqconversions.h>
+#include <xqapplicationmanager.h>
+#include <xqaiwrequest.h>
+#include <xqsystemtoneservice.h>
+#include "flashmsgnotifier_p.h"
+
+#define LOC_NOTIFICATION_MSG_TITLE hbTrId("txt_messaging_title_notification_message")
+#define LOC_BUTTON_SAVE hbTrId("txt_common_menu_save")
+#define LOC_BUTTON_DELETE hbTrId("txt_common_menu_delete")
+
+//-------------------------------------------------------
+// FlashMsgNotifier::FlashMsgNotifier()
+// Constructor
+//-------------------------------------------------------
+FlashMsgNotifier::FlashMsgNotifier(QObject *parent) :
+ XQServiceProvider(QLatin1String("flashmsgnotifier.com.nokia.symbian.IFlashMsgNotifier"),
+ parent)
+{
+ publishAll();
+ mSts = new XQSystemToneService;
+ d_ptr = q_check_ptr(new FlashMsgNotifierPrivate(this));
+}
+
+//-------------------------------------------------------
+// FlashMsgNotifier::~FlashMsgNotifier()
+// Destructor
+//-------------------------------------------------------
+FlashMsgNotifier::~FlashMsgNotifier()
+{
+ delete d_ptr;
+ delete mSts;
+}
+
+//-------------------------------------------------------
+// FlashMsgNotifier::displayFlashMsg()
+// @see header
+//-------------------------------------------------------
+void FlashMsgNotifier::displayFlashMsg(QByteArray displayParams)
+{
+ QCRITICAL_WRITE("FlashMsgNotifier::displayFlashMsg start.")
+
+ // Dialog
+ HbDeviceMessageBox notificationDialog(HbMessageBox::MessageTypeNone, this);
+
+ QDataStream stream(displayParams);
+
+ QString body;
+ QString address;
+ QString alias;
+ QString time;
+
+ int msgId;
+
+ stream >> body;
+ stream >> address;
+ stream >> alias;
+ stream >> time;
+ stream >> msgId;
+
+ //Save the address to be used later
+ mAddress.clear();
+ mAddress.append(address);
+
+ QString class0SmsBody;
+
+ class0SmsBody = LOC_NOTIFICATION_MSG_TITLE;
+
+ class0SmsBody.append("\n");
+
+ if (alias.isEmpty()) {
+ class0SmsBody.append(address);
+ class0SmsBody.append("\n");
+ }
+ else {
+ class0SmsBody.append(alias);
+ class0SmsBody.append("\n");
+ }
+
+ class0SmsBody.append(time);
+ class0SmsBody.append("\n");
+ class0SmsBody.append(body);
+
+ QDEBUG_WRITE_FORMAT("flashmsgnotifier launch message ", class0SmsBody);
+
+ notificationDialog.setText(class0SmsBody);
+
+ notificationDialog.setDismissPolicy(HbDialog::NoDismiss);
+ notificationDialog.setTimeout(HbPopup::NoTimeout);
+
+ notificationDialog.setTimeout(HbPopup::NoTimeout);
+ QAction* actionSave = new QAction(LOC_BUTTON_SAVE, this);
+ notificationDialog.setAction(actionSave, HbDeviceMessageBox::AcceptButtonRole);
+
+ QAction* actionQuit = new QAction(LOC_BUTTON_DELETE, this);
+ notificationDialog.setAction(actionQuit, HbDeviceMessageBox::RejectButtonRole);
+
+ //Play audio alert when flash msg is shown
+ mSts->playTone(XQSystemToneService::SmsAlertTone);
+
+ const QAction* result = notificationDialog.exec();
+ // if accepted launch view else quit
+ if (notificationDialog.isAcceptAction(result))
+ {
+ onSaveAction(msgId);
+ }
+ else
+ {
+ onDeleteAction(msgId);
+ }
+ QCRITICAL_WRITE("FlashMsgNotifier::displayFlashMsg end.")
+
+}
+
+//-------------------------------------------------------
+// FlashMsgNotifier::onSaveAction()
+// @see header
+//-------------------------------------------------------
+void FlashMsgNotifier::onSaveAction(int msgId)
+{
+ TRAPD(err, d_ptr->SaveMessageL(msgId));
+ QDEBUG_WRITE_FORMAT("error while saving", err);
+
+ HBufC* addr = NULL;
+ qint64 conversationId = -1;
+ addr = XQConversions::qStringToS60Desc(mAddress);
+ QDEBUG_WRITE_FORMAT("onSaveAction", mAddress);
+ TRAP(err, conversationId = d_ptr->GetConversationIdFromAddressL(*addr));
+ delete addr;
+ QDEBUG_WRITE_FORMAT("error while fetching address", err);
+
+ if (conversationId != -1) {
+ //Switch to CV
+ QList<QVariant> args;
+ QString serviceName("com.nokia.services.hbserviceprovider");
+ QString operation("open(qint64)");
+ XQAiwRequest* request;
+ XQApplicationManager appManager;
+ request = appManager.create(serviceName, "conversationview",
+ operation,false); // embedded
+ if (request == NULL) {
+ QDEBUG_WRITE_FORMAT("error while fetching address",
+ request->lastErrorMessage());
+ return;
+ }
+ args << QVariant(conversationId);
+ request->setArguments(args);
+ request->send();
+ delete request;
+ }
+}
+
+//-------------------------------------------------------
+// FlashMsgNotifier::onDeleteAction()
+// @see header
+//-------------------------------------------------------
+void FlashMsgNotifier::onDeleteAction(int msgId)
+{
+ d_ptr->DeleteMessage(msgId);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/flashmsgnotifier/src/flashmsgnotifier_p.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,146 @@
+/*
+ * 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: handler for saving and deleting flash messages
+ *
+ */
+
+#include "flashmsgnotifier_p.h"
+#include <xqconversions.h>
+#include <msvids.h>
+#include <txtrich.h>
+#include <smuthdr.h>
+#include <debugtraces.h>
+#include <ccsrequesthandler.h>
+#include <tmsvsmsentry.h>
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// FlashMsgNotifierPrivate::FlashMsgNotifierPrivate
+// constructor.
+// ---------------------------------------------------------
+//
+FlashMsgNotifierPrivate::FlashMsgNotifierPrivate(FlashMsgNotifier* notifier) :
+ iMsvSession(NULL), iRequestHandler(NULL),iNotifier(notifier)
+{
+ InitL();
+}
+
+// ---------------------------------------------------------
+// FlashMsgNotifierPrivate::~FlashMsgNotifierPrivate
+// Destructor.
+// ---------------------------------------------------------
+//
+FlashMsgNotifierPrivate::~FlashMsgNotifierPrivate()
+{
+ if (iMsvSession) {
+ delete iMsvSession;
+ iMsvSession = NULL;
+ }
+ if(iRequestHandler) {
+ delete iRequestHandler;
+ iRequestHandler = NULL;
+ }
+ iNotifier = NULL;
+
+}
+
+// ---------------------------------------------------------
+// InitL( )
+// @see header
+// ---------------------------------------------------------
+void FlashMsgNotifierPrivate::InitL()
+{
+ iMsvSession = CMsvSession::OpenSyncL(*this);
+ iRequestHandler = CCSRequestHandler::NewL();
+}
+
+// ---------------------------------------------------------
+// FlashMsgNotifierPrivate::HandleSessionEventL()
+// @see header
+// ---------------------------------------------------------
+//
+void FlashMsgNotifierPrivate::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/,
+ TAny* /*aArg2*/, TAny* /*aArg3*/)
+{
+
+}
+
+// ---------------------------------------------------------
+// FlashMsgNotifierPrivate::DeleteMessage()
+// @see header
+// ---------------------------------------------------------
+//
+void FlashMsgNotifierPrivate::DeleteMessage(TMsvId aMsgId)
+{
+ iMsvSession->RemoveEntry(aMsgId);
+}
+
+// ---------------------------------------------------------
+// FlashMsgNotifierPrivate::SaveMessageL()
+// @see header
+// ---------------------------------------------------------
+//
+void FlashMsgNotifierPrivate::SaveMessageL(TMsvId aMsgId)
+{
+ QDEBUG_WRITE_FORMAT("SaveMessageL Begin", aMsgId);
+
+ CMsvEntry* msgEntry = iMsvSession->GetEntryL(aMsgId);
+ CleanupStack::PushL( msgEntry );
+
+ TMsvEntry entry = msgEntry->Entry();
+
+ // If the entry is readonly we need to make it read...
+ if(entry.ReadOnly())
+ {
+ entry.SetReadOnly(EFalse);
+ entry.SetUnread(EFalse);
+ entry.SetNew(EFalse);
+ msgEntry->ChangeL(entry);
+ }
+
+ CPlainText* nullString = CPlainText::NewL();
+ CleanupStack::PushL( nullString );
+
+ CSmsHeader* smsheader = CSmsHeader::NewL(CSmsPDU::ESmsDeliver, *nullString);
+ CleanupStack::PushL( smsheader );
+
+ CMsvStore* store = msgEntry->EditStoreL();
+ CleanupStack::PushL( store );
+
+ smsheader->RestoreL(*store);
+ smsheader->Message().SmsPDU().SetClass(ETrue, TSmsDataCodingScheme::ESmsClass1 );
+ smsheader->StoreL( *store );
+ store->Commit();
+
+ TMsvSmsEntry entry1 = msgEntry->Entry();
+ entry1.SetClass(ETrue, TSmsDataCodingScheme::ESmsClass1 );
+ msgEntry->ChangeL(entry1);
+ CleanupStack::PopAndDestroy(4);
+ QDEBUG_WRITE_FORMAT("SaveMessageL End", aMsgId);
+}
+
+// ---------------------------------------------------------
+// FlashMsgNotifierPrivate::GetConversationIdFromAddressL()
+// @see header
+// ---------------------------------------------------------
+//
+TInt FlashMsgNotifierPrivate::GetConversationIdFromAddressL(
+ TDesC& aContactAddress)
+{
+ return
+ iRequestHandler->GetConversationIdFromAddressL(aContactAddress);
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/flashmsgnotifier/src/main.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,99 @@
+/*
+ * 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 <QTranslator>
+#include <QLocale>
+#include <QFile>
+#include <hbapplication.h>
+#include <QDateTime>
+#include "flashmsgnotifier.h"
+
+#define LOC_TITLE hbTrId("")
+
+#include "debugtraces.h"
+
+const QString debugFileName("c:/flashmessage.txt");
+
+#ifdef _DEBUG_TRACES_
+void debugInit(QtMsgType type, const char *msg)
+{
+
+ QFile ofile(debugFileName);
+ if (!ofile.open(QIODevice::Append | QIODevice::Text)) {
+ qFatal("error opening results file");
+ return;
+ }
+ QDateTime dt = QDateTime::currentDateTime();
+
+ QTextStream out(&ofile);
+ switch (type) {
+ case QtDebugMsg:
+ out << "\n DEBUG:";
+ out << msg;
+ break;
+ case QtWarningMsg:
+ out << "\n WARN:";
+ out << msg;
+ break;
+ case QtCriticalMsg:
+ out << "\n ";
+ out << dt.toString("dd/MM/yyyy hh:mm:ss.zzz:ap");
+ out << " CRITICAL:";
+ out << msg;
+ break;
+ case QtFatalMsg:
+ out << "\n FATAL:";
+ out << msg;
+ abort();
+ break;
+ default:
+ out << " No Log Selection Type:";
+ out << msg;
+ break;
+
+ }
+}
+#endif
+
+int main(int argc, char *argv[])
+{
+ HbApplication app(argc, argv);
+ app.hideSplash();
+ QString locale = QLocale::system().name();
+ QString path = "z:/resource/qt/translations/";
+ QTranslator translator;
+ QTranslator translator_comm;
+ translator.load(path + QString("messaging_") + locale);
+ translator_comm.load(path + QString("common_") + locale);
+ //translator.load( "messaging_en_GB", ":/translations" );
+ app.installTranslator(&translator);
+ app.installTranslator(&translator_comm);
+
+ app.setApplicationName(LOC_TITLE);
+#ifdef _DEBUG_TRACES_
+ //Debug Logs
+ QFile ofile;
+ if (ofile.exists(debugFileName)) {
+ ofile.remove(debugFileName);
+ }
+ qInstallMsgHandler(debugInit);
+#endif
+ FlashMsgNotifier* w = new FlashMsgNotifier;
+ int rv = app.exec();
+
+ delete w;
+ return rv;
+}
--- a/messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -43,6 +43,7 @@
#define LOC_OUTGOING_MULTIPLE_MESSAGES hbTrId("Outgoing Messages")
#define STATUS_MONO_NEW_MESSAGE QString("qtg_status_new_message")
#define LOC_BUSINESSCARD hbTrId("Business card")
+#define LOC_MULTIMEDIA_MSG hbTrId("txt_messaging_list_indimenu_multimedia_message")
/**
* The number of indicators.
*/
@@ -121,7 +122,7 @@
InteractionActivated),
mIndicatorType(NULL)
{
- QT_TRAP_THROWING( d_ptr = new MsgIndicatorPrivate(this));
+ d_ptr = q_check_ptr(new MsgIndicatorPrivate(this));
}
// ----------------------------------------------------------------------------
@@ -321,7 +322,11 @@
secondaryText = fname.fileName();
}
else if(ECsBioMsg_VCard == info.mMessageType) {
- secondaryText = LOC_BUSINESSCARD;
+ secondaryText = LOC_BUSINESSCARD;
+ }
+ else if (secondaryText.isEmpty() &&
+ (ECsMMS == info.mMessageType || ECsAudio == info.mMessageType)) {
+ secondaryText = LOC_MULTIMEDIA_MSG;
}
}
else {
--- a/messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogwidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotificationdialogplugin/src/msgnotificationdialogwidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -36,11 +36,8 @@
const int NoError = 0;
const int ParameterError = 10000;
-const QString BT_ICON("qtg_large_bluetooth");
-const QString SMS_ICON("qtg_large_new_message");
-const QString MMS_ICON("qtg_large_new_message");
-const QString RINGTONE_ICON("qtg_large_new_message");
-const QString VCARD_ICON("qtg_large_new_message");
+static const char NEW_MSG_ICON[] = "qtg_large_new_message";
+
// ----------------------------------------------------------------------------
// ServiceRequestSenderTask::ServiceRequestSenderTask
// @see msgnotificationdialogwidget.h
@@ -126,50 +123,22 @@
prepareDisplayName(parameters);
+ setIcon(HbIcon(NEW_MSG_ICON));
+
int messageType = parameters.value(KMessageTypeKey).toInt();
if( messageType == ECsSMS)
{
- HbIcon icon(SMS_ICON);
- setIcon(icon);
QString messageBody;
messageBody = parameters.value(KMessageBodyKey).toString();
messageBody.replace(QChar::ParagraphSeparator, QChar::LineSeparator);
messageBody.replace('\r', QChar::LineSeparator);
setText(messageBody);
}
- else if(messageType == ECsMMS)
- {
- HbIcon icon(MMS_ICON);
- setIcon(icon);
- setText(parameters.value(KMessageSubjectKey).toString());
- }
- else if(messageType == ECsMmsNotification)
- {
- HbIcon icon(MMS_ICON);
- setIcon(icon);
- setText(parameters.value(KMessageSubjectKey).toString());
- }
- else if(messageType == ECsRingingTone)
- {
- HbIcon icon(RINGTONE_ICON);
- setIcon(icon);
- setText(parameters.value(KMessageBodyKey).toString());
- }
- else if(messageType == ECsBlueTooth)
- {
- HbIcon icon(BT_ICON); // show default for other message types
- setIcon(icon);
- setText(parameters.value(KMessageBodyKey).toString());
- }
- else if(messageType == ECsBioMsg_VCard)
- {
- HbIcon icon(VCARD_ICON); // show default for other message types
- setIcon(icon);
- setText(parameters.value(KMessageBodyKey).toString());
- }
else
{
- setText(parameters.value(KMessageBodyKey).toString());
+ // No special handling required for other message types.
+ // Subject & Body text are both set to description in msgnotifier.
+ setText(parameters.value(KMessageSubjectKey).toString());
}
// enable touch activation and connect to slot
--- a/messagingapp/msgnotifications/msgnotifications.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifications.pro Fri Aug 06 23:19:50 2010 +0530
@@ -21,4 +21,5 @@
SUBDIRS += msgindicatorplugin/msgindicatorplugin.pro
SUBDIRS += msgnotifier/msgnotifier.pro
SUBDIRS += msgerrornotifier/msgerrornotifier.pro
+SUBDIRS += flashmsgnotifier/flashmsgnotifier.pro
--- a/messagingapp/msgnotifications/msgnotifier/inc/msgnotifier_p.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/inc/msgnotifier_p.h Fri Aug 06 23:19:50 2010 +0530
@@ -20,6 +20,7 @@
#define MSGNOTIFIER_PRIVATE_H
#include <mcsconversationlistchangeobserver.h>
+#include <QRunnable>
// CLASS DECLARATION
class MsgNotifier;
@@ -30,6 +31,18 @@
class XQSystemToneService;
/**
+ * Structure to hold the details of a class 0 SMS
+ */
+struct Class0Info
+{
+ QString body;
+ QString address;
+ QString alias;
+ QString time;
+ int messageId;
+};
+
+/**
* @class MsgNotifierPrivate
*/
@@ -114,6 +127,13 @@
*/
void displayFailedNote(MsgInfo msgInfo);
+ /**
+ * ShowClass0Message
+ * Popups a Dialog with Class 0 SMS message...
+ * @param msgInfo MsgInfo The message information object
+ */
+ void ShowClass0Message(Class0Info& aClass0Info);
+
private:
/**
* Does all the initializations.
@@ -180,5 +200,35 @@
XQSystemToneService* mSts;
};
+
+/**
+ * Class for launching the Class0 SMS dialog in a separate thread..
+ */
+class Class0SmsServiceTask : public QRunnable
+{
+public:
+ /**
+ * Constructor
+ */
+ Class0SmsServiceTask(Class0Info& class0info);
+
+ /**
+ * Destructor
+ */
+ ~Class0SmsServiceTask();
+
+ /**
+ * create and send service request
+ */
+ void run();
+
+private:
+ Class0Info mClass0info;
+};
+
+
+
+
+
#endif // MSGNOTIFIER_PRIVATE_H
//EOF
--- a/messagingapp/msgnotifications/msgnotifier/inc/msgstorehandler.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/inc/msgstorehandler.h Fri Aug 06 23:19:50 2010 +0530
@@ -22,6 +22,7 @@
#include <msvapi.h>
#include <ccsdefs.h>
#include <QString>
+#include <platform/ssm/ssmstateawaresession.h>
//USER INCLUDES
#include "msginfodefs.h"
@@ -40,7 +41,7 @@
* @class MsgStoreHandler
* handles the Messaging store for outbox events.
*/
-class MsgStoreHandler: public CBase, public MMsvSessionObserver, public MMsvEntryObserver
+class MsgStoreHandler: public CActive, public MMsvSessionObserver, public MMsvEntryObserver
{
public:
@@ -116,6 +117,18 @@
*/
TBool OperationOngoing(const TMsvEntry& aEntry) const;
+ /**
+ * Process the class0 SMS and extract all the relevant information
+ * @param aHeader, Class0 SMS header
+ */
+ void HandleClass0SmsL(CMsvEntry* aMsgEntry, TMsvId aMsgId);
+
+ /**
+ * From CActive
+ */
+ void DoCancel();
+ void RunL();
+
private:
/**
* Own. Msv Session
@@ -141,7 +154,12 @@
* List of messages in Fialed states
*/
CMsvEntrySelection* iFailedMessages;
-
+
+ /**
+ * Interface to receive notifications when the
+ * System State changes.
+ */
+ RSsmStateAwareSession iStateAwareSession;
};
#endif // MSG_STORE_HANDLER_H
--- a/messagingapp/msgnotifications/msgnotifier/msgnotifier.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/msgnotifier.pro Fri Aug 06 23:19:50 2010 +0530
@@ -30,6 +30,7 @@
TARGET.CAPABILITY = ALL -TCB
TARGET.UID3 = 0x2002E678
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+INCLUDEPATH += $$OS_LAYER_SYSTEMINCLUDE
SYMBIAN_PLATFORMS = WINSCW ARMV5
}
@@ -70,5 +71,7 @@
-lxqutils \
-lws32 \
-lapgrfx \
- -lxqsystemtoneservice
+ -lxqsystemtoneservice \
+ -lgsmu \
+ -lssmcmn
--- a/messagingapp/msgnotifications/msgnotifier/src/msgnotifier.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/src/msgnotifier.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -35,9 +35,10 @@
#include "debugtraces.h"
// LOCALIZATION CONSTANTS
-#define LOC_RECEIVED_FILES hbTrId("txt_messaging_title_received_files")
-#define LOC_BUSINESS_CARD hbTrId("txt_messaging_dpopinfo_business_card")
+#define LOC_RECEIVED_FILES hbTrId("txt_messaging_title_received_files")
+#define LOC_BUSINESS_CARD hbTrId("txt_messaging_dpopinfo_business_card")
#define CARD_SEPERATOR "-"
+#define LOC_MULTIMEDIA_MSG hbTrId("txt_messaging_dpopinfo_multimedia_message")
// plugin ids
const QString IndicationsPluginId("com.nokia.messaging.newindicatorplugin");
@@ -54,7 +55,7 @@
{
QDEBUG_WRITE("MsgNotifier::MsgNotifier : Enter")
- QT_TRAP_THROWING(d_ptr = new MsgNotifierPrivate(this));
+ d_ptr = q_check_ptr(new MsgNotifierPrivate(this));
mSimHandler = new MsgSimNumDetector();
@@ -118,10 +119,15 @@
}
delete pluginLoader;
}
+ else if( data.mDescription.isEmpty() && (ECsMMS == data.mMsgType || ECsAudio == data.mMsgType) )
+ {
+ description = LOC_MULTIMEDIA_MSG;
+ }
else
{
description = data.mDescription;
}
+
notificationData[QString(KDisplayNameKey)] = data.mDisplayName ;
notificationData[QString(KConversationIdKey)] = data.mConversationId;
notificationData[QString(KMessageTypeKey)] = data.mMsgType;
--- a/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -26,9 +26,12 @@
#include <w32std.h>
#include <apgtask.h>
#include <XQSettingsManager>
+#include <xqaiwrequest.h>
+#include <xqappmgr.h>
#include <xqpublishandsubscribeutils.h>
#include <xqsystemtoneservice.h>
#include <xqconversions.h>
+#include <QThreadPool>
//USER INCLUDES
#include "msgnotifier.h"
@@ -134,12 +137,12 @@
void MsgNotifierPrivate::AddConversationList(
const CCsClientConversation& aClientConversation)
{
- QDEBUG_WRITE("MsgNotifierPrivate::AddConversationList : Enter")
+ QCRITICAL_WRITE("MsgNotifierPrivate::AddConversationList : Enter")
processListEntry(aClientConversation);
updateUnreadIndications();
- QDEBUG_WRITE("MsgNotifierPrivate::AddConversationList : Exit")
+ QCRITICAL_WRITE("MsgNotifierPrivate::AddConversationList : Exit")
}
// ----------------------------------------------------------------------------
@@ -160,12 +163,12 @@
// ----------------------------------------------------------------------------
void MsgNotifierPrivate::ModifyConversationList(const CCsClientConversation& aClientConversation)
{
- QDEBUG_WRITE("MsgNotifierPrivate::ModifyConversationList : Enter")
+ QCRITICAL_WRITE("MsgNotifierPrivate::ModifyConversationList : Enter")
processListEntry(aClientConversation);
updateUnreadIndications();
- QDEBUG_WRITE("MsgNotifierPrivate::ModifyConversationList : Exit")
+ QCRITICAL_WRITE("MsgNotifierPrivate::ModifyConversationList : Exit")
}
// ----------------------------------------------------------------------------
@@ -184,7 +187,7 @@
void MsgNotifierPrivate::processListEntry(
const CCsClientConversation& aClientConversation)
{
- QDEBUG_WRITE("MsgNotifierPrivate::processListEntry : Enter")
+ QCRITICAL_WRITE("MsgNotifierPrivate::processListEntry : Enter")
CCsConversationEntry* convEntry =
aClientConversation.GetConversationEntry();
@@ -238,7 +241,7 @@
}
- QDEBUG_WRITE("MsgNotifierPrivate::processListEntry : Exit")
+ QCRITICAL_WRITE("MsgNotifierPrivate::processListEntry : Exit")
}
// ----------------------------------------------------------------------------
@@ -385,6 +388,82 @@
// @see mcsconversationclientchangeobserver.h
// ----------------------------------------------------------------------------
void MsgNotifierPrivate::PartialDeleteConversationList(
- const CCsClientConversation& aClientConversation){/*empty implementation*/}
+ const CCsClientConversation& /*aClientConversation*/){/*empty implementation*/}
+
+
+// ----------------------------------------------------------------------------
+// MsgNotifierPrivate::ShowClass0Message
+// @see msgnotifier_p.h
+// ----------------------------------------------------------------------------
+
+void MsgNotifierPrivate::ShowClass0Message(Class0Info& class0Info)
+{
+ QCRITICAL_WRITE("flashmsgnotifier BEGIN");
+ QThreadPool::globalInstance()->start(new Class0SmsServiceTask(class0Info));
+ QCRITICAL_WRITE("flashmsgnotifier END");
+}
+
+
+
+
+// ----------------------------------------------------------------------------
+// Class0SmsServiceTask::Class0SmsServiceTask
+// @see msgnotifier_p.h
+// ----------------------------------------------------------------------------
+Class0SmsServiceTask::Class0SmsServiceTask(Class0Info& class0Info):
+mClass0info(class0Info)
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// Class0SmsServiceTask::~Class0SmsServiceTask
+// @see msgnotifier_p.h
+// ----------------------------------------------------------------------------
+Class0SmsServiceTask::~Class0SmsServiceTask()
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// Class0SmsServiceTask::run
+// @see msgnotifier_p.h
+// ----------------------------------------------------------------------------
+void Class0SmsServiceTask::run()
+ {
+ QList<QVariant> args;
+ QString serviceName("flashmsgnotifier");
+ QString interfaceName("com.nokia.symbian.IFlashMsgNotifier");
+ QString operation("displayFlashMsg(QByteArray)");
+ XQAiwRequest* request;
+ XQApplicationManager appManager;
+
+ request = appManager.create(interfaceName, operation, false); //non-embedded
+
+ if ( request == NULL )
+ {
+ QCRITICAL_WRITE("flashmsgnotifier request == NULL");
+ return;
+ }
+
+ QByteArray ba;
+ QDataStream stream(&ba, QIODevice::ReadWrite);
+ stream << mClass0info.body;
+ stream << mClass0info.address;
+ stream << mClass0info.alias;
+ stream << mClass0info.time;
+ stream << mClass0info.messageId;
+
+ args << ba;
+ request->setArguments(args);
+
+ if(!request->send())
+ {
+ QString lastErr;
+ lastErr = request->lastErrorMessage();
+ QDEBUG_WRITE_FORMAT("flashmsgnotifier launch failed", lastErr);
+ }
+
+ QCRITICAL_WRITE("flashmsgnotifier END");
+ delete request;
+ }
//EOF
--- a/messagingapp/msgnotifications/msgnotifier/src/msgstorehandler.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/src/msgstorehandler.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -21,14 +21,20 @@
#include <ccsrequesthandler.h>
#include <ccsconversationentry.h>
#include <ccsclientconversation.h>
-
+#include "msgcontacthandler.h"
#include <msvids.h>
#include <mmsconst.h>
+#include <smuthdr.h>
#include <SendUiConsts.h>
#include <msvsearchsortquery.h>
#include <msvsearchsortoperation.h>
+#include <tmsvsmsentry.h>
+#include <txtrich.h>
+#include <ssm/ssmdomaindefs.h>
+#include "debugtraces.h"
// CONSTANTS
+_LIT(KUnixEpoch, "19700000:000000.000000");
// ================= MEMBER FUNCTIONS =======================
@@ -37,7 +43,7 @@
// ---------------------------------------------------------
//
MsgStoreHandler::MsgStoreHandler(MsgNotifierPrivate* notifier, CCSRequestHandler* aCvServer) :
- iMsvSession(NULL), iNotifier(notifier), iRequestHandler(aCvServer)
+ CActive(EPriorityStandard), iMsvSession(NULL), iNotifier(notifier), iRequestHandler(aCvServer)
{
InitL();
}
@@ -48,6 +54,9 @@
//
MsgStoreHandler::~MsgStoreHandler()
{
+ Cancel();
+ iStateAwareSession.Close();
+
if (iMsvEntry) {
delete iMsvEntry;
iMsvEntry = NULL;
@@ -76,8 +85,82 @@
iMsvEntry->AddObserverL(*this);
iFailedMessages = new (ELeave) CMsvEntrySelection;
+
+ User::LeaveIfError(iStateAwareSession.Connect(KSM2GenMiddlewareDomain3));
+ CActiveScheduler::Add(this);
+
+ TSsmState ssmState = iStateAwareSession.State();
+
+ if (ssmState.MainState() != ESsmNormal)
+ {
+ iStateAwareSession.RequestStateNotification(iStatus);
+ SetActive();
+ }
+ else
+ {
+ RunL();
+ }
+
}
+void MsgStoreHandler::RunL()
+{
+ TSsmState ssmState = iStateAwareSession.State();
+ if (ssmState.MainState() != ESsmNormal)
+ {
+ iStateAwareSession.RequestStateNotification(iStatus);
+ SetActive();
+ }
+ else
+ {
+ //Create the query/operation object
+ CMsvSearchSortOperation *operation = CMsvSearchSortOperation::NewL(*iMsvSession);
+ CleanupStack::PushL(operation);
+ CMsvSearchSortQuery *query = CMsvSearchSortQuery::NewL();
+ CleanupStack::PushL(query);
+
+ //set the query options
+ query->SetParentId(KMsvGlobalInBoxIndexEntryId);
+ query->SetResultType(EMsvResultAsTMsvId);
+ query->AddSearchOptionL(EMsvMtmTypeUID, KSenduiMtmSmsUidValue, EMsvEqual);
+ query->AddSearchOptionL(EMsvUnreadMessages, ETrue);
+ CleanupStack::Pop(query);
+
+ CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC();
+ //ownership of Query transferred to Operation
+ operation->RequestL(query, EFalse, wait->iStatus);
+ wait->Start();
+
+ //Get No of entries
+ RArray<TMsvId> messageArray;
+ operation->GetResultsL(messageArray);
+
+ CMsvEntry* entry = NULL;
+ for (TInt i = 0; i < messageArray.Count(); ++i)
+ {
+ entry = iMsvSession->GetEntryL(messageArray[i]);
+ TMsvSmsEntry smsEntry = entry->Entry();
+ TSmsDataCodingScheme::TSmsClass classType(TSmsDataCodingScheme::ESmsClass0);
+ if (smsEntry.Class(classType))
+ {
+ HandleClass0SmsL(entry, smsEntry.Id());
+ }
+ else
+ {
+ delete entry;
+ entry = NULL;
+ }
+ }
+ messageArray.Close();
+ CleanupStack::PopAndDestroy(2, operation);
+ }
+
+}
+
+void MsgStoreHandler::DoCancel()
+{
+ iStateAwareSession.RequestStateNotificationCancel();
+}
// ---------------------------------------------------------
// MsgStoreHandler::HandleSessionEventL()
// ---------------------------------------------------------
@@ -102,8 +185,32 @@
return;
}
+ // check for incoming class 0 sms
+ if (parent == KMsvGlobalInBoxIndexEntryIdValue && aEvent == EMsvEntriesChanged) {
+ CMsvEntry* inboxEntry = iMsvSession->GetEntryL(KMsvGlobalInBoxIndexEntryId);
+ for (TInt i = 0; i < selection->Count(); ++i) {
+ TMsvEntry entry = inboxEntry->ChildDataL(selection->At(i));
+ if (KSenduiMtmSmsUidValue == entry.iMtm.iUid) {
+ CMsvEntry* msgEntry = iMsvSession->GetEntryL(entry.Id());
+ TMsvSmsEntry smsEntry = msgEntry->Entry();
+ TSmsDataCodingScheme::TSmsClass classType(TSmsDataCodingScheme::ESmsClass0);
+
+ if (smsEntry.Class(classType) && smsEntry.Unread())
+ {
+ HandleClass0SmsL(msgEntry, smsEntry.Id());
+ }
+ else
+ {
+ delete msgEntry;
+ msgEntry = NULL;
+ }
+ }
+
+ } // for (TInt i = 0; i < selection->Count(); ++i)
+ delete inboxEntry;
+ }
//Handling for outbox entries
- if (parent == KMsvGlobalOutBoxIndexEntryIdValue) {
+ else if (parent == KMsvGlobalOutBoxIndexEntryIdValue) {
CMsvEntry* rootEntry = iMsvSession->GetEntryL(KMsvGlobalOutBoxIndexEntryId);
for (TInt i = 0; i < selection->Count(); ++i) {
@@ -166,6 +273,79 @@
}
// ---------------------------------------------------------
+// MsgStoreHandler::HandleClass0SmsL()
+// ---------------------------------------------------------
+//
+void MsgStoreHandler::HandleClass0SmsL(CMsvEntry* aMsgEntry, TMsvId aMsgId)
+{
+ CleanupStack::PushL(aMsgEntry);
+
+ CMsvStore* store = aMsgEntry->ReadStoreL();
+ CleanupStack::PushL(store);
+
+ CParaFormatLayer* paraFormatLayer = CParaFormatLayer::NewL();
+ CleanupStack::PushL(paraFormatLayer);
+
+ CCharFormatLayer* charFormatLayer = CCharFormatLayer::NewL();
+ CleanupStack::PushL(charFormatLayer);
+
+ CRichText* richText = CRichText::NewL(paraFormatLayer, charFormatLayer);
+ CleanupStack::PushL(richText);
+
+ store->RestoreBodyTextL(*richText);
+
+ TInt len = richText->DocumentLength();
+ HBufC* bufBody = HBufC::NewLC(len * 2);
+
+ // Get Body content of SMS message
+ TPtr bufBodyPtr = bufBody->Des();
+ richText->Extract(bufBodyPtr, 0, len);
+
+ //convert bufbody to qstring..
+ QString body = XQConversions::s60DescToQString(*bufBody);
+
+ Class0Info class0Info;
+
+ class0Info.body = body;
+ CleanupStack::PopAndDestroy(bufBody);
+
+ // Get From address of SMS message
+ CPlainText* nullString = CPlainText::NewL();
+ CleanupStack::PushL(nullString);
+
+ CSmsHeader* smsheader = CSmsHeader::NewL(CSmsPDU::ESmsDeliver, *nullString);
+ CleanupStack::PushL(smsheader);
+ smsheader->RestoreL(*store);
+
+ QString address = XQConversions::s60DescToQString(smsheader->FromAddress());
+ class0Info.address = address;
+
+ // Get alias of SMS message
+ QString alias;
+ int count;
+ MsgContactHandler::resolveContactDisplayName(address, alias, count);
+ class0Info.alias = alias;
+
+ // Get timestamp of SMS message
+ QDateTime timeStamp;
+ TTime time = aMsgEntry->Entry().iDate;
+ TTime unixEpoch(KUnixEpoch);
+ TTimeIntervalSeconds seconds;
+ time.SecondsFrom(unixEpoch, seconds);
+ timeStamp.setTime_t(seconds.Int());
+
+ const QString times = timeStamp.toString("dd/MM/yy hh:mm ap");
+ class0Info.time = times;
+
+ class0Info.messageId = aMsgId;
+ CleanupStack::PopAndDestroy(7);
+ aMsgEntry = NULL;
+
+ // Show the SMS message..
+ iNotifier->ShowClass0Message(class0Info);
+}
+
+// ---------------------------------------------------------
// MsgStoreHandler::HandleEntryEventL()
// ---------------------------------------------------------
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/mmstestbed/bwins/mmstestbedu.def Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,71 @@
+EXPORTS
+ ?sendReadReport@MmsTestBed@@QAEXXZ @ 1 NONAME ; void MmsTestBed::sendReadReport(void)
+ ?cleanAll@MmsTestBed@@QAEXXZ @ 2 NONAME ; void MmsTestBed::cleanAll(void)
+ ??0MmsTestBed@@QAE@XZ @ 3 NONAME ; MmsTestBed::MmsTestBed(void)
+ ?entryCreatedInDraft@MmsTestBed@@IAEXJ@Z @ 4 NONAME ; void MmsTestBed::entryCreatedInDraft(long)
+ ?trUtf8@MmsTestBed@@SA?AVQString@@PBD0@Z @ 5 NONAME ; class QString MmsTestBed::trUtf8(char const *, char const *)
+ ?encodeMessageFromDrafts@MmsTestBed@@AAEXXZ @ 6 NONAME ; void MmsTestBed::encodeMessageFromDrafts(void)
+ ?copyDrafts@MmsTestBed@@QAEXXZ @ 7 NONAME ; void MmsTestBed::copyDrafts(void)
+ ?HandleSessionEventL@MmsTestBed@@MAEXW4TMsvSessionEvent@MMsvSessionObserver@@PAX11@Z @ 8 NONAME ; void MmsTestBed::HandleSessionEventL(enum MMsvSessionObserver::TMsvSessionEvent, void *, void *, void *)
+ ??1MmsTestBed@@UAE@XZ @ 9 NONAME ; MmsTestBed::~MmsTestBed(void)
+ ?sendViaClient@MmsTestBed@@QAEXXZ @ 10 NONAME ; void MmsTestBed::sendViaClient(void)
+ ?scheduledSend@MmsTestBed@@QAEXJH@Z @ 11 NONAME ; void MmsTestBed::scheduledSend(long, int)
+ ?garbageCollection@MmsTestBed@@QAEXK@Z @ 12 NONAME ; void MmsTestBed::garbageCollection(unsigned long)
+ ??_EMmsTestBed@@UAE@I@Z @ 13 NONAME ; MmsTestBed::~MmsTestBed(unsigned int)
+ ?testFile@MmsTestBed@@AAEXAAV?$TBuf@$0BAA@@@HJ@Z @ 14 NONAME ; void MmsTestBed::testFile(class TBuf<256> &, int, long)
+ ?checkLogClient@MmsTestBed@@AAE_NXZ @ 15 NONAME ; bool MmsTestBed::checkLogClient(void)
+ ?sendDeliveryReport@MmsTestBed@@QAEXXZ @ 16 NONAME ; void MmsTestBed::sendDeliveryReport(void)
+ ?metaObject@MmsTestBed@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * MmsTestBed::metaObject(void) const
+ ?fetchForced@MmsTestBed@@QAEXH@Z @ 18 NONAME ; void MmsTestBed::fetchForced(int)
+ ?qt_metacall@MmsTestBed@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 19 NONAME ; int MmsTestBed::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@MmsTestBed@@UAEPAXPBD@Z @ 20 NONAME ; void * MmsTestBed::qt_metacast(char const *)
+ ?fromMmscToInbox@MmsTestBed@@QAEXXZ @ 21 NONAME ; void MmsTestBed::fromMmscToInbox(void)
+ ?createEntry@MmsTestBed@@QAEXAAVTMsvEntry@@AAVCMsvEntry@@@Z @ 22 NONAME ; void MmsTestBed::createEntry(class TMsvEntry &, class CMsvEntry &)
+ ?entryMovedToSent@MmsTestBed@@IAEXJ@Z @ 23 NONAME ; void MmsTestBed::entryMovedToSent(long)
+ ?cancelSendScheduling@MmsTestBed@@QAEXXZ @ 24 NONAME ; void MmsTestBed::cancelSendScheduling(void)
+ ?tr@MmsTestBed@@SA?AVQString@@PBD0@Z @ 25 NONAME ; class QString MmsTestBed::tr(char const *, char const *)
+ ?reply@MmsTestBed@@QAEXXZ @ 26 NONAME ; void MmsTestBed::reply(void)
+ ?fromOutboxToMmsc@MmsTestBed@@QAEXXZ @ 27 NONAME ; void MmsTestBed::fromOutboxToMmsc(void)
+ ?findDefaultL@MmsTestBed@@AAEXXZ @ 28 NONAME ; void MmsTestBed::findDefaultL(void)
+ ?cleanupAndCreateNewService@MmsTestBed@@QAEXXZ @ 29 NONAME ; void MmsTestBed::cleanupAndCreateNewService(void)
+ ?restoreFactorySettings@MmsTestBed@@QAEXXZ @ 30 NONAME ; void MmsTestBed::restoreFactorySettings(void)
+ ?deleteEntry@MmsTestBed@@AAEXJAAVCMsvEntry@@@Z @ 31 NONAME ; void MmsTestBed::deleteEntry(long, class CMsvEntry &)
+ ?entryMovedToOutbox@MmsTestBed@@IAEXJ@Z @ 32 NONAME ; void MmsTestBed::entryMovedToOutbox(long)
+ ?cleanDrafts@MmsTestBed@@QAEXXZ @ 33 NONAME ; void MmsTestBed::cleanDrafts(void)
+ ?getEventType@MmsTestBed@@QAEXXZ @ 34 NONAME ; void MmsTestBed::getEventType(void)
+ ?addMMBoxDescriptions@MmsTestBed@@AAEXXZ @ 35 NONAME ; void MmsTestBed::addMMBoxDescriptions(void)
+ ?deleteNotifications@MmsTestBed@@QAEXXZ @ 36 NONAME ; void MmsTestBed::deleteNotifications(void)
+ ?deleteSendSchedule@MmsTestBed@@QAEXXZ @ 37 NONAME ; void MmsTestBed::deleteSendSchedule(void)
+ ?fetchForcedImmediate@MmsTestBed@@QAEXXZ @ 38 NONAME ; void MmsTestBed::fetchForcedImmediate(void)
+ ?sendFromFile@MmsTestBed@@QAEXXZ @ 39 NONAME ; void MmsTestBed::sendFromFile(void)
+ ?createMmsService@MmsTestBed@@AAEXXZ @ 40 NONAME ; void MmsTestBed::createMmsService(void)
+ ?replyToAll@MmsTestBed@@QAEXXZ @ 41 NONAME ; void MmsTestBed::replyToAll(void)
+ ?cancelFetchScheduling@MmsTestBed@@QAEXXZ @ 42 NONAME ; void MmsTestBed::cancelFetchScheduling(void)
+ ?cleanOutbox@MmsTestBed@@QAEXXZ @ 43 NONAME ; void MmsTestBed::cleanOutbox(void)
+ ?sendOneByOne@MmsTestBed@@QAEXXZ @ 44 NONAME ; void MmsTestBed::sendOneByOne(void)
+ ?forward@MmsTestBed@@QAEXXZ @ 45 NONAME ; void MmsTestBed::forward(void)
+ ?getLogEntries@MmsTestBed@@AAEHXZ @ 46 NONAME ; int MmsTestBed::getLogEntries(void)
+ ?entryCreatedInInbox@MmsTestBed@@IAEXJ@Z @ 47 NONAME ; void MmsTestBed::entryCreatedInInbox(long)
+ ?setConnectionLocal@MmsTestBed@@QAEX_N@Z @ 48 NONAME ; void MmsTestBed::setConnectionLocal(bool)
+ ?generateDeliveryReport@MmsTestBed@@QAEXPAVCMmsHeaders@@@Z @ 49 NONAME ; void MmsTestBed::generateDeliveryReport(class CMmsHeaders *)
+ ?setFetchingState@MmsTestBed@@QAEXW4TMmsReceivingMode@@@Z @ 50 NONAME ; void MmsTestBed::setFetchingState(enum TMmsReceivingMode)
+ ?setOnline@MmsTestBed@@QAEX_N@Z @ 51 NONAME ; void MmsTestBed::setOnline(bool)
+ ?tr@MmsTestBed@@SA?AVQString@@PBD0H@Z @ 52 NONAME ; class QString MmsTestBed::tr(char const *, char const *, int)
+ ?findMMSFolder@MmsTestBed@@AAEJXZ @ 53 NONAME ; long MmsTestBed::findMMSFolder(void)
+ ?deleteEventType@MmsTestBed@@QAEXXZ @ 54 NONAME ; void MmsTestBed::deleteEventType(void)
+ ?staticMetaObject@MmsTestBed@@2UQMetaObject@@B @ 55 NONAME ; struct QMetaObject const MmsTestBed::staticMetaObject
+ ?cleanInbox@MmsTestBed@@QAEXXZ @ 56 NONAME ; void MmsTestBed::cleanInbox(void)
+ ?doAFetchCycle@MmsTestBed@@QAEXXZ @ 57 NONAME ; void MmsTestBed::doAFetchCycle(void)
+ ?cleanLog@MmsTestBed@@QAEXXZ @ 58 NONAME ; void MmsTestBed::cleanLog(void)
+ ?getStaticMetaObject@MmsTestBed@@SAABUQMetaObject@@XZ @ 59 NONAME ; struct QMetaObject const & MmsTestBed::getStaticMetaObject(void)
+ ?messageVariation@MmsTestBed@@QAEXXZ @ 60 NONAME ; void MmsTestBed::messageVariation(void)
+ ?fromOutboxToMmscWithMemoryFailure@MmsTestBed@@QAEHXZ @ 61 NONAME ; int MmsTestBed::fromOutboxToMmscWithMemoryFailure(void)
+ ?cleanup@MmsTestBed@@AAEXXZ @ 62 NONAME ; void MmsTestBed::cleanup(void)
+ ?fromMmscToInboxWithMemoryFailure@MmsTestBed@@QAEHXZ @ 63 NONAME ; int MmsTestBed::fromMmscToInboxWithMemoryFailure(void)
+ ?deleteFetchSchedule@MmsTestBed@@QAEXXZ @ 64 NONAME ; void MmsTestBed::deleteFetchSchedule(void)
+ ?addEventType@MmsTestBed@@QAEXXZ @ 65 NONAME ; void MmsTestBed::addEventType(void)
+ ?sendNotifications@MmsTestBed@@QAEXXZ @ 66 NONAME ; void MmsTestBed::sendNotifications(void)
+ ?trUtf8@MmsTestBed@@SA?AVQString@@PBD0H@Z @ 67 NONAME ; class QString MmsTestBed::trUtf8(char const *, char const *, int)
+ ?scheduledFetch@MmsTestBed@@QAEXH@Z @ 68 NONAME ; void MmsTestBed::scheduledFetch(int)
+ ?cleanSent@MmsTestBed@@QAEXXZ @ 69 NONAME ; void MmsTestBed::cleanSent(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/mmstestbed/eabi/mmstestbedu.def Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,72 @@
+EXPORTS
+ _ZN10MmsTestBed10cleanInboxEv @ 1 NONAME
+ _ZN10MmsTestBed10copyDraftsEv @ 2 NONAME
+ _ZN10MmsTestBed10replyToAllEv @ 3 NONAME
+ _ZN10MmsTestBed11cleanDraftsEv @ 4 NONAME
+ _ZN10MmsTestBed11cleanOutboxEv @ 5 NONAME
+ _ZN10MmsTestBed11createEntryER9TMsvEntryR9CMsvEntry @ 6 NONAME
+ _ZN10MmsTestBed11deleteEntryElR9CMsvEntry @ 7 NONAME
+ _ZN10MmsTestBed11fetchForcedEi @ 8 NONAME
+ _ZN10MmsTestBed11qt_metacallEN11QMetaObject4CallEiPPv @ 9 NONAME
+ _ZN10MmsTestBed11qt_metacastEPKc @ 10 NONAME
+ _ZN10MmsTestBed12addEventTypeEv @ 11 NONAME
+ _ZN10MmsTestBed12findDefaultLEv @ 12 NONAME
+ _ZN10MmsTestBed12getEventTypeEv @ 13 NONAME
+ _ZN10MmsTestBed12sendFromFileEv @ 14 NONAME
+ _ZN10MmsTestBed12sendOneByOneEv @ 15 NONAME
+ _ZN10MmsTestBed13doAFetchCycleEv @ 16 NONAME
+ _ZN10MmsTestBed13findMMSFolderEv @ 17 NONAME
+ _ZN10MmsTestBed13getLogEntriesEv @ 18 NONAME
+ _ZN10MmsTestBed13scheduledSendEli @ 19 NONAME
+ _ZN10MmsTestBed13sendViaClientEv @ 20 NONAME
+ _ZN10MmsTestBed14checkLogClientEv @ 21 NONAME
+ _ZN10MmsTestBed14scheduledFetchEi @ 22 NONAME
+ _ZN10MmsTestBed14sendReadReportEv @ 23 NONAME
+ _ZN10MmsTestBed15deleteEventTypeEv @ 24 NONAME
+ _ZN10MmsTestBed15fromMmscToInboxEv @ 25 NONAME
+ _ZN10MmsTestBed16createMmsServiceEv @ 26 NONAME
+ _ZN10MmsTestBed16entryMovedToSentEl @ 27 NONAME
+ _ZN10MmsTestBed16fromOutboxToMmscEv @ 28 NONAME
+ _ZN10MmsTestBed16messageVariationEv @ 29 NONAME
+ _ZN10MmsTestBed16setFetchingStateE17TMmsReceivingMode @ 30 NONAME
+ _ZN10MmsTestBed16staticMetaObjectE @ 31 NONAME DATA 16
+ _ZN10MmsTestBed17garbageCollectionEm @ 32 NONAME
+ _ZN10MmsTestBed17sendNotificationsEv @ 33 NONAME
+ _ZN10MmsTestBed18deleteSendScheduleEv @ 34 NONAME
+ _ZN10MmsTestBed18entryMovedToOutboxEl @ 35 NONAME
+ _ZN10MmsTestBed18sendDeliveryReportEv @ 36 NONAME
+ _ZN10MmsTestBed18setConnectionLocalEb @ 37 NONAME
+ _ZN10MmsTestBed19HandleSessionEventLEN19MMsvSessionObserver16TMsvSessionEventEPvS2_S2_ @ 38 NONAME
+ _ZN10MmsTestBed19deleteFetchScheduleEv @ 39 NONAME
+ _ZN10MmsTestBed19deleteNotificationsEv @ 40 NONAME
+ _ZN10MmsTestBed19entryCreatedInDraftEl @ 41 NONAME
+ _ZN10MmsTestBed19entryCreatedInInboxEl @ 42 NONAME
+ _ZN10MmsTestBed19getStaticMetaObjectEv @ 43 NONAME
+ _ZN10MmsTestBed20addMMBoxDescriptionsEv @ 44 NONAME
+ _ZN10MmsTestBed20cancelSendSchedulingEv @ 45 NONAME
+ _ZN10MmsTestBed20fetchForcedImmediateEv @ 46 NONAME
+ _ZN10MmsTestBed21cancelFetchSchedulingEv @ 47 NONAME
+ _ZN10MmsTestBed22generateDeliveryReportEP11CMmsHeaders @ 48 NONAME
+ _ZN10MmsTestBed22restoreFactorySettingsEv @ 49 NONAME
+ _ZN10MmsTestBed23encodeMessageFromDraftsEv @ 50 NONAME
+ _ZN10MmsTestBed26cleanupAndCreateNewServiceEv @ 51 NONAME
+ _ZN10MmsTestBed32fromMmscToInboxWithMemoryFailureEv @ 52 NONAME
+ _ZN10MmsTestBed33fromOutboxToMmscWithMemoryFailureEv @ 53 NONAME
+ _ZN10MmsTestBed5replyEv @ 54 NONAME
+ _ZN10MmsTestBed7cleanupEv @ 55 NONAME
+ _ZN10MmsTestBed7forwardEv @ 56 NONAME
+ _ZN10MmsTestBed8cleanAllEv @ 57 NONAME
+ _ZN10MmsTestBed8cleanLogEv @ 58 NONAME
+ _ZN10MmsTestBed8testFileER4TBufILi256EEil @ 59 NONAME
+ _ZN10MmsTestBed9cleanSentEv @ 60 NONAME
+ _ZN10MmsTestBed9setOnlineEb @ 61 NONAME
+ _ZN10MmsTestBedC1Ev @ 62 NONAME
+ _ZN10MmsTestBedC2Ev @ 63 NONAME
+ _ZN10MmsTestBedD0Ev @ 64 NONAME
+ _ZN10MmsTestBedD1Ev @ 65 NONAME
+ _ZN10MmsTestBedD2Ev @ 66 NONAME
+ _ZNK10MmsTestBed10metaObjectEv @ 67 NONAME
+ _ZTI10MmsTestBed @ 68 NONAME
+ _ZTV10MmsTestBed @ 69 NONAME
+ _ZThn8_N10MmsTestBed19HandleSessionEventLEN19MMsvSessionObserver16TMsvSessionEventEPvS2_S2_ @ 70 NONAME
+
Binary file messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/data/SmileyFace.gif has changed
--- a/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/src/testmmsplugin.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/src/testmmsplugin.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -29,15 +29,6 @@
-//out put directory for test results.
-QString OUTPUTDIRECTORY = "c:/logs/testmmsplugin";
-//o/p directory for data to be written on temp file.
-QString TEMPDIR = "c:/logs/testmmsplugin/testdata";
-//test result O/P file name.
-QString RESULTFILE = "c:/logs/testmmsplugin/result_%1.txt";
-// folder named UID3 of testmmsplugin inside private folder.
-const QString PRIVATE_DIR("C:/private/E4c5e8b4");
-
//factory method to create objects.
QObject* getObject(QString className)
{
@@ -51,60 +42,33 @@
}
}
-//creating o/p directory.
-void createOutPutDirectory()
- {
- QDir dir;
- //o/p dir
- dir.mkdir(OUTPUTDIRECTORY);
- //tmp dir
- dir.mkdir(TEMPDIR);
- // dir inside private folder.
- dir.mkdir(PRIVATE_DIR);
- }
-
//main entry point
int main(int argc, char *argv[])
{
int ret = -1;
- QCoreApplication app(argc, argv);
-
- //creating output directory.
- createOutPutDirectory();
-
- //the configuration file.
- QFile data("c:/testmmsplugin.cfg");
-
+ QCoreApplication app(argc, argv);
+
+ //the configuration file.
+ QFile data("c:/testmmsplugin.cfg");
if (data.open(QFile::ReadOnly))
{
- QTextStream in(&data);
- while(!in.atEnd())
- {
- QStringList args;
- QString appName = argv[0];
- args << appName;
-
- QString option = "-o";
- args << option;
+ QTextStream in(&data);
+ while(!in.atEnd())
+ {
+ QString name = in.readLine();
+ QObject* tc = getObject(name);
+
+ if(tc)
+ {
+ ret = QTest::qExec(tc, argc, argv);
+ delete tc;
+ }
+ }
+ }
+ return ret;
- QString outFile = RESULTFILE;
- QString name = in.readLine();
- outFile = outFile.arg(name);
- args << outFile;
-
- QObject* tc = getObject(name);
+ }
- if(tc)
- {
-
- ret = QTest::qExec(tc, args);
- delete tc;
- }
- }
- }
- data.close();
- return ret;
- }
--- a/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/testmmsplugin.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/testmmsplugin.pro Fri Aug 06 23:19:50 2010 +0530
@@ -55,14 +55,17 @@
SYMBIAN_PLATFORMS = WINSCW ARMV5
symbian {
- TARGET.UID3 = 0xE7232a7c
+ TARGET.UID3 = 0xE7232a7c
TARGET.CAPABILITY = CAP_GENERAL_DLL
TARGET.EPOCSTACKSIZE = 0x8000
TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000
TARGET.EPOCALLOWDLLDATA = 1
VENDORID = VID_DEFAULT
BLD_INF_RULES.prj_exports += "data/testmmsplugin.cfg c:/testmmsplugin.cfg"
- BLD_INF_RULES.prj_exports += "data/testmmsplugin.pl c:/testmmsplugin.pl"
+ BLD_INF_RULES.prj_exports += "data/testmmsplugin.pl c:/testmmsplugin.pl"
+ BLD_INF_RULES.prj_exports += "data/SmileyFace.gif c:/SmileyFace.gif"
+ BLD_INF_RULES.prj_exports += "data/sample.txt c:/sample.txt"
+
}
LIBS += -leuser \
@@ -161,4 +164,14 @@
addFiles.sources = mmstestbed.dll
addFiles.path = /sys/bin
DEPLOYMENT += addFiles
- }
+
+ addP2.sources = ./data/SmileyFace.gif
+ addP2.path = C:/
+ DEPLOYMENT += addP2
+
+ addP3.sources = ./data/sample.txt
+ addP3.path = C:/
+ DEPLOYMENT += addP3
+
+
+}
--- a/messagingapp/msgservices/msgserviceapp/inc/msgserviceviewmanager.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/inc/msgserviceviewmanager.h Fri Aug 06 23:19:50 2010 +0530
@@ -21,7 +21,10 @@
#include <QObject>
#include <QVariant>
+#include <HbEffect>
+class QGraphicsItem;
+class QGraphicsPixmapItem;
class HbMainWindow;
class MsgUnifiedEditorView;
class UnifiedViewer;
@@ -123,6 +126,35 @@
*/
void handleBTMessage(int msgId);
+ /**
+ * Start a custom effect animation
+ * e.g. editor's send effect
+ * @param effectEvent, effect type for animation
+ */
+ void startAnimation(QString effectEvent);
+
+ /**
+ * Reset a custom effect animation
+ * e.g. editor's send effect
+ * @param effectEvent, animation effect type which needs to be reset
+ * @param item, QGraphicsItem on which the effect was run
+ */
+ void resetAnimation(QString effectEvent, QGraphicsItem* item);
+
+ /**
+ * Grab screenshot for animation purpose
+ * e.g. editor's send effect animation
+ * @return QGraphicsPixmapItem, item on which animation will run
+ */
+ QGraphicsPixmapItem *screenShot();
+
+ /**
+ * find and return animation file for an effect
+ * @param effectEvent, effect for which file definition needs to be found
+ * @return QString, animation definition file path
+ */
+ QString getAnimationFile(QString effectEvent);
+
private slots:
/**
* This slot is called on mainwindows back action.
@@ -146,7 +178,14 @@
* @param action selected action (yes or no)
*/
void onDialogSaveTone(HbAction* action);
-
+
+ /**
+ * Handle a custom effect animation complete signal
+ * e.g. editor's send effect complete
+ * @param status, status information of the effect that has finished
+ */
+ void onAnimationComplete(const HbEffect::EffectStatus &status);
+
private:
/**
* Main window pointer.
@@ -192,8 +231,7 @@
/**
* message Id
*/
- int mMessageId;
-
+ int mMessageId;
};
#endif /* MSGSERVICEVIEWMANAGER_H_ */
--- a/messagingapp/msgservices/msgserviceapp/msgserviceapp.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/msgserviceapp.pro Fri Aug 06 23:19:50 2010 +0530
@@ -50,6 +50,8 @@
TARGET.CAPABILITY = ALL -TCB
TARGET.UID3 = 0x2002E6DA
+RESOURCES += msgserviceapp.qrc
+
LIBS += -lxqservice \
-lxqserviceutil \
-lconvergedmessageutils \
@@ -62,4 +64,8 @@
BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
- ".\rom\msgserviceapp.iby CORE_APP_LAYER_IBY_EXPORT_PATH(msgserviceapp.iby)"
+ ".\rom\msgserviceapp.iby CORE_APP_LAYER_IBY_EXPORT_PATH(msgserviceapp.iby)" \
+ "resources/messagingsendservice.splashml /epoc32/data/z/resource/hb/splashml/messagingsendservice.splashml" \
+ "resources/messagingsendservice.docml /epoc32/data/z/resource/hb/splashml/messagingsendservice.docml" \
+ "resources/messagingviewservice.splashml /epoc32/data/z/resource/hb/splashml/messagingviewservice.splashml" \
+ "resources/messagingviewservice.docml /epoc32/data/z/resource/hb/splashml/messagingviewservice.docml"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgservices/msgserviceapp/msgserviceapp.qrc Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/effects">
+ <file alias="sendeffect.fxml">resources/sendeffect.fxml</file>
+ </qresource>
+</RCC>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgservices/msgserviceapp/resources/messagingsendservice.docml Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+ <object name="viewextn" type="HbAction">
+ <icon iconName="qtg_mono_sort" name="icon"/>
+ </object>
+ <object name="newmsg" type="HbAction">
+ <icon iconName="qtg_mono_create_message" name="icon"/>
+ </object>
+ <object name="settings" type="HbAction">
+ <string locid="txt_messaging_opt_settings" name="text" value="Settings"/>
+ </object>
+ <widget name="view" type="HbView">
+ <widget name="content" role="HbView:widget" type="HbWidget">
+ <layout type="anchor"/>
+ </widget>
+ <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar"/>
+ <widget name="viewMenu" role="HbView:menu" type="HbMenu">
+ <ref object="settings" role="HbWidget:addAction"/>
+ </widget>
+ <string locid="txt_messaging_title_messaging" name="title" value="Messaging"/>
+ </widget>
+ <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ </metadata>
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgservices/msgserviceapp/resources/messagingsendservice.splashml Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,7 @@
+<hbsplash version="1">
+ <screenid>sendservice</screenid>
+ <docml>messagingsendservice.docml</docml>
+ <widget>view</widget>
+ <appuid>0x2002E6DA</appuid>
+ <tsappname>Messaging</tsappname>
+</hbsplash>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgservices/msgserviceapp/resources/messagingviewservice.docml Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+ <object name="viewextn" type="HbAction">
+ <icon iconName="qtg_mono_sort" name="icon"/>
+ </object>
+ <object name="newmsg" type="HbAction">
+ <icon iconName="qtg_mono_create_message" name="icon"/>
+ </object>
+ <object name="settings" type="HbAction">
+ <string locid="txt_messaging_opt_settings" name="text" value="Settings"/>
+ </object>
+ <widget name="view" type="HbView">
+ <widget name="content" role="HbView:widget" type="HbWidget">
+ <layout type="anchor"/>
+ </widget>
+ <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar"/>
+ <string locid="txt_messaging_title_messaging" name="title" value="Messaging"/>
+ </widget>
+ <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ </metadata>
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgservices/msgserviceapp/resources/messagingviewservice.splashml Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,7 @@
+<hbsplash version="1">
+ <screenid>viewservice</screenid>
+ <docml>messagingviewservice.docml</docml>
+ <widget>view</widget>
+ <appuid>0x2002E6DA</appuid>
+ <tsappname>Messaging</tsappname>
+</hbsplash>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgservices/msgserviceapp/resources/sendeffect.fxml Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,49 @@
+<layers>
+ <visual>
+ <param name="opacity" type="anim">
+ <duration>1.5</duration>
+ <keyframe at="0.0">1.0</keyframe>
+ <keyframe at="1.0">0.0</keyframe>
+ <style>linear</style>
+ </param>
+ <param name="rotation_angle" type="anim">
+ <style>outquad</style>
+ <duration>1.5</duration>
+ <keyframe at="0.0">0.0</keyframe>
+ <keyframe at="1.0">60.0</keyframe>
+ </param>
+ <param name="rotation_origin_x" ref="visual.width">0.5</param>
+ <param name="rotation_origin_y" ref="visual.height">0.5</param>
+ <param name="rotation_axis_x">1</param>
+ <param name="scale_x" type="anim">
+ <style>outquad</style>
+ <duration>1.5</duration>
+ <keyframe at="0.0">1.0</keyframe>
+ <keyframe at="1.0">0.5</keyframe>
+ </param>
+ <param name="scale_origin_x" ref="visual.width">0.5</param>
+ <param name="scale_origin_y" ref="visual.height">0.5</param>
+ <param name="scale_y" type="anim">
+ <style>outquad</style>
+ <duration>1.5</duration>
+ <keyframe at="0.0">1.0</keyframe>
+ <keyframe at="1.0">0.5</keyframe>
+ </param>
+ <param name="translation_y" type="anim">
+ <duration>1.5</duration>
+ <style>inoutquad</style>
+ <keyframe at="0.0">0.0</keyframe>
+ <keyframe at="1.0">-1.0</keyframe>
+ <start ref="visual.top">1.0</start>
+ <end ref="screen.bottom">1.0</end>
+ </param>
+ <param name="translation_x" type="anim">
+ <duration>1.5</duration>
+ <style>outquad</style>
+ <keyframe at="0.0">0.0</keyframe>
+ <keyframe at="1.0">1.0</keyframe>
+ <start ref="visual.left">1.0</start>
+ <end ref="screen.left">1.0</end>
+ </param>
+ </visual>
+</layers>
\ No newline at end of file
--- a/messagingapp/msgservices/msgserviceapp/rom/msgserviceapp.iby Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/rom/msgserviceapp.iby Fri Aug 06 23:19:50 2010 +0530
@@ -22,4 +22,10 @@
data=DATAZ_\resource\apps\msgserviceapp.rsc resource\apps\msgserviceapp.rsc
data=DATAZ_\private\10003a3f\import\apps\msgserviceapp_reg.rsc private\10003a3f\import\apps\msgserviceapp_reg.rsc
+<clip>
+ data=ZRESOURCE\hb\splashml\messagingsendservice.splashml RESOURCE_FILES_DIR\hb\splashml\messagingsendservice.splashml
+ data=ZRESOURCE\hb\splashml\messagingsendservice.docml RESOURCE_FILES_DIR\hb\splashml\messagingsendservice.docml
+ data=ZRESOURCE\hb\splashml\messagingviewservice.splashml RESOURCE_FILES_DIR\hb\splashml\messagingviewservice.splashml
+ data=ZRESOURCE\hb\splashml\messagingviewservice.docml RESOURCE_FILES_DIR\hb\splashml\messagingviewservice.docml
+</clip>
#endif
--- a/messagingapp/msgservices/msgserviceapp/src/main.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/src/main.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -21,6 +21,8 @@
#include <QFile>
#include <QPointer>
#include <QDateTime>
+#include <HbSplashScreen>
+#include <xqserviceutil.h>
#include "msgservicewindow.h"
#include "debugtraces.h"
@@ -29,6 +31,7 @@
#define LOC_TITLE hbTrId("txt_messaging_title_messaging")
const QString debugFileName("c:/msgservice_app.txt");
+const QString TRANSLATOR_FILE_PATH("z:/resource/qt/translations/");
#ifdef _DEBUG_TRACES_
void debugInit(QtMsgType type, const char *msg)
@@ -75,15 +78,27 @@
int main(int argc, char **argv)
{
+ // if else loop to launch the splash screen based on the service called.
+
+ QString serviceName = XQServiceUtil::interfaceName( argc, argv);
+
+ if( !serviceName.compare( QString( "com.nokia.symbian.IMessageSend") ) )
+ {
+ HbSplashScreen::setScreenId( "sendservice" );
+ }
+ else if ( !serviceName.compare( "com.nokia.symbian.IMessageView") )
+ {
+ HbSplashScreen::setScreenId( "viewservice" );
+ }
+
HbApplication app( argc, argv );
//installing translator.
QString locale = QLocale::system().name();
- QString path = "z:/resource/qt/translations/";
QTranslator translator;
QTranslator translator_comm;
- translator.load(path + "messaging_" + locale);
- translator_comm.load(path + "common_" + locale);
+ translator.load(TRANSLATOR_FILE_PATH + QString("messaging_") + locale);
+ translator_comm.load(TRANSLATOR_FILE_PATH + QString("common_") + locale);
app.installTranslator(&translator);
app.installTranslator(&translator_comm);
--- a/messagingapp/msgservices/msgserviceapp/src/msgserviceviewmanager.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/src/msgserviceviewmanager.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -17,6 +17,7 @@
#include "msgserviceviewmanager.h"
+#include <QPixmap>
#include <HbMainWindow>
#include <HbAction>
#include <HbApplication>
@@ -35,6 +36,10 @@
#include "unidatamodelloader.h"
#include "unidatamodelplugininterface.h"
+// CONSTANTS
+static const char SEND_EFFECT[] = "sendeffect";
+static const char SEND_EFFECT_FILE[] = ":/effects/sendeffect.fxml";
+
// LOCALIZATION
#define LOC_DELETE_MESSAGE hbTrId("txt_messaging_dialog_delete_message")
#define LOC_DLG_SAVE_RINGTONE hbTrId("txt_conversations_dialog_save_ringing_tone")
@@ -128,7 +133,8 @@
void MsgServiceViewManager::switchView(const QVariantList& data)
{
int viewId = data.at(0).toInt();
- switch (viewId) {
+ switch (viewId)
+ {
case MsgBaseView::UNIEDITOR:
{
// except first 2 parameters pass other parameters
@@ -148,9 +154,18 @@
}
default:
{
- HbApplication::quit();
+ // if send from editor is successful, then run effects
+ int previousView = data.at(1).toInt();
+ if(previousView == MsgBaseView::UNIEDITOR)
+ {
+ startAnimation(SEND_EFFECT);
+ }
+ else
+ {
+ HbApplication::quit();
+ }
}
- }
+ }
}
//----------------------------------------------------------------------------
@@ -161,6 +176,7 @@
const qint32 contactId,
const QString displayName)
{
+ Q_UNUSED(contactId);
ConvergedMessage message;
ConvergedMessageAddress address;
address.setAddress(phoneNumber);
@@ -557,3 +573,123 @@
HbApplication::quit();
}
+//-----------------------------------------------------------------------------
+//MsgServiceViewManager::startAnimation
+//@see header
+//-----------------------------------------------------------------------------
+void MsgServiceViewManager::startAnimation(QString effectEvent)
+ {
+ // take screen shot
+ QGraphicsPixmapItem *animationScreenShot = screenShot();
+ if (animationScreenShot)
+ {
+ // but don't show it yet.
+ animationScreenShot->hide();
+ animationScreenShot->setPos(0,0);
+ animationScreenShot->setZValue(0);
+
+ // hide items, so that background app's items are visible immediately
+ mMainWindow->currentView()->hideItems(Hb::AllItems);
+
+ // reset background & set the base transparent
+ mMainWindow->setBackgroundImageName(
+ mMainWindow->orientation(), QString("dummy_blank"));
+ QPalette p = mMainWindow->viewport()->palette();
+ p.setColor(QPalette::Base, Qt::transparent);
+ mMainWindow->viewport()->setPalette(p);
+
+ // add animating item directly to the scene
+ mMainWindow->scene()->addItem(animationScreenShot);
+
+ // hide other views
+ QList<HbView*> vws = mMainWindow->views();
+ while (!vws.isEmpty())
+ {
+ HbView* view = vws.takeLast();
+ view->hide();
+ }
+
+ // now show the animating item, and start animation on it
+ animationScreenShot->show();
+ QString effectFile = getAnimationFile(effectEvent);
+ HbEffect::add(animationScreenShot, effectFile, effectEvent);
+ HbEffect::start(animationScreenShot, effectEvent, this,
+ "onAnimationComplete");
+ }
+ }
+
+//-----------------------------------------------------------------------------
+//MsgServiceViewManager::resetAnimation
+//@see header
+//-----------------------------------------------------------------------------
+void MsgServiceViewManager::resetAnimation(
+ QString effectEvent,
+ QGraphicsItem* item)
+ {
+ if (item)
+ {
+ QString effectFile = getAnimationFile(effectEvent);
+ HbEffect::remove(item, effectFile, effectEvent);
+ mMainWindow->scene()->removeItem(item);
+ delete item;
+ item = NULL;
+ }
+ }
+
+//-----------------------------------------------------------------------------
+//MsgServiceViewManager::onAnimationComplete
+//@see header
+//-----------------------------------------------------------------------------
+void MsgServiceViewManager::onAnimationComplete(
+ const HbEffect::EffectStatus &status)
+ {
+ QGraphicsItem* item = status.item;
+ QString effectEvent = status.effectEvent;
+ resetAnimation(effectEvent, item);
+ HbApplication::quit();
+ }
+
+//-----------------------------------------------------------------------------
+//MsgServiceViewManager::screenShot
+//@see header
+//-----------------------------------------------------------------------------
+QGraphicsPixmapItem* MsgServiceViewManager::screenShot()
+ {
+ // set fullscreen and hide unwanted items
+ mMainWindow->currentView()->hideItems(Hb::ToolBarItem | Hb::DockWidgetItem | Hb::StatusBarItem);
+ mMainWindow->currentView()->setContentFullScreen(true);
+
+ // grab whole view into pixmap image
+ QPixmap screenCapture = QPixmap::grabWindow(mMainWindow->internalWinId());
+
+ // create an QGraphicsItem to do animation
+ QGraphicsPixmapItem *ret(NULL);
+
+ // for landscape, the screenshot must be rotated
+ if(mMainWindow->orientation() == Qt::Horizontal)
+ {
+ QMatrix mat;
+ mat.rotate(-90); // rotate 90 degrees counter-clockwise
+ ret = new QGraphicsPixmapItem(screenCapture.transformed(mat));
+ }
+ else
+ {
+ ret = new QGraphicsPixmapItem(screenCapture);
+ }
+ return ret;
+ }
+
+//-----------------------------------------------------------------------------
+//MsgServiceViewManager::getAnimationFile
+//@see header
+//-----------------------------------------------------------------------------
+QString MsgServiceViewManager::getAnimationFile(QString effectEvent)
+ {
+ QString animFile;
+ if(effectEvent == SEND_EFFECT)
+ {
+ animFile.append(SEND_EFFECT_FILE);
+ }
+
+ return animFile;
+ }
--- a/messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -34,14 +34,16 @@
// MsgServiceWindow::MsgServiceWindow
// @see header
// ----------------------------------------------------------------------------
-MsgServiceWindow::MsgServiceWindow():HbMainWindow(),mSendInterface(NULL),
+MsgServiceWindow::MsgServiceWindow():HbMainWindow(
+ NULL,Hb::WindowFlagTransparent),
+mSendInterface(NULL),
mViewInterface(NULL),
mShareUiInterface(NULL),
mStoreHandler(NULL),
mViewManager(NULL)
{
// create stote handler
- QT_TRAP_THROWING( mStoreHandler = new MsgStoreHandler());
+ mStoreHandler = q_check_ptr(new MsgStoreHandler());
// create view manager
mViewManager = new MsgServiceViewManager(mStoreHandler,this);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgservices/msgserviceapp/tsrc/tsrc.pro Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,25 @@
+#
+# 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 = subdirs
+
+CONFIG += ordered
+
+#Sub .pro files
+SUBDIRS += msgserviceapptest/msgserviceapptest.pro
+
+# Platforms
+SYMBIAN_PLATFORMS = DEFAULT
\ No newline at end of file
--- a/messagingapp/msgsettings/msginit/src/msgsimnumberdetector.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgsettings/msginit/src/msgsimnumberdetector.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -29,7 +29,7 @@
MsgSimNumDetector::MsgSimNumDetector()
{
QDEBUG_WRITE("MsgSimNumDetector::MsgSimNumDetector : Enter")
- QT_TRAP_THROWING(d_ptr = new MsgSimNumDetectorPrivate());
+ d_ptr = q_check_ptr(new MsgSimNumDetectorPrivate());
QDEBUG_WRITE("MsgSimNumDetector::MsgSimNumDetector : Exit")
}
--- a/messagingapp/msgui/appengine/inc/conversationsengine_p.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/appengine/inc/conversationsengine_p.h Fri Aug 06 23:19:50 2010 +0530
@@ -41,7 +41,7 @@
* @endcode
* @since S60 v10.1
*/
-class ConversationsEnginePrivate :public MCsResultsObserver
+class ConversationsEnginePrivate :public CBase, public MCsResultsObserver
{
public:
--- a/messagingapp/msgui/appengine/src/conversationmsgstorehandler.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/appengine/src/conversationmsgstorehandler.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -58,10 +58,6 @@
#define LOC_MMS_RETRIEVING hbTrId("Retrieving message...") //TODO: localization
#define LOC_MMS_EXPIRY_DATE hbTrId("txt_messaging_list_expiry_date")
-// TODO: read global setting of formats on the phone
-const QString DATE_FORMAT("dd/MM");
-const QString TIME_FORMAT("hh:mm");
-
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
--- a/messagingapp/msgui/appengine/src/conversationsengine.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/appengine/src/conversationsengine.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -47,13 +47,13 @@
ConversationsEngine::ConversationsEngine(QObject* parent):
QObject(parent), mDraftsModel(NULL)
{
- QT_TRAP_THROWING(mConversationMsgStoreHandler = new ConversationMsgStoreHandler);
+ mConversationMsgStoreHandler = q_check_ptr(new ConversationMsgStoreHandler);
mConversationsSummaryModel = new ConversationsSummaryModel(this);
mConversationsModel = new ConversationsModel(mConversationMsgStoreHandler,
this);
- QT_TRAP_THROWING( d_ptr = new ConversationsEnginePrivate(mConversationMsgStoreHandler,
+ d_ptr = q_check_ptr( new ConversationsEnginePrivate(mConversationMsgStoreHandler,
mConversationsSummaryModel,
mConversationsModel));
--- a/messagingapp/msgui/appengine/src/conversationsengine_p.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/appengine/src/conversationsengine_p.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -48,7 +48,7 @@
mConversationsSummaryModel(conversationsSummaryModel),
mConversationsModel(conversationsModel)
{
- TRAP_IGNORE(initL());
+ initL();
}
//---------------------------------------------------------------
--- a/messagingapp/msgui/appengine/src/conversationsmodel.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/appengine/src/conversationsmodel.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -438,36 +438,46 @@
// use entry to populate model only when,
// entry is present in DB and its processing is over.
RBuf subjectBuffer;
- subjectBuffer.Create(sqlSelectStmt.ColumnSize(
- subjectIndex));
- sqlSelectStmt.ColumnText(subjectIndex, subjectBuffer);
-
- item.setData(XQConversions::s60DescToQString(
- subjectBuffer), Subject);
- subjectBuffer.Close();
-
+ if( subjectBuffer.Create(
+ sqlSelectStmt.ColumnSize(
+ subjectIndex)) == KErrNone)
+ {
+ sqlSelectStmt.ColumnText(subjectIndex, subjectBuffer);
+ item.setData(
+ XQConversions::s60DescToQString(
+ subjectBuffer), Subject);
+ subjectBuffer.Close();
+ }
+
RBuf bodyBuffer;
- bodyBuffer.Create(sqlSelectStmt.ColumnSize(bodyIndex));
- sqlSelectStmt.ColumnText(bodyIndex, bodyBuffer);
-
- item.setData(
- XQConversions::s60DescToQString(bodyBuffer),
- BodyText);
- bodyBuffer.Close();
+ if (bodyBuffer.Create(
+ sqlSelectStmt.ColumnSize(
+ bodyIndex)) == KErrNone)
+ {
+ sqlSelectStmt.ColumnText(bodyIndex, bodyBuffer);
+ item.setData(
+ XQConversions::s60DescToQString(
+ bodyBuffer), BodyText);
+ bodyBuffer.Close();
+ }
RBuf previewPathBuffer;
- previewPathBuffer.Create(sqlSelectStmt.ColumnSize(
- previewPathIndex));
- sqlSelectStmt.ColumnText(previewPathIndex,
- previewPathBuffer);
+ QString attachmentPath;
+ if (previewPathBuffer.Create(
+ sqlSelectStmt.ColumnSize(
+ previewPathIndex)) == KErrNone)
+ {
+ sqlSelectStmt.ColumnText(
+ previewPathIndex,
+ previewPathBuffer);
- //Rightnow set inside attachments
- QString attachmentPath(XQConversions::s60DescToQString(
- previewPathBuffer));
-
- item.setData(attachmentPath, Attachments);
- previewPathBuffer.Close();
-
+ //Rightnow set inside attachments
+ attachmentPath = XQConversions::s60DescToQString(
+ previewPathBuffer);
+ item.setData(attachmentPath, Attachments);
+ previewPathBuffer.Close();
+ }
+
int msgProperty = 0;
msgProperty = sqlSelectStmt.ColumnInt(msgpropertyIndex);
item.setData(msgProperty, MessageProperty);
@@ -984,31 +994,34 @@
QCRITICAL_WRITE_FORMAT("Error from ColumnBinary()", err)
if (err == KErrNone)
- {
+ {
RBuf vCardPathBuffer;
- vCardPathBuffer.Create(sqlSelectVcardStmt.ColumnSize(
- previewPathIndex));
- sqlSelectVcardStmt.ColumnText(previewPathIndex,
- vCardPathBuffer);
-
- //set inside attachments
- QString attachmentPath(
- XQConversions::s60DescToQString(
- vCardPathBuffer));
- item.setData(attachmentPath, Attachments);
+ if (vCardPathBuffer.Create(
+ sqlSelectVcardStmt.ColumnSize(
+ previewPathIndex)) == KErrNone)
+ {
+ sqlSelectVcardStmt.ColumnText(
+ previewPathIndex,
+ vCardPathBuffer);
- //get display-name and set as bodytext
- QString displayName =
- MsgContactHandler::getVCardDisplayName(
- attachmentPath);
- item.setData(displayName, BodyText);
+ //set inside attachments
+ QString attachmentPath(
+ XQConversions::s60DescToQString(
+ vCardPathBuffer));
+ item.setData(attachmentPath, Attachments);
- vCardPathBuffer.Close();
- vCardParsed = true;
+ //get display-name and set as bodytext
+ QString displayName =
+ MsgContactHandler::getVCardDisplayName(
+ attachmentPath);
+ item.setData(displayName, BodyText);
- QCRITICAL_WRITE("vcard parsing complete.")
-
+ vCardPathBuffer.Close();
+ vCardParsed = true;
+
+ QCRITICAL_WRITE("vcard parsing complete.")
}
+ }
//close stream
stream.Close();
}
--- a/messagingapp/msgui/appengine/src/draftsmodel.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/appengine/src/draftsmodel.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -24,14 +24,18 @@
#include <ccsconversationentry.h>
#include <msvstd.h>
#include <QDateTime>
+#include <HbExtendedLocale>
#include <hbicon.h>
#include <xqconversions.h>
//CONSTANTS
-const QString DATE_FORMAT("dd/MM"); //Date format.
-const QString TIME_FORMAT("hh:mm"); //Time format.
+// @see hbi18ndef.h
+static const char DATE_FORMAT[] = r_qtn_date_short_with_zero;
+static const char TIME_FORMAT[] = r_qtn_time_usual_with_zero;
//priority icons
const QString MSG_HIGH_PRIORITY_ICON("qtg_small_priority_high");
const QString MSG_LOW_PRIORITY_ICON("qtg_small_priority_low");
+// Localization
+#define LOC_NO_RECIPIENTS hbTrId("txt_messaging_list_no_recipients")
//---------------------------------------------------------------
// DraftsModel::DraftsModel
@@ -65,19 +69,19 @@
//timestamp conversion
QDateTime dateTime;
dateTime.setTime_t(item->data(TimeStamp).toUInt());
+
+ HbExtendedLocale locale = HbExtendedLocale::system();
QString dateString;
- if (dateTime.date() == QDateTime::currentDateTime().date())
- {
- dateString = dateTime.toString(TIME_FORMAT);
+ if (dateTime.date() == QDateTime::currentDateTime().date()) {
+ dateString = locale.format(dateTime.time(), TIME_FORMAT);
}
- else
- {
- dateString = dateTime.toString(DATE_FORMAT);
+ else {
+ dateString = locale.format(dateTime.date(), DATE_FORMAT);
}
//display name
QString contactName = item->data(DisplayName).toString();
if (contactName.isEmpty()) {
- contactName = tr("(no recipient)");
+ contactName = LOC_NO_RECIPIENTS;
}
//description
QString description = item->data(Subject).toString();
--- a/messagingapp/msgui/bwins/unifiedvieweru.def Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/bwins/unifiedvieweru.def Fri Aug 06 23:19:50 2010 +0530
@@ -6,20 +6,21 @@
?metaObject@UnifiedViewer@@UBEPBUQMetaObject@@XZ @ 5 NONAME ; struct QMetaObject const * UnifiedViewer::metaObject(void) const
?sendMessage@UnifiedViewer@@AAEXABVQString@@0@Z @ 6 NONAME ; void UnifiedViewer::sendMessage(class QString const &, class QString const &)
?resizeEvent@UnifiedViewer@@MAEXPAVQGraphicsSceneResizeEvent@@@Z @ 7 NONAME ; void UnifiedViewer::resizeEvent(class QGraphicsSceneResizeEvent *)
- ?handleFwdAction@UnifiedViewer@@QAEXXZ @ 8 NONAME ; void UnifiedViewer::handleFwdAction(void)
- ?qt_metacast@UnifiedViewer@@UAEPAXPBD@Z @ 9 NONAME ; void * UnifiedViewer::qt_metacast(char const *)
- ?onDialogDeleteMsg@UnifiedViewer@@AAEXH@Z @ 10 NONAME ; void UnifiedViewer::onDialogDeleteMsg(int)
- ?createToolBar@UnifiedViewer@@AAEXXZ @ 11 NONAME ; void UnifiedViewer::createToolBar(void)
- ??1UnifiedViewer@@UAE@XZ @ 12 NONAME ; UnifiedViewer::~UnifiedViewer(void)
- ??_EUnifiedViewer@@UAE@I@Z @ 13 NONAME ; UnifiedViewer::~UnifiedViewer(unsigned int)
- ?qt_metacall@UnifiedViewer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 14 NONAME ; int UnifiedViewer::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?tr@UnifiedViewer@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString UnifiedViewer::tr(char const *, char const *)
- ?getStaticMetaObject@UnifiedViewer@@SAABUQMetaObject@@XZ @ 16 NONAME ; struct QMetaObject const & UnifiedViewer::getStaticMetaObject(void)
- ?staticMetaObject@UnifiedViewer@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const UnifiedViewer::staticMetaObject
- ??0UnifiedViewer@@QAE@HHPAVQGraphicsItem@@@Z @ 18 NONAME ; UnifiedViewer::UnifiedViewer(int, int, class QGraphicsItem *)
- ?handleReplyAllAction@UnifiedViewer@@AAEXXZ @ 19 NONAME ; void UnifiedViewer::handleReplyAllAction(void)
- ?trUtf8@UnifiedViewer@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString UnifiedViewer::trUtf8(char const *, char const *, int)
- ?clearContent@UnifiedViewer@@QAEXXZ @ 21 NONAME ; void UnifiedViewer::clearContent(void)
- ?launchEditor@UnifiedViewer@@AAEXW4UniEditorOperation@MsgBaseView@@@Z @ 22 NONAME ; void UnifiedViewer::launchEditor(enum MsgBaseView::UniEditorOperation)
- ?tr@UnifiedViewer@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString UnifiedViewer::tr(char const *, char const *, int)
+ ??0UnifiedViewer@@QAE@HPAVQGraphicsItem@@@Z @ 8 NONAME ; UnifiedViewer::UnifiedViewer(int, class QGraphicsItem *)
+ ?isForwardOk@UnifiedViewer@@AAE_NXZ @ 9 NONAME ; bool UnifiedViewer::isForwardOk(void)
+ ?handleFwdAction@UnifiedViewer@@QAEXXZ @ 10 NONAME ; void UnifiedViewer::handleFwdAction(void)
+ ?qt_metacast@UnifiedViewer@@UAEPAXPBD@Z @ 11 NONAME ; void * UnifiedViewer::qt_metacast(char const *)
+ ?onDialogDeleteMsg@UnifiedViewer@@AAEXH@Z @ 12 NONAME ; void UnifiedViewer::onDialogDeleteMsg(int)
+ ?createToolBar@UnifiedViewer@@AAEXXZ @ 13 NONAME ; void UnifiedViewer::createToolBar(void)
+ ??1UnifiedViewer@@UAE@XZ @ 14 NONAME ; UnifiedViewer::~UnifiedViewer(void)
+ ??_EUnifiedViewer@@UAE@I@Z @ 15 NONAME ; UnifiedViewer::~UnifiedViewer(unsigned int)
+ ?qt_metacall@UnifiedViewer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 16 NONAME ; int UnifiedViewer::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@UnifiedViewer@@SA?AVQString@@PBD0@Z @ 17 NONAME ; class QString UnifiedViewer::tr(char const *, char const *)
+ ?getStaticMetaObject@UnifiedViewer@@SAABUQMetaObject@@XZ @ 18 NONAME ; struct QMetaObject const & UnifiedViewer::getStaticMetaObject(void)
+ ?staticMetaObject@UnifiedViewer@@2UQMetaObject@@B @ 19 NONAME ; struct QMetaObject const UnifiedViewer::staticMetaObject
+ ?handleReplyAllAction@UnifiedViewer@@AAEXXZ @ 20 NONAME ; void UnifiedViewer::handleReplyAllAction(void)
+ ?trUtf8@UnifiedViewer@@SA?AVQString@@PBD0H@Z @ 21 NONAME ; class QString UnifiedViewer::trUtf8(char const *, char const *, int)
+ ?clearContent@UnifiedViewer@@QAEXXZ @ 22 NONAME ; void UnifiedViewer::clearContent(void)
+ ?launchEditor@UnifiedViewer@@AAEXW4UniEditorOperation@MsgBaseView@@@Z @ 23 NONAME ; void UnifiedViewer::launchEditor(enum MsgBaseView::UniEditorOperation)
+ ?tr@UnifiedViewer@@SA?AVQString@@PBD0H@Z @ 24 NONAME ; class QString UnifiedViewer::tr(char const *, char const *, int)
--- a/messagingapp/msgui/conversationview/conversationview.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/conversationview.pro Fri Aug 06 23:19:50 2010 +0530
@@ -104,5 +104,6 @@
-lthumbnailmanagerqt \
-lxqsettingsmanager \
-lxqutils \
- -lmsgaudiofetcher
+ -lmsgaudiofetcher \
+ -lmsgs
--- a/messagingapp/msgui/conversationview/inc/msgcontactcardwidget.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/inc/msgcontactcardwidget.h Fri Aug 06 23:19:50 2010 +0530
@@ -169,11 +169,6 @@
* Slot hit when the thumbnail is ready.
*/
void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error);
-
- /**
- * Ignore gesture events.
- */
- void ignoreSignals(bool yes);
/**
* Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture
@@ -184,11 +179,6 @@
private:
/**
- * Bool variable on which gesture events are accepted/ignored.
- */
- bool mIgnoreEvents;
-
- /**
* Contact Number for the conversation
*/
QString mContactNumber;
--- a/messagingapp/msgui/conversationview/inc/msgconversationview.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/inc/msgconversationview.h Fri Aug 06 23:19:50 2010 +0530
@@ -454,11 +454,6 @@
QModelIndex mVisibleIndex;
/**
- * Flag to check it vkb is open.
- */
- bool mVkbopened;
-
- /**
* Flag is set when model is populated.
* @see signal conversationModelPopulated()
*/
--- a/messagingapp/msgui/conversationview/inc/msgviewdefines.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/inc/msgviewdefines.h Fri Aug 06 23:19:50 2010 +0530
@@ -21,6 +21,5 @@
const qreal CONTENT_MARGIN = 0.0; // Content margin for layout.
const qreal CONTENT_SPACING = 0.0; // Spacing for layout.
const qreal Z_VALUE = 3.0; // Z value for layout.
-const QString DATE_FORMAT("dd/MM"); // Date format.
-const QString TIME_FORMAT("hh:mm"); // Time format.
+
#endif // MSG_VIEW_DEFINES_H
--- a/messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.css Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.css Fri Aug 06 23:19:50 2010 +0530
@@ -44,9 +44,8 @@
MsgConversationWidget::bodyText
{
left:-var(hb-param-margin-gene-left);
- top:-var(hb-param-margin-gene-top);
+ top:-var(hb-param-margin-gene-middle-vertical);
right:1.0un;
- bottom:var(hb-param-margin-gene-middle-vertical);
text-height:var(hb-param-text-height-secondary);
font-variant:primary;
text-line-count-min:1;
@@ -68,13 +67,22 @@
left:-var(hb-param-margin-gene-middle-horizontal);
}
+
+MsgConversationWidget::headerItem
+{
+ top:-var(hb-param-margin-gene-top);
+ left:-var(hb-param-margin-gene-left);
+}
+
+MsgConversationWidget::headerItem:landscape
+{
+ left:-var(hb-param-margin-gene-middle-horizontal);
+}
+
/********************************** SUBJECT ***********************************/
MsgConversationWidget::subject
{
- 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);
@@ -83,22 +91,6 @@
text-line-count-max:1;
}
-MsgConversationWidget[isMMS="false"]::subject
-{
- text-line-count-max:30;
- text-height:var(hb-param-text-height-secondary);
-}
-
-MsgConversationWidget[hasImage="true"]::subject:landscape
-{
- left:-var(hb-param-margin-gene-middle-horizontal);
-}
-
-MsgConversationWidget[hasImage="false"][hasAudio="true"]::subject:landscape
-{
- left:-var(hb-param-margin-gene-middle-horizontal);
-}
-
/******************************* ATTACHMENT ICON ******************************/
@@ -129,10 +121,18 @@
MsgConversationWidget::preview
{
left:-var(hb-param-margin-gene-left);
+ top:-var(hb-param-margin-gene-middle-vertical);
size-policy:fixed fixed;
aspect-ratio:ignore;
}
+MsgConversationWidget[hasImage="false"][hasAudio="true"]::preview
+{
+ zvalue:1;
+ pref-width:var(hb-param-graphic-size-primary-small);
+ pref-height:var(hb-param-graphic-size-primary-small);
+}
+
MsgConversationWidget::preview:landscape
{
left:-var(hb-param-margin-gene-left);
@@ -149,6 +149,7 @@
left:-var(hb-param-margin-gene-left);
right:1.0un;
bottom:var(hb-param-margin-gene-bottom);
+ top:-var(hb-param-margin-gene-middle-vertical);
text-align:left;
text-height:var(hb-param-text-height-tiny);
font-variant:primary;
@@ -172,6 +173,7 @@
{
zvalue:1;
left:-var(hb-param-margin-gene-middle-horizontal);
+ top:-var(hb-param-margin-gene-middle-vertical);
aspect-ratio:ignore;
size-policy:fixed fixed;
pref-width:var(hb-param-graphic-size-primary-small);
--- a/messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.widgetml Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/resources/layouts/msgconversationwidget.widgetml Fri Aug 06 23:19:50 2010 +0530
@@ -2,20 +2,29 @@
<layout name="layout-msg-portrait" type="mesh">
- <meshitem src="subject" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="subject" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="subject" srcEdge="RIGHT" dst="priority" dstEdge="LEFT" spacer="rightSpacer" />
+ <meshitem src="subject" srcEdge="TOP" dst="headerItem" dstEdge="TOP" />
+ <meshitem src="subject" srcEdge="LEFT" dst="headerItem" dstEdge="LEFT" />
+ <meshitem src="subject" srcEdge="RIGHT" dst="priority" dstEdge="LEFT"/>
+ <meshitem src="subject" srcEdge="BOTTOM" dst="headerItem" dstEdge="BOTTOM"/>
<meshitem src="priority" srcEdge="RIGHT" dst="attachment" dstEdge="LEFT" />
- <meshitem src="priority" srcEdge="CENTERV" dst="subject" dstEdge="CENTERV" />
+ <meshitem src="priority" srcEdge="CENTERV" dst="headerItem" dstEdge="CENTERV" />
+ <meshitem src="priority" srcEdge="TOP" dst="headerItem" dstEdge="TOP" spacer="topSpacer" />
+ <meshitem src="priority" srcEdge="BOTTOM" dst="headerItem" dstEdge="BOTTOM" spacer="bottomSpacer" />
+
+ <meshitem src="attachment" srcEdge="RIGHT" dst="headerItem" dstEdge="RIGHT" />
+ <meshitem src="attachment" srcEdge="CENTERV" dst="headerItem" dstEdge="CENTERV" />
+ <meshitem src="attachment" srcEdge="TOP" dst="headerItem" dstEdge="TOP" spacer="topSpacer"/>
+ <meshitem src="attachment" srcEdge="BOTTOM" dst="headerItem" dstEdge="BOTTOM" spacer="bottomSpacer" />
+
+ <meshitem src="headerItem" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="headerItem" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="headerItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="attachment" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="attachment" srcEdge="CENTERV" dst="subject" dstEdge="CENTERV" />
-
- <meshitem src="preview" srcEdge="TOP" dst="subject" dstEdge="BOTTOM" />
+ <meshitem src="preview" srcEdge="TOP" dst="headerItem" dstEdge="BOTTOM" />
<meshitem src="preview" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="bodyText" srcEdge="TOP" dst="preview" dstEdge="BOTTOM" />
+ <meshitem src="bodyText" srcEdge="TOP" dst="preview" dstEdge="BOTTOM" />
<meshitem src="bodyText" srcEdge="LEFT" dst="" dstEdge="LEFT" />
<meshitem src="bodyText" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
@@ -33,7 +42,7 @@
<meshitem src="bubble" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
<meshitem src="bubble" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="playIcon" srcEdge="TOP" dst="subject" dstEdge="BOTTOM"/>
+ <meshitem src="playIcon" srcEdge="TOP" dst="headerItem" dstEdge="BOTTOM"/>
<meshitem src="playIcon" srcEdge="LEFT" dst="preview" dstEdge="RIGHT" />
</layout>
@@ -42,25 +51,39 @@
<meshitem src="preview" srcEdge="TOP" dst="" dstEdge="TOP" />
<meshitem src="preview" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="preview" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacer="bottomSpacer"/>
+
+ <meshitem src="playIcon" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="playIcon" srcEdge="LEFT" dst="preview" dstEdge="RIGHT" />
+ <meshitem src="playIcon" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacer="bottomSpacer"/>
- <meshitem src="subject" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="subject" srcEdge="LEFT" dst="playIcon" dstEdge="RIGHT" />
- <meshitem src="subject" srcEdge="RIGHT" dst="priority" dstEdge="LEFT" />
+ <meshitem src="subject" srcEdge="TOP" dst="headerItem" dstEdge="TOP" />
+ <meshitem src="subject" srcEdge="LEFT" dst="headerItem" dstEdge="LEFT" />
+ <meshitem src="subject" srcEdge="RIGHT" dst="priority" dstEdge="LEFT"/>
+ <meshitem src="subject" srcEdge="BOTTOM" dst="headerItem" dstEdge="BOTTOM"/>
<meshitem src="priority" srcEdge="RIGHT" dst="attachment" dstEdge="LEFT" />
- <meshitem src="priority" srcEdge="CENTERV" dst="subject" dstEdge="CENTERV" />
+ <meshitem src="priority" srcEdge="CENTERV" dst="headerItem" dstEdge="CENTERV" />
+ <meshitem src="priority" srcEdge="TOP" dst="headerItem" dstEdge="TOP" spacer="topSpacer" />
+ <meshitem src="priority" srcEdge="BOTTOM" dst="headerItem" dstEdge="BOTTOM" spacer="bottomSpacer" />
+
+ <meshitem src="attachment" srcEdge="RIGHT" dst="headerItem" dstEdge="RIGHT" />
+ <meshitem src="attachment" srcEdge="CENTERV" dst="headerItem" dstEdge="CENTERV" />
+ <meshitem src="attachment" srcEdge="TOP" dst="headerItem" dstEdge="TOP" spacer="topSpacer" />
+ <meshitem src="attachment" srcEdge="BOTTOM" dst="headerItem" dstEdge="BOTTOM" spacer="bottomSpacer" />
+
+ <meshitem src="headerItem" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="headerItem" srcEdge="LEFT" dst="playIcon" dstEdge="RIGHT" />
+ <meshitem src="headerItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="attachment" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="attachment" srcEdge="CENTERV" dst="subject" dstEdge="CENTERV" />
-
- <meshitem src="bodyText" srcEdge="TOP" dst="subject" dstEdge="BOTTOM" />
+ <meshitem src="bodyText" srcEdge="TOP" dst="headerItem" dstEdge="BOTTOM" />
<meshitem src="bodyText" srcEdge="LEFT" dst="playIcon" dstEdge="RIGHT" />
<meshitem src="bodyText" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="timeStamp" srcEdge="TOP" dst="bodyText" dstEdge="BOTTOM" />
+ <meshitem src="timeStamp" srcEdge="TOP" dst="bodyText" dstEdge="BOTTOM" spacer="topSpacer" />
<meshitem src="timeStamp" srcEdge="LEFT" dst="playIcon" dstEdge="RIGHT" />
<meshitem src="timeStamp" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="timeStamp" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM"/>
+ <meshitem src="timeStamp" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
<meshitem src="newItemIcon" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
<meshitem src="newItemIcon" srcEdge="TOP" dst="" dstEdge="TOP"/>
@@ -71,9 +94,6 @@
<meshitem src="bubble" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
<meshitem src="bubble" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="playIcon" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="playIcon" srcEdge="LEFT" dst="preview" dstEdge="RIGHT" />
-
</layout>
</hbwidget>
--- a/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -62,7 +62,7 @@
// @see header
//---------------------------------------------------------------
MsgContactCardWidget::MsgContactCardWidget(QGraphicsItem *parent) :
- HbWidget(parent), mIgnoreEvents(false), mAvatarIconItem(NULL), mPresenceIconItem(NULL),
+ HbWidget(parent), mAvatarIconItem(NULL), mPresenceIconItem(NULL),
mAddressTextItem(NULL), mThumbnailManager(NULL)
{
init();
@@ -295,11 +295,6 @@
//---------------------------------------------------------------
void MsgContactCardWidget::handleLongTap(const QPointF &position)
{
- // Check if events need to be ignored/accepted
- if (mIgnoreEvents) {
- return;
- }
-
if (KBluetoothMsgsConversationId != ConversationsEngine::instance()->getCurrentConversationId()) {
HbMenu* contextMenu = new HbMenu();
contextMenu->setDismissPolicy(HbPopup::TapAnywhere);
@@ -328,11 +323,6 @@
{
this->ungrabGesture(Qt::TapGesture);
- // Check if events need to be ignored/accepted
- if (mIgnoreEvents) {
- return;
- }
-
int contactId = resolveContactId(mContactNumber);
if(contactId > 0)
{
@@ -456,7 +446,18 @@
if (!avatarDetails.isEmpty()) {
mThumbnailManager->getThumbnail(avatarDetails.at(0).imageUrl().toString());
}
+ else {
+ //Set default avatar since avtar is deleted
+ setAvatar(HbIcon(DEFAULT_AVATAR_ICON));
+ }
}
+ else {
+ //case for deletion from contact card widget
+ //set the default number as address
+ setAddress(mContactNumber);
+ //Set default avatar since contact is deleted
+ setAvatar(HbIcon(DEFAULT_AVATAR_ICON));
+ }
// Get the new conversation id.
qint64 convId = ConversationsEngine::instance()->getConversationIdFromAddress(
@@ -517,15 +518,6 @@
}
//---------------------------------------------------------------
-// MsgContactCardWidget::ignoreSignals
-// @see header
-//---------------------------------------------------------------
-void MsgContactCardWidget::ignoreSignals(bool yes)
-{
- mIgnoreEvents = yes;
-}
-
-//---------------------------------------------------------------
// MsgContactCardWidget::regrabGesture
// @see header file
//---------------------------------------------------------------
--- a/messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -123,7 +123,6 @@
SIGNAL(switchView(const QVariantList&)));
connect(mConversationView, SIGNAL(vkbOpened(bool)), this, SLOT(hideChrome(bool)));
- connect(mConversationView, SIGNAL(vkbOpened(bool)), mContactCard, SLOT(ignoreSignals(bool)));
this->setMenu(mConversationView->menu());
@@ -267,6 +266,9 @@
mContactCard->show();
}
}
+
+ //forcing relayouting
+ mMainLayout->activate();
}
//---------------------------------------------------------------
--- a/messagingapp/msgui/conversationview/src/msgconversationview.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgconversationview.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -107,7 +107,6 @@
mSendUtil(NULL),
mVkbHost(NULL),
mVisibleIndex(),
- mVkbopened(false),
mModelPopulated(false),
mViewReady(false)
{
@@ -293,8 +292,8 @@
addResendItemToContextMenu(item, contextMenu, sendingState);
addForwardItemToContextMenu(item, contextMenu, sendingState);
addDownloadItemToContextMenu(item, contextMenu);
+ addSaveItemToContextMenu(item , contextMenu,sendingState);
addDeleteItemToContextMenu(item, contextMenu, sendingState);
- addSaveItemToContextMenu(item , contextMenu,sendingState);
}
@@ -623,16 +622,11 @@
//---------------------------------------------------------------
void MsgConversationView::contactsFetched(const QVariant& value)
{
- CntServicesContactList contactList =
- qVariantValue<CntServicesContactList>(value);
- int count = contactList.count();
- if(count > 0)
- {
- QVariantList params;
- params << MsgBaseView::ADD_RECIPIENTS;
- params << value;
- launchUniEditor(params);
- }
+ //switch to editor.
+ QVariantList params;
+ params << MsgBaseView::ADD_RECIPIENTS;
+ params << value;
+ launchUniEditor(params);
}
//---------------------------------------------------------------
@@ -892,7 +886,7 @@
void MsgConversationView::openItem(const QModelIndex & index)
{
// Return if invalid index.
- if (!index.isValid() || mVkbopened)
+ if (!index.isValid())
{
return;
}
@@ -1010,14 +1004,7 @@
msgIdList << messageId;
ConversationsEngine::instance()->markMessagesRead(msgIdList);
}
-
- qint32 messageProperty = index.data(MessageProperty).toInt();
- bool canForwardMessage = true;
- if (messageType == ConvergedMessage::Mms){
- canForwardMessage = (messageProperty & EPreviewForward)? true:false;
- }
-
//switch view
QVariantList param;
param << MsgBaseView::UNIVIEWER; // target view
@@ -1026,14 +1013,6 @@
param << contactId;
param << messageId;
param << mMessageModel->rowCount();
- if (canForwardMessage == true)
- {
- param << 1;
- }
- else
- {
- param << 0;
- }
emit switchView(param);
}
@@ -1195,9 +1174,9 @@
//---------------------------------------------------------------
void MsgConversationView::vkbOpened()
{
- mVkbopened = true;
+ emit vkbOpened(true);
- emit vkbOpened(true);
+ scrollToBottom();
QRectF appRect = mVkbHost->applicationArea();
qreal spacing = 0.0;
@@ -1209,10 +1188,10 @@
}
this->setMaximumHeight(appRect.height()- cardHeight - spacing);
+ mConversationList->adjustSize();
disconnect(mVkbHost,SIGNAL(keypadOpened()),this,SLOT(vkbOpened()));
-
- scrollToBottom();
+
}
//---------------------------------------------------------------
@@ -1221,14 +1200,14 @@
//---------------------------------------------------------------
void MsgConversationView::vkbClosed()
{
- mVkbopened = false;
-
emit vkbOpened(false);
+ scrollToBottom();
+
this->setMaximumHeight(-1);
+ mConversationList->adjustSize();
+
connect(mVkbHost,SIGNAL(keypadOpened()),this,SLOT(vkbOpened()));
-
- scrollToBottom();
}
//---------------------------------------------------------------
@@ -1489,27 +1468,21 @@
{
bool shared = false;
- UniEditorPluginLoader* pluginLoader = new UniEditorPluginLoader();
+ UniDataModelLoader* pluginLoader = new UniDataModelLoader();
+
+ UniDataModelPluginInterface* pluginInterface =
+ pluginLoader->getDataModelPlugin(ConvergedMessage::Mms);
- UniEditorPluginInterface* pluginInterface =
- pluginLoader->getUniEditorPlugin(ConvergedMessage::Mms);
+ CMsvSession* session = pluginInterface->session();
- ConvergedMessage* msg = pluginInterface->convertFrom(messageId);
- if(msg)
+ TMsvEntry entry;
+ TMsvId service;
+ session->GetEntry(messageId, service, entry);
+
+ if(entry.MultipleRecipients())
{
- int count = 0;
- count += msg->toAddressList().count();
- count += msg->ccAddressList().count();
- count += msg->bccAddressList().count();
-
- if(count > 1)
- {
- shared = true;
- }
-
- delete msg;
+ shared = true;
}
-
delete pluginLoader;
return shared;
--- a/messagingapp/msgui/conversationview/src/msgconversationviewitem.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgconversationviewitem.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -22,10 +22,12 @@
#include "debugtraces.h"
#include <QDir>
#include <QChar>
+#include <QStringBuilder>
#include <HbTextItem>
#include <HbIconItem>
#include <HbIconAnimationManager>
#include <HbIconAnimator>
+#include <HbExtendedLocale>
#include <ccsdefs.h>
#include <HbInstance>
@@ -37,14 +39,18 @@
#include "conversationsenginedefines.h"
// LOCAL CONSTANTS
-const QString MSG_OUTBOX_ICON("qtg_small_outbox");
-const QString MSG_FAIL_ICON("qtg_small_fail");
-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_small_corrupted");
-const QString MSG_VIDEO_ICON("qtg_small_video");
+static const char MSG_OUTBOX_ICON[] = "qtg_small_outbox";
+static const char MSG_FAIL_ICON[] = "qtg_small_fail";
+static const char ANIMATION_FILE[] = ":/qtg_anim_loading.axml";
+static const char ANIMATION_ICON_NAME[] = "qtg_anim_loading";
+static const char VCARD_ICON[] = "qtg_large_mycard";
+static const char IMAGE_ICON[] = "qtg_small_image";
+static const char CORRUPTED_ICON[] = "qtg_small_corrupted";
+static const char MSG_VIDEO_ICON[] = "qtg_small_video";
+
+// @see hbi18ndef.h
+static const char DATE_FORMAT[] = r_qtn_date_short_with_zero;
+static const char TIME_FORMAT[] = r_qtn_time_usual_with_zero;
// LOCALIZATION
#define LOC_RINGING_TONE hbTrId("txt_messaging_dpopinfo_ringing_tone")
@@ -171,17 +177,17 @@
dateTime.setTime_t(index.data(TimeStamp).toUInt());
QString resendStateNote((index.data(SendingState).toInt()
== ConvergedMessage::Resend) ? LOC_RESEND_AT : "");
- if (dateTime.date() == QDateTime::currentDateTime().date())
- {
+
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ QString date = locale.format(dateTime.date(), DATE_FORMAT);
+ QString time = locale.format(dateTime.time(), TIME_FORMAT);
- mConversation->setTimeStamp(resendStateNote + dateTime.toString(
- TIME_FORMAT));
- }
- else
- {
- mConversation->setTimeStamp(resendStateNote + dateTime.toString(
- DATE_FORMAT));
- }
+ if (dateTime.date() == QDateTime::currentDateTime().date()) {
+ mConversation->setTimeStamp(resendStateNote % time);
+ }
+ else {
+ mConversation->setTimeStamp(resendStateNote % date);
+ }
if (messageSubType == ConvergedMessage::VCal)
{
@@ -192,7 +198,7 @@
QString bodyText = index.data(BodyText).toString();
bodyText.replace(QChar::ParagraphSeparator, QChar::LineSeparator);
bodyText.replace('\r', QChar::LineSeparator);
- mConversation->setSubject(bodyText);
+ mConversation->setBodyText(bodyText);
}
//repolish
@@ -256,17 +262,17 @@
dateTime.setTime_t(index.data(TimeStamp).toUInt());
QString resendStateNote((index.data(SendingState).toInt()
== ConvergedMessage::Resend) ? LOC_RESEND_AT : "");
- if (dateTime.date() == QDateTime::currentDateTime().date())
- {
+
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ QString date = locale.format(dateTime.date(), DATE_FORMAT);
+ QString time = locale.format(dateTime.time(), TIME_FORMAT);
- mConversation->setTimeStamp(resendStateNote + dateTime.toString(
- TIME_FORMAT));
- }
- else
- {
- mConversation->setTimeStamp(resendStateNote + dateTime.toString(
- DATE_FORMAT));
- }
+ if (dateTime.date() == QDateTime::currentDateTime().date()) {
+ mConversation->setTimeStamp(resendStateNote % time);
+ }
+ else {
+ mConversation->setTimeStamp(resendStateNote % date);
+ }
if (messageType == ConvergedMessage::Mms)
{
@@ -457,43 +463,31 @@
void MsgConversationViewItem::setMessageStateIcon(int messageState)
{
HbIconAnimator& iconAnimator = mOutgoingMsgStateIconItem->animator();
- HbIconAnimationManager* iconAnimationManager =
- HbIconAnimationManager::global();
+
switch (messageState)
{
case ConvergedMessage::Waiting:
case ConvergedMessage::Scheduled:
case ConvergedMessage::Sending:
{
- bool defined = iconAnimationManager->addDefinitionFile(
- ANIMATION_FILE);
- HbIcon animIcon;
- animIcon.setIconName(ANIMATION_ICON_NAME);
- QSizeF size = mOutgoingMsgStateIconItem->size();
- mOutgoingMsgStateIconItem->setIcon(animIcon);
+ HbIconAnimationManager::global()->addDefinitionFile(ANIMATION_FILE);
+ mOutgoingMsgStateIconItem->setIconName(ANIMATION_ICON_NAME);
mOutgoingMsgStateIconItem->setVisible(true);
iconAnimator.startAnimation();
break;
}
case ConvergedMessage::Suspended:
- {
- iconAnimator.stopAnimation();
- mOutgoingMsgStateIconItem->setIcon(MSG_OUTBOX_ICON);
- mOutgoingMsgStateIconItem->setVisible(true);
- break;
-
- }
case ConvergedMessage::Resend:
{
iconAnimator.stopAnimation();
- mOutgoingMsgStateIconItem->setIcon(MSG_OUTBOX_ICON);
+ mOutgoingMsgStateIconItem->setIconName(MSG_OUTBOX_ICON);
mOutgoingMsgStateIconItem->setVisible(true);
break;
}
case ConvergedMessage::Failed:
{
iconAnimator.stopAnimation();
- mOutgoingMsgStateIconItem->setIcon(MSG_FAIL_ICON);
+ mOutgoingMsgStateIconItem->setIconName(MSG_FAIL_ICON);
mOutgoingMsgStateIconItem->setVisible(true);
break;
}
--- a/messagingapp/msgui/conversationview/src/msgconversationwidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgconversationwidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -33,7 +33,6 @@
#include <QCoreApplication>
#include <HbEvent>
#include <HbMainWindow>
-#include <HbInstance>
#include "debugtraces.h"
@@ -41,20 +40,22 @@
#include "conversationsengine.h"
// Icons
-const QString MSG_HIGH_PRIORITY_ICON("qtg_small_priority_high");
-const QString MSG_LOW_PRIORITY_ICON("qtg_small_priority_low");
-const QString MSG_ATTACH_ICON("qtg_small_attachment");
-const QString MSG_AUDIO_PLAY_ICON("qtg_small_sound");
-
+static const char MSG_HIGH_PRIORITY_ICON[] = "qtg_small_priority_high";
+static const char MSG_LOW_PRIORITY_ICON[] = "qtg_small_priority_low";
+static const char MSG_ATTACH_ICON[] = "qtg_small_attachment";
+static const char MSG_AUDIO_PLAY_ICON[] = "qtg_small_sound";
// Frames
-const QString CV_RECEIVED_NORMAL_FR("qtg_fr_convlist_received_normal");
-const QString CV_RECEIVED_PRESSED_FR("qtg_fr_convlist_received_pressed");
-const QString CV_RECEIVED_HIGHLIGHT_FR("qtg_fr_convlist_received_highlight");
-const QString CV_SENT_NORMAL_FR("qtg_fr_convlist_sent_normal");
-const QString CV_SENT_PRESSED_FR("qtg_fr_convlist_sent_pressed");
-const QString CV_SENT_HIGHLIGHT_FR("qtg_fr_convlist_sent_highlight");
-const QString NEW_ITEM_FRAME("qtg_fr_list_new_item");
+static const char CV_RECEIVED_NORMAL_FR[] = "qtg_fr_convlist_received_normal";
+static const char CV_RECEIVED_PRESSED_FR[] = "qtg_fr_convlist_received_pressed";
+static const char CV_RECEIVED_HIGHLIGHT_FR[] = "qtg_fr_convlist_received_highlight";
+static const char CV_SENT_NORMAL_FR[] = "qtg_fr_convlist_sent_normal";
+static const char CV_SENT_PRESSED_FR[] = "qtg_fr_convlist_sent_pressed";
+static const char CV_SENT_HIGHLIGHT_FR[] = "qtg_fr_convlist_sent_highlight";
+static const char NEW_ITEM_FRAME[] = "qtg_fr_list_new_item";
+
+//Localization
+#define LOC_MULTIMEDIA_MESSAGE hbTrId("txt_messaging_list_bubble_multimedia_message")
//---------------------------------------------------------------
// MsgConversationWidget::MsgConversationWidget
@@ -115,24 +116,34 @@
mNewFrameItem = new HbFrameItem(this);
mNewFrameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesVertical);
HbStyle::setItemName(mNewFrameItem, "newItemIcon");
+
mSubjectTextItem = new HbTextItem(this);
- mSubjectTextItem->setTextWrapping(Hb::TextWordWrap);
+ mSubjectTextItem->setTextWrapping(Hb::TextNoWrap);
HbStyle::setItemName(mSubjectTextItem, "subject");
+
mBodyTextItem = new HbTextItem(this);
mBodyTextItem->setTextWrapping(Hb::TextWordWrap);
HbStyle::setItemName(mBodyTextItem, "bodyText");
+
mPreviewIconItem = new HbIconItem(this);
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];
+
+ HbWidget* headerContainer = new HbWidget(this);
+ HbStyle::setItemName(headerContainer, "headerItem");
+
+ HbMainWindow *mainWindow = this->mainWindow();
connect(mainWindow, SIGNAL(orientationChanged(Qt::Orientation)), this,
SLOT(orientationchanged(Qt::Orientation)),Qt::UniqueConnection);
polishEvent();
@@ -144,8 +155,13 @@
//---------------------------------------------------------------
void MsgConversationWidget::setSubject(const QString &subject)
{
+ QString sub = subject;
+ if(subject.trimmed().isEmpty())
+ {
+ sub = LOC_MULTIMEDIA_MESSAGE;
+ }
HbStyle::setItemName(mSubjectTextItem, "subject");
- mSubjectTextItem->setText(subject);
+ mSubjectTextItem->setText(sub);
mSubjectTextItem->show();
}
@@ -155,6 +171,10 @@
//---------------------------------------------------------------
void MsgConversationWidget::setBodyText(const QString &body)
{
+ if(body.isEmpty())
+ {
+ return;
+ }
HbStyle::setItemName(mBodyTextItem, "bodyText");
mBodyTextItem->setText(body);
@@ -284,20 +304,8 @@
if (!hasImage())
{
HbStyle::setItemName(mPreviewIconItem, "preview");
- if(iconPath.isEmpty())
- {
- qreal iconSize = 0;
- style()->parameter("hb-param-graphic-size-primary-small",iconSize);
- HbIcon icon(MSG_AUDIO_PLAY_ICON);
- icon.setHeight(iconSize);
- icon.setWidth(iconSize);
- mPreviewIconItem->setIcon(icon);
- }
- else
- {
- mPreviewIconItem->setIconName(iconPath);
- }
- mPreviewIconItem->show();
+ mPreviewIconItem->setIconName(iconPath.isEmpty() ? MSG_AUDIO_PLAY_ICON : iconPath);
+ mPreviewIconItem->show();
}
else
{
--- a/messagingapp/msgui/conversationview/src/msgeditorwidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/conversationview/src/msgeditorwidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -117,7 +117,7 @@
BACKGROUND_FRAME);
//Create editor utils object
- QT_TRAP_THROWING(mEditorUtils = new UniEditorGenUtils());
+ mEditorUtils = q_check_ptr(new UniEditorGenUtils());
FOCUSITEM = mSendButton;
@@ -373,6 +373,7 @@
MsgEditor::MsgEditor(QGraphicsItem *parent)
:HbLineEdit(parent)
{
+ this->setFontSpec(HbFontSpec(HbFontSpec::Secondary));
this->setPlaceholderText(LOC_HINT_TEXT);
}
--- a/messagingapp/msgui/eabi/unifiedvieweru.def Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/eabi/unifiedvieweru.def Fri Aug 06 23:19:50 2010 +0530
@@ -1,29 +1,30 @@
EXPORTS
- _ZN13UnifiedViewer11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
- _ZN13UnifiedViewer11qt_metacastEPKc @ 2 NONAME
- _ZN13UnifiedViewer11resizeEventEP25QGraphicsSceneResizeEvent @ 3 NONAME
- _ZN13UnifiedViewer11sendMessageERK7QStringS2_ @ 4 NONAME
- _ZN13UnifiedViewer12clearContentEv @ 5 NONAME
- _ZN13UnifiedViewer12launchEditorEN11MsgBaseView18UniEditorOperationE @ 6 NONAME
- _ZN13UnifiedViewer13createToolBarEv @ 7 NONAME
- _ZN13UnifiedViewer15handleFwdActionEv @ 8 NONAME
- _ZN13UnifiedViewer15populateContentEibi @ 9 NONAME
- _ZN13UnifiedViewer16staticMetaObjectE @ 10 NONAME DATA 16
- _ZN13UnifiedViewer17handleReplyActionEv @ 11 NONAME
- _ZN13UnifiedViewer17onDialogDeleteMsgEi @ 12 NONAME
- _ZN13UnifiedViewer18handleDeleteActionEv @ 13 NONAME
- _ZN13UnifiedViewer19getStaticMetaObjectEv @ 14 NONAME
- _ZN13UnifiedViewer20handleReplyAllActionEv @ 15 NONAME
- _ZN13UnifiedViewerC1EiiP13QGraphicsItem @ 16 NONAME
- _ZN13UnifiedViewerC2EiiP13QGraphicsItem @ 17 NONAME
- _ZN13UnifiedViewerD0Ev @ 18 NONAME
- _ZN13UnifiedViewerD1Ev @ 19 NONAME
- _ZN13UnifiedViewerD2Ev @ 20 NONAME
- _ZNK13UnifiedViewer10metaObjectEv @ 21 NONAME
- _ZTI13UnifiedViewer @ 22 NONAME
- _ZTV13UnifiedViewer @ 23 NONAME
- _ZThn16_N13UnifiedViewerD0Ev @ 24 NONAME
- _ZThn16_N13UnifiedViewerD1Ev @ 25 NONAME
- _ZThn8_N13UnifiedViewerD0Ev @ 26 NONAME
- _ZThn8_N13UnifiedViewerD1Ev @ 27 NONAME
+ _ZN13UnifiedViewer11isForwardOkEv @ 1 NONAME
+ _ZN13UnifiedViewer11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+ _ZN13UnifiedViewer11qt_metacastEPKc @ 3 NONAME
+ _ZN13UnifiedViewer11resizeEventEP25QGraphicsSceneResizeEvent @ 4 NONAME
+ _ZN13UnifiedViewer11sendMessageERK7QStringS2_ @ 5 NONAME
+ _ZN13UnifiedViewer12clearContentEv @ 6 NONAME
+ _ZN13UnifiedViewer12launchEditorEN11MsgBaseView18UniEditorOperationE @ 7 NONAME
+ _ZN13UnifiedViewer13createToolBarEv @ 8 NONAME
+ _ZN13UnifiedViewer15handleFwdActionEv @ 9 NONAME
+ _ZN13UnifiedViewer15populateContentEibi @ 10 NONAME
+ _ZN13UnifiedViewer16staticMetaObjectE @ 11 NONAME DATA 16
+ _ZN13UnifiedViewer17handleReplyActionEv @ 12 NONAME
+ _ZN13UnifiedViewer17onDialogDeleteMsgEi @ 13 NONAME
+ _ZN13UnifiedViewer18handleDeleteActionEv @ 14 NONAME
+ _ZN13UnifiedViewer19getStaticMetaObjectEv @ 15 NONAME
+ _ZN13UnifiedViewer20handleReplyAllActionEv @ 16 NONAME
+ _ZN13UnifiedViewerC1EiP13QGraphicsItem @ 17 NONAME
+ _ZN13UnifiedViewerC2EiP13QGraphicsItem @ 18 NONAME
+ _ZN13UnifiedViewerD0Ev @ 19 NONAME
+ _ZN13UnifiedViewerD1Ev @ 20 NONAME
+ _ZN13UnifiedViewerD2Ev @ 21 NONAME
+ _ZNK13UnifiedViewer10metaObjectEv @ 22 NONAME
+ _ZTI13UnifiedViewer @ 23 NONAME
+ _ZTV13UnifiedViewer @ 24 NONAME
+ _ZThn16_N13UnifiedViewerD0Ev @ 25 NONAME
+ _ZThn16_N13UnifiedViewerD1Ev @ 26 NONAME
+ _ZThn8_N13UnifiedViewerD0Ev @ 27 NONAME
+ _ZThn8_N13UnifiedViewerD1Ev @ 28 NONAME
--- a/messagingapp/msgui/msgapp/inc/msgcommondefines.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/msgapp/inc/msgcommondefines.h Fri Aug 06 23:19:50 2010 +0530
@@ -32,9 +32,6 @@
const qreal TIMESTAMP_WIDTH = 45.0; //Width for timestamp.
const qreal UNREADCOUNT_WIDTH = 40.0; //Width for unread count.
-const QString DATE_FORMAT("dd/MM"); //Date format.
-const QString TIME_FORMAT("hh:mm"); //Time format.
-
const QColor SEPARATOR_COLOR(0, 0, 0, 51); //separator color.
#endif /* MSGCOMMONDEFINES_H_ */
--- a/messagingapp/msgui/msgapp/src/msglistviewitem.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/msgapp/src/msglistviewitem.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -26,8 +26,10 @@
#include <HbFrameItem>
#include <HbIconItem>
#include <QCoreApplication>
+#include <QStringBuilder>
#include <HbEvent>
#include <HbInstance>
+#include <HbExtendedLocale>
#include "msgcommondefines.h"
#include "conversationsengine.h"
@@ -44,12 +46,17 @@
#define LOC_CALENDAR_EVENT hbTrId("txt_messaging_list_calendar_event")
#define LOC_UNSUPPORTED_MSG_TYPE hbTrId("txt_messaging_list_unsupported_message_type")
#define LOC_RECEIVED_FILES hbTrId("txt_messaging_list_received_files")
+#define LOC_MULTIMEDIA_MSG hbTrId("txt_messaging_list_multimedia_message")
const QString NEW_ITEM_FRAME("qtg_fr_list_new_item");
const QString BT_ICON("qtg_large_bluetooth");
const QString MSG_OUTGOING_ICON("qtg_mono_outbox");
const QString MSG_FAILED_ICON("qtg_mono_failed");
+// @see hbi18ndef.h
+static const char DATE_FORMAT[] = r_qtn_date_short_with_zero;
+static const char TIME_FORMAT[] = r_qtn_time_usual_with_zero;
+
//---------------------------------------------------------------
// MsgListViewItem::MsgListViewItem
// Constructor
@@ -190,6 +197,9 @@
else {
// All message types except BIO & BT.
previewText = modelIndex().data(BodyText).toString();
+ if (previewText.isEmpty() && ConvergedMessage::Mms == msgType) {
+ previewText = LOC_MULTIMEDIA_MSG;
+ }
}
return previewText;
}
@@ -204,12 +214,14 @@
// Get timestamp
QDateTime dateTime;
dateTime.setTime_t(modelIndex().data(TimeStamp).toUInt());
- QString dateString;
+
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ QString dateTimeString;
if (dateTime.date() == QDateTime::currentDateTime().date()) {
- dateString = MsgUtils::dateTimeToString(dateTime, TIME_FORMAT);
+ dateTimeString = locale.format(dateTime.time(), TIME_FORMAT);
}
else {
- dateString = MsgUtils::dateTimeToString(dateTime, DATE_FORMAT);
+ dateTimeString = locale.format(dateTime.date(), DATE_FORMAT);
}
// Set preview text & time based on direction
@@ -232,8 +244,8 @@
switch (sendState) {
case ConvergedMessage::Resend:
{
- previewText = LOC_MSG_RESEND_AT + dateString;
- dateString = QString();
+ previewText = LOC_MSG_RESEND_AT + dateTimeString;
+ dateTimeString = QString();
setCommonIndicator(MSG_OUTGOING_ICON);
break;
}
@@ -268,7 +280,7 @@
previewText.replace(QChar::ParagraphSeparator, QChar::LineSeparator);
previewText.replace('\r', QChar::LineSeparator);
mPreviewLabelItem->setText(previewText);
- mTimestampItem->setText(dateString);
+ mTimestampItem->setText(dateTimeString);
}
//---------------------------------------------------------------
--- a/messagingapp/msgui/msgapp/src/msgviewmanager.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/msgapp/src/msgviewmanager.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -191,12 +191,10 @@
qint32 contactId = mViewerData.at(0).toLongLong();
qint32 messageId = mViewerData.at(1).toInt();
int msgCount = mViewerData.at(2).toInt();
- int canForwardMessage = mViewerData.at(3).toInt();
param << contactId;
param << messageId;
param << msgCount;
- param << canForwardMessage;
}
else if(mPreviousView == MsgBaseView::UNIEDITOR){
//TODO: Remove error handling once Audio fetcher
@@ -527,7 +525,7 @@
mConversationId = -1;
return;
}
-
+
//delete UniEditor
if (mUniEditor)
{
@@ -791,16 +789,14 @@
qint32 contactId = data.at(2).toLongLong();
qint32 messageId = data.at(3).toInt();
int msgCount = data.at(4).toInt();
- int canForwardMessage = data.at(5).toInt();
//Save the viewer data to be used when u come back from Editor
mViewerData << contactId;
mViewerData << messageId;
mViewerData << msgCount;
- mViewerData << canForwardMessage;
if (!mUniViewer) {
- mUniViewer = new UnifiedViewer(messageId, canForwardMessage);
+ mUniViewer = new UnifiedViewer(messageId);
mUniViewer->setNavigationAction(mBackAction);
mMainWindow->addView(mUniViewer);
connect(mUniViewer, SIGNAL(switchView(const QVariantList&)), this,
--- a/messagingapp/msgui/msguiutils/src/mmsconformancecheck.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/msguiutils/src/mmsconformancecheck.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -90,6 +90,9 @@
HBufC* filePath = XQConversions::qStringToS60Desc(file);
if (filePath)
{
+ TMsgMediaType mediaType = EMsgMediaUnknown;
+ TUint32 mediaProtection = EFileProtNoProtection;
+
QT_TRAP_THROWING(CleanupStack::PushL(filePath);
CMmsConformance* mmsConformance = CMmsConformance::NewL();
@@ -111,10 +114,14 @@
TMmsConformance conformance = mmsConformance->MediaConformance(*info);
iConfStatus = conformance.iConfStatus;
- CleanupStack::PopAndDestroy(4);
+ mediaType = info->MediaType();
+ mediaProtection = info->Protection();
+ delete info;
+
+ CleanupStack::PopAndDestroy(4));
// TODO: Remove this check once Video support is provided in UniEditor.
- if (info->MediaType() == EMsgMediaVideo)
+ if (mediaType == EMsgMediaVideo)
{
return EInsertNotSupported;
}
@@ -130,8 +137,8 @@
// If user answers yes to Guided mode confirmation query he/she moves to free mode
if ( (iConfStatus & i) && ! (iConfStatus & j))
{
- if (iCreationMode == EMmsCreationModeFree || info->Protection()
- & EFileProtSuperDistributable)
+ if (iCreationMode == EMmsCreationModeFree ||
+ mediaProtection & EFileProtSuperDistributable)
{
// SuperDistribution not checked here
// Mask "FreeModeOnly" and "ScalingNeeded" away in free mode
@@ -161,7 +168,7 @@
if(showNote)
{
// For protected objects.
- if (EFileProtNoProtection != info->Protection())
+ if (EFileProtNoProtection != mediaProtection)
{
showPopup(INSERT_PROTECTED_ERROR);
}
@@ -170,13 +177,11 @@
showPopup(INSERT_ERROR);
}
}
-
return EInsertNotSupported;
- }
- delete info);
+ }
}
QDEBUG_WRITE("MmsConformanceCheck::CheckModeForInsert end");
- return EInsertSuccess;
+ return EInsertSuccess;
}
// ---------------------------------------------------------
--- a/messagingapp/msgui/msguiutils/src/msgmediautil.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/msguiutils/src/msgmediautil.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -16,9 +16,14 @@
*/
#include <MsgMediaResolver.h>
#include <xqconversions.h>
+#include <HbExtendedLocale>
+#include <QTime>
#include "msgmediautil.h"
+// @see hbi18ndef.h
+static const char TIME_FORMAT[] = r_qtn_time_durat_min_sec_with_zero;
+
//---------------------------------------------------------------
// MsgMediaUtil::MsgMediaUtil
// Constructor
@@ -43,32 +48,21 @@
//---------------------------------------------------------------
QString MsgMediaUtil::mediaDuration(const QString& mediaFile)
{
- QString formattedDuration(" ");
+ QString formattedDuration;
HBufC *name = XQConversions::qStringToS60Desc(mediaFile);
TInt duration = 0;
TRAPD(error, duration = mediaDurationL(*name));
delete name;
- if ( error )
+ if ( error || duration <= 0)
return formattedDuration;
-
- int sec_duration = duration / 1000;
- int hour_component = sec_duration / (60*60);
- int min_component = (sec_duration - (hour_component*60*60))/60;
- int sec_component = (sec_duration - (hour_component*60*60) - (min_component*60));
-
- if( hour_component > 0)
- {
- formattedDuration = QString("%1:%2:%3").arg(hour_component, 2, 10, QChar('0')).
- arg(min_component, 2, 10, QChar('0')).arg(sec_component, 2, 10, QChar('0'));
- }
- else
- {
- formattedDuration = QString("%1:%2").arg(min_component, 2, 10, QChar('0')).
- arg(sec_component, 2, 10, QChar('0'));
- }
+ // Media duration in milliseconds.
+ QTime mediaDuration(0, 0);
+ mediaDuration = mediaDuration.addMSecs(duration);
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ formattedDuration = locale.format(mediaDuration, TIME_FORMAT);
return formattedDuration;
}
--- a/messagingapp/msgui/msguiutils/src/msgsendutil.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/msguiutils/src/msgsendutil.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -33,7 +33,7 @@
{
// Load Plugins for send
mPluginLoader = new UniEditorPluginLoader(this);
- QT_TRAP_THROWING(mUniEditorGenUtils = new UniEditorGenUtils());
+ mUniEditorGenUtils = q_check_ptr(new UniEditorGenUtils());
}
//---------------------------------------------------------------
--- a/messagingapp/msgui/unifiededitor/inc/msgunieditoraudiowidget.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/inc/msgunieditoraudiowidget.h Fri Aug 06 23:19:50 2010 +0530
@@ -50,6 +50,12 @@
*/
void populate(const QString &filePath);
+ /**
+ * Overloaded from base class.
+ * @see HbPushButton
+ */
+ void setStretched(bool stretched = true);
+
signals:
/**
@@ -110,6 +116,11 @@
* Media file path.
*/
QString mMediaPath;
+
+ /**
+ * True if valid media duration else false.
+ */
+ bool mValidMediaDuration;
};
#endif //MSG_UNIFIED_EDITOR_AUDIO_WIDGET_H
--- a/messagingapp/msgui/unifiededitor/inc/msgunieditorview.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/inc/msgunieditorview.h Fri Aug 06 23:19:50 2010 +0530
@@ -327,6 +327,16 @@
* @param true/false to enable/disable.
*/
void enableSendButton(bool enable);
+
+ /**
+ * This slot is triggered when vkb is about to be opened.
+ */
+ void vkbAboutToOpen();
+
+ /**
+ * This slot is triggered when vkb is about to be closed.
+ */
+ void vkbAboutToClose();
private:
HbAction* mSubjectAction;
@@ -347,7 +357,8 @@
ConvergedMessageId mOpenedMessageId;
ConvergedMessage::MessageType mmOpenedMessageType;
bool mCanSaveToDrafts;
-
+ HbAction *mAttachAction;
+
/**
* TBE's content widget
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/unifiededitor/resources/layouts/msgunifiededitorview.css Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,8 @@
+HbGroupBox#groupBox>HbGroupBoxContentWidget::content
+{
+ top:-var(hb-param-margin-gene-middle-vertical);
+ left:0.0un;
+ bottom:0.0un;
+ right:0.0un;
+
+}
\ No newline at end of file
--- a/messagingapp/msgui/unifiededitor/src/msgunieditoraddress.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditoraddress.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -518,7 +518,7 @@
// ----------------------------------------------------------------------------
bool MsgUnifiedEditorAddress::validateContacts()
{
- UniEditorGenUtils* genUtils = new UniEditorGenUtils;
+ UniEditorGenUtils* genUtils = q_check_ptr(new UniEditorGenUtils);
// sync-up map to account for user-actions on address-field
syncDeletionsToMap();
@@ -569,7 +569,7 @@
CommonPhoneParser::ESMSNumber );
// 2. if number validity fails, then perform email addr validation
- UniEditorGenUtils* genUtils = new UniEditorGenUtils;
+ UniEditorGenUtils* genUtils = q_check_ptr(new UniEditorGenUtils);
if(!isValid)
{ // additional check for MMS only
isValid = genUtils->IsValidEmailAddress(
--- a/messagingapp/msgui/unifiededitor/src/msgunieditorattachment.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditorattachment.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -79,8 +79,8 @@
int at_size = 0;
TMsgMediaType mediaType = EMsgMediaUnknown;
- UniEditorGenUtils* genUtils = NULL;
- QT_TRAP_THROWING(genUtils = new UniEditorGenUtils);
+
+ UniEditorGenUtils* genUtils = q_check_ptr(new UniEditorGenUtils);
TRAP_IGNORE(genUtils->getFileInfoL(mPath,at_size,
mMimeType,mediaType));
--- a/messagingapp/msgui/unifiededitor/src/msgunieditoraudiowidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditoraudiowidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -37,8 +37,7 @@
// @see header file
//----------------------------------------------------------------------------
MsgUniFiedEditorAudioWidget::MsgUniFiedEditorAudioWidget(QGraphicsItem *parent) :
-HbPushButton(parent),
-mEditorUtils(0)
+HbPushButton(parent), mEditorUtils(0), mValidMediaDuration(true)
{
connect(this, SIGNAL(clicked()), this, SLOT(handleShortTap()));
connect(this, SIGNAL(longPress(QPointF)), this, SLOT(handleLongTap(QPointF)));
@@ -64,11 +63,32 @@
QFileInfo fileInfo(mMediaPath);
this->setText(fileInfo.baseName());
MsgMediaUtil mediaUtil;
- this->setAdditionalText(mediaUtil.mediaDuration(mMediaPath));
+ QString mediaDuration(mediaUtil.mediaDuration(mMediaPath));
+ if (mediaDuration.isEmpty()) {
+ mValidMediaDuration = false;
+ }
+ else {
+ mValidMediaDuration = true;
+ this->setAdditionalText(mediaDuration);
+ }
this->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft);
}
//----------------------------------------------------------------------------
+// MsgUniFiedEditorAudioWidget::setStretched
+// @see header file
+//----------------------------------------------------------------------------
+void MsgUniFiedEditorAudioWidget::setStretched(bool stretched)
+{
+ if (mValidMediaDuration) {
+ HbPushButton::setStretched(stretched);
+ }
+ else {
+ HbPushButton::setStretched(true);
+ }
+}
+
+//----------------------------------------------------------------------------
// MsgUniFiedEditorAudioWidget::handleShortTap
// @see header file
//----------------------------------------------------------------------------
--- a/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditorbody.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -71,6 +71,7 @@
#define LOC_UNABLE_TO_ATTACH_ITEM hbTrId("txt_messaging_dpopinfo_unable_to_attach_item_avai")
#define LOC_PROCESSING hbTrId("txt_messaging_formlabel_loading")
#define LOC_HINT_TEXT hbTrId("txt_messaging_formlabel_enter_message_here")
+#define LOC_ATTACHED_PHOTO_SIZE hbTrId("txt_messaging_dpopinfo_attached_photo_size_is_l1")
const QString ANIMATION_ICON("qtg_anim_loading");
const QString ANIMATION_FILE(":/qtg_anim_loading.axml");
@@ -111,6 +112,7 @@
{
mTextEdit = new HbTextEdit(this);
mTextEdit->setPlaceholderText(LOC_HINT_TEXT);
+ mTextEdit->setFontSpec(HbFontSpec(HbFontSpec::Secondary));
HbStyle::setItemName(mTextEdit,"textEdit");
connect(mTextEdit, SIGNAL(contentsChanged()), this, SLOT(onTextChanged()));
@@ -545,9 +547,8 @@
if( mImageSize || mTextEdit->toPlainText().size() ||
mAudioSize || mVideoSize )
{
-
- UniEditorGenUtils* genUtils = NULL;
- QT_TRAP_THROWING(genUtils = new UniEditorGenUtils);
+
+ UniEditorGenUtils* genUtils = q_check_ptr(new UniEditorGenUtils);
bodysize += mImageSize + mAudioSize + mVideoSize +
genUtils->UTF8Size(mTextEdit->toPlainText()) +
@@ -649,6 +650,10 @@
aFileName.Length() > 0)
{
mImageFile = XQConversions::s60DescToQString(aFileName);
+
+ QSize modifiedSize(QImageReader(mImageFile).size());
+ QString information = LOC_ATTACHED_PHOTO_SIZE.arg(modifiedSize.width()).arg(modifiedSize.height());
+ HbNotificationDialog::launchDialog(information);
}
else
{
@@ -678,6 +683,7 @@
mProcessingWidget->setLayout(processingLayout);
HbTextItem* processingText = new HbTextItem(LOC_PROCESSING,mProcessingWidget);
+ processingText->setFontSpec(HbFontSpec(HbFontSpec::Secondary));
processingText->setAlignment(Qt::AlignCenter);
processingLayout->addItem(processingText);
--- a/messagingapp/msgui/unifiededitor/src/msgunieditorsubject.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditorsubject.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -51,7 +51,7 @@
mSubjectEdit->setMinRows(1);
mSubjectEdit->setMaxRows(10);
- QT_TRAP_THROWING( mGenUtils = new UniEditorGenUtils());
+ mGenUtils = q_check_ptr(new UniEditorGenUtils());
connect(mSubjectEdit, SIGNAL(contentsChanged(const QString&)),
this, SLOT(onContentsChanged(const QString&)));
--- a/messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -436,8 +436,8 @@
TMsgMediaType mediaType = EMsgMediaUnknown;
QString filePath = messageDetails->attachments().at(i)->filePath();
- UniEditorGenUtils* genUtils = NULL;
- QT_TRAP_THROWING(genUtils = new UniEditorGenUtils);
+
+ UniEditorGenUtils* genUtils = q_check_ptr(new UniEditorGenUtils);
TRAP_IGNORE(genUtils->getFileInfoL(filePath,imageSize,
mimeType,mediaType));
@@ -516,9 +516,8 @@
ConvergedMessageAttachmentList attachmentList =
messageDetails.attachments();
int attachmentCount = attachmentList.count();
-
- UniEditorGenUtils* genUtils = NULL;
- QT_TRAP_THROWING(genUtils = new UniEditorGenUtils);
+
+ UniEditorGenUtils* genUtils = q_check_ptr(new UniEditorGenUtils);
QStringList pendingAttList;
for( int i=0; i < attachmentCount; i++ )
@@ -575,8 +574,8 @@
//tool bar extension for attach action.
HbToolBarExtension* attachExtension = new HbToolBarExtension();
- HbAction *attachAction = toolBar->addExtension(attachExtension);
- attachAction->setIcon(HbIcon(ATTACH_ICON));
+ mAttachAction = toolBar->addExtension(attachExtension);
+ mAttachAction->setIcon(HbIcon(ATTACH_ICON));
mTBExtnContentWidget = new HbListWidget();
mTBExtnContentWidget->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed);
@@ -673,8 +672,8 @@
ccBccLayout->addItem(mCcField);
ccBccLayout->addItem(mBccField);
- HbGroupBox* groupBox = new HbGroupBox(0);
- groupBox->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred);
+ HbGroupBox* groupBox = new HbGroupBox(0);
+ groupBox->setObjectName("groupBox");
groupBox->setContentWidget(groupWidget);
groupBox->setHeading(LOC_OTHER_RECIPIENTS_EXPAND);
@@ -1529,6 +1528,29 @@
}
//---------------------------------------------------------------
+// MsgUnifiedEditorView::vkbAboutToOpen
+// @see header file
+//---------------------------------------------------------------
+void MsgUnifiedEditorView::vkbAboutToOpen()
+{
+ //This is done to avoid user action on attachment
+ //toolbar button when vkb is opening
+ mAttachAction->setDisabled(true);
+ disconnect(mVkbHost,SIGNAL(aboutToOpen()),
+ this,SLOT(vkbAboutToOpen()));
+}
+
+//---------------------------------------------------------------
+// MsgUnifiedEditorView::vkbAboutToClose
+// @see header file
+//---------------------------------------------------------------
+void MsgUnifiedEditorView::vkbAboutToClose()
+{
+ mAttachAction->setDisabled(false);
+ connect(mVkbHost,SIGNAL(aboutToOpen()),
+ this,SLOT(vkbAboutToOpen()));
+}
+//---------------------------------------------------------------
// MsgUnifiedEditorView::hideChrome
//
//---------------------------------------------------------------
@@ -1559,6 +1581,8 @@
mVkbHost = new HbAbstractVkbHost(this);
connect(mVkbHost, SIGNAL(keypadOpened()), this, SLOT(vkbOpened()));
connect(mVkbHost, SIGNAL(keypadClosed()), this, SLOT(vkbClosed()));
+ connect(mVkbHost,SIGNAL(aboutToOpen()),this,SLOT(vkbAboutToOpen()));
+ connect(mVkbHost,SIGNAL(aboutToClose()),this,SLOT(vkbAboutToClose()));
disconnect(this->mainWindow(),SIGNAL(viewReady()),this,SLOT(doDelayedConstruction()));
--- a/messagingapp/msgui/unifiededitor/unifiededitor.qrc Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiededitor/unifiededitor.qrc Fri Aug 06 23:19:50 2010 +0530
@@ -12,5 +12,6 @@
<file alias="msgunifiededitorsubject.css">resources/layouts/msgunifiededitorsubject.css</file>
<file alias="msgunifiededitorsubject.widgetml">resources/layouts/msgunifiededitorsubject.widgetml</file>
<file alias="msgunifiededitorattachment_color.css">resources/layouts/msgunifiededitorattachment_color.css</file>
+ <file alias="msgunifiededitorview.css">resources/layouts/msgunifiededitorview.css</file>
</qresource>
</RCC>
--- a/messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h Fri Aug 06 23:19:50 2010 +0530
@@ -24,6 +24,7 @@
#define UNI_VIEWER_DLL Q_DECL_IMPORT
#endif
+#include <sqldb.h>
#include "msgbaseview.h"
#include "convergedmessage.h"
@@ -46,8 +47,7 @@
/**
* Constructor
*/
- UnifiedViewer(const qint32 messageId,
- int canForwardMessage = 0,
+ UnifiedViewer(const qint32 messageId,
QGraphicsItem *parent = 0);
/**
@@ -69,6 +69,11 @@
void resizeEvent(QGraphicsSceneResizeEvent * event);
private:
+ /**
+ * Check if this message can be forwarded
+ * @return true, if possible to forward
+ */
+ bool isForwardOk();
/**
* Creates tool bar actions
@@ -154,11 +159,6 @@
* Message count
*/
int mMsgCount;
-
- /**
- * Forward status of message
- */
- bool mForwardMessage;
};
#endif
--- a/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h Fri Aug 06 23:19:50 2010 +0530
@@ -50,6 +50,12 @@
*/
void populate(UniMessageInfo *info);
+ /**
+ * Overloaded from base class.
+ * @see HbPushButton
+ */
+ void setStretched(bool stretched = true);
+
signals:
/**
@@ -110,6 +116,11 @@
* Mime type of media.
*/
QString mMimeType;
+
+ /**
+ * True if valid media duration else false.
+ */
+ bool mValidMediaDuration;
};
#endif //UNI_VIEWER_AUDIO_WIDGET_H
--- a/messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/inc/univiewerbodywidget.h Fri Aug 06 23:19:50 2010 +0530
@@ -51,38 +51,6 @@
*/
~UniViewerBodyWidget();
-public slots:
-
- /**
- * Called to insert image content in viewer.
- * @param info Object information.
- */
- void setPixmap(UniMessageInfo *info);
-
- /**
- * Called to insert audio content in viewer.
- * @param info Object information.
- */
- void setAudio(UniMessageInfo *info);
-
- /**
- * Called to insert video content in viewer.
- * @param info Object information.
- */
- void setVideo(UniMessageInfo *info);
-
- /**
- * Called to insert text content in viewer.
- * @param text Body text to be set.
- */
- void setText(QString text);
-
- /**
- * Sets the slide counter.
- * @param slideCounter Slide counter string to be set.
- */
- void setSlideCounter(QString &slideCounter);
-
/**
* Specify if this slide has text
* @param bool
@@ -119,13 +87,20 @@
*/
void clearContent();
-private slots:
+signals:
/**
- * Sets overlay icon on top of pixmap widget.
- * @param iconName Overlay icon name to be set.
+ * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
*/
- void setOverlayIcon(const QString &iconName);
+ void sendMessage(const QString& phoneNumber);
+
+public slots:
+
+ /**
+ * Called to insert text content in viewer.
+ * @param text Body text to be set.
+ */
+ void setText(QString text);
protected:
@@ -135,13 +110,49 @@
*/
QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
-signals:
+private:
+
+ /**
+ * Called to insert image content in viewer.
+ * @param info Object information.
+ */
+ void setPixmap(UniMessageInfo *info);
+
+ /**
+ * Called to insert audio content in viewer.
+ * @param info Object information.
+ */
+ void setAudio(UniMessageInfo *info);
+
/**
- * this signal is emitted when sendMessage is emitted from UniViewerTextItem.
+ * Called to insert video content in viewer.
+ * @param info Object information.
+ */
+ void setVideo(UniMessageInfo *info);
+
+ /**
+ * Sets the slide counter.
+ * @param slideCounter Slide counter string to be set.
*/
- void sendMessage(const QString& phoneNumber);
+ void setSlideCounter(QString &slideCounter);
+
+ /**
+ * Sets overlay icon on top of pixmap widget.
+ * @param iconName Overlay icon name to be set.
+ */
+ void setOverlayIcon(const QString &iconName);
+
+private slots:
+
+ /**
+ * Handles the cases related to video thumbnail generation success/failure.
+ * @param result true if thumbnail was found else false.
+ * @param info UniMessageInfo of the media object.
+ */
+ void onThumbnailFound(bool result, UniMessageInfo *info);
private:
+
/**
* Info if slide has text.
* true if slide has text else false.
--- a/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h Fri Aug 06 23:19:50 2010 +0530
@@ -65,11 +65,11 @@
void longTap(const QPointF &position);
/**
- * Signal emitted when the thumbnail returned by Thumbnail manager is set
- * to pixmap widget.
- * @param iconName Overlay icon name to be set.
+ * Signal emitted indicating if thumbnail was found or not
+ * @param result true if thumbnail was found else false.
+ * @param info UniMessageInfo of the media object.
*/
- void setOverlayIcon(const QString& iconName);
+ void thumbnailFound(bool result, UniMessageInfo *info);
protected:
@@ -130,6 +130,12 @@
private:
/**
+ * UniMessageInfo object.
+ * Own.
+ */
+ UniMessageInfo *mInfo;
+
+ /**
* UniViewerUtils object.
* Own
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingapp/msgui/unifiedviewer/resources/layouts/univieweraddresswidget.css Fri Aug 06 23:19:50 2010 +0530
@@ -0,0 +1,7 @@
+UniViewerAddressWidget::text
+{
+ left: var(hb-param-margin-gene-middle-horizontal);
+ right: -var(hb-param-margin-gene-middle-horizontal);
+ top: 0.0un;
+ bottom: 0.0un;
+}
\ No newline at end of file
--- a/messagingapp/msgui/unifiedviewer/resources/layouts/univiewerbodywidget.css Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/resources/layouts/univiewerbodywidget.css Fri Aug 06 23:19:50 2010 +0530
@@ -1,3 +1,11 @@
+
+HbTextEdit#textItem::text
+{
+ left: var(hb-param-margin-gene-middle-horizontal);
+ right: -var(hb-param-margin-gene-middle-horizontal);
+ top: 0.0un;
+ bottom: 0.0un;
+}
UniViewerBodyWidget[hasText="true"]:portrait
{
--- a/messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -26,6 +26,7 @@
#include <HbStyleLoader>
#include <centralrepository.h>
#include <MmsEngineDomainCRKeys.h>
+#include <ccsdefs.h>
// USER INCLUDES
#include "uniscrollarea.h"
@@ -38,6 +39,7 @@
#include "conversationsengine.h"
#include "debugtraces.h"
#include "nativemessageconsts.h"
+#include "mmsconformancecheck.h"
// LOCAL CONSTANTS
const QString REPLY_ICON("qtg_mono_reply");
@@ -46,6 +48,12 @@
const QString SEND_ICON("qtg_mono_send");
const QString DELETE_ICON("qtg_mono_delete");
+//DB-file
+_LIT(KDbFileName, "c:[2002A542]conversations.db");
+// query to see if msg is forwardable
+_LIT(KSelectMsgPropertyStmt, " SELECT message_id, msg_property FROM conversation_messages WHERE message_id=:message_id ");
+
+
//LOCALIZED CONSTANTS
#define LOC_DELETE_MESSAGE hbTrId("txt_messaging_dialog_delete_message")
#define LOC_DELETE_SHARED_MESSAGE hbTrId("txt_messaging_dialog_same_message_exists_in_multip")
@@ -54,10 +62,9 @@
// UnifiedViewer::UnifiedViewer
// constructor
//----------------------------------------------------------------------------
-UnifiedViewer::UnifiedViewer(const qint32 messageId,
- int canForwardMessage,
+UnifiedViewer::UnifiedViewer(const qint32 messageId,
QGraphicsItem *parent) :
- MsgBaseView(parent), mForwardMessage(false)
+ MsgBaseView(parent)
{
QDEBUG_WRITE("UnifiedViewer contruction start");
@@ -69,8 +76,6 @@
mMessageId = messageId;
mViewFeeder = new UniViewerFeeder(mMessageId, this);
- if (canForwardMessage > 0) mForwardMessage = true;
-
mScrollArea = new UniScrollArea(this);
this->setWidget(mScrollArea);
@@ -127,7 +132,7 @@
}
}
- if (mForwardMessage)
+ if (isForwardOk())
{
toolbar->addAction(HbIcon(FORWARD_ICON), "", this, SLOT(handleFwdAction()));
}
@@ -188,7 +193,7 @@
//Creation of toolbar now depends on content
createToolBar();
-
+
QDEBUG_WRITE("UnifiedViewer populateContent END");
}
@@ -197,7 +202,7 @@
// @see header file
//---------------------------------------------------------------
void UnifiedViewer::handleFwdAction()
-{
+{
launchEditor(MsgBaseView::FORWARD_MSG);
}
@@ -207,7 +212,7 @@
//---------------------------------------------------------------
void UnifiedViewer::handleReplyAction()
{
- launchEditor(MsgBaseView::REPLY_MSG);
+ launchEditor(MsgBaseView::REPLY_MSG);
}
//---------------------------------------------------------------
@@ -236,8 +241,8 @@
void UnifiedViewer::handleDeleteAction()
{
QString txt = LOC_DELETE_MESSAGE;
-
- //if mms and out going. check for sharing
+
+ //if mms and out going. check for sharing
if((mViewFeeder->msgType() == KSenduiMtmMmsUidValue) && (!mViewFeeder->isIncoming()))
{
if(mViewFeeder->recipientCount() > 1 )
@@ -245,7 +250,7 @@
txt = LOC_DELETE_SHARED_MESSAGE;
}
}
-
+
HbMessageBox::question(txt,this,SLOT(onDialogDeleteMsg(int)),
HbMessageBox::Delete | HbMessageBox::Cancel);
}
@@ -321,7 +326,7 @@
}
else
{
- message.setMessageType(ConvergedMessage::Sms);
+ message.setMessageType(ConvergedMessage::Sms);
}
QByteArray dataArray;
@@ -335,8 +340,51 @@
params << dataArray;
params << operation;
-
+
emit switchView(params);
}
+//---------------------------------------------------------------
+// UnifiedViewer::isForwardOk
+// @see header file
+//---------------------------------------------------------------
+bool UnifiedViewer::isForwardOk()
+{
+ bool canForwardMsg = true;
+ if(mViewFeeder->msgType() == KSenduiMtmMmsUidValue)
+ {
+ // open DB
+ RSqlDatabase sqlDb;
+ TInt error = sqlDb.Open(KDbFileName);
+ if(error == KErrNone)
+ {
+ RSqlStatement sqlSelectStmt;
+ CleanupClosePushL(sqlSelectStmt);
+ sqlSelectStmt.PrepareL(sqlDb,KSelectMsgPropertyStmt);
+ TInt msgIdIndex = sqlSelectStmt.ParameterIndex(_L(":message_id"));
+ sqlSelectStmt.BindInt(msgIdIndex, mMessageId);
+ // read the flag
+ TInt msgPropertyIndex =
+ sqlSelectStmt.ColumnIndex(_L("msg_property"));
+ TInt retValue = 0;
+ if (sqlSelectStmt.Next() == KSqlAtRow)
+ {
+ retValue = static_cast<TInt>
+ (sqlSelectStmt.ColumnInt(msgPropertyIndex));
+ }
+ CleanupStack::PopAndDestroy(&sqlSelectStmt);
+ sqlDb.Close();
+ canForwardMsg = (retValue & EPreviewForward)? true:false;
+ }
+ else
+ {
+ // fall-back plan
+ MmsConformanceCheck* mmsConformanceCheck = new MmsConformanceCheck;
+ canForwardMsg = mmsConformanceCheck->validateMsgForForward(mMessageId);
+ delete mmsConformanceCheck;
+ }
+ }
+ return canForwardMsg;
+}
+
// EOF
--- a/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -30,15 +30,17 @@
#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");
+static const char VIDEO_MIMETYPE[] = "video";
+static const char AUDIO_ICON[] = "qtg_mono_audio";
+static const char VIDEO_ICON[] = "qtg_mono_video";
+static const char CORRUPTED_AUDIO_ICON[] = "qtg_mono_corrupted";
//----------------------------------------------------------------------------
// UniViewerAudioWidget::UniViewerAudioWidget
// @see header file
//----------------------------------------------------------------------------
UniViewerAudioWidget::UniViewerAudioWidget(QGraphicsItem *parent) :
- HbPushButton(parent), mViewerUtils(0)
+ HbPushButton(parent), mViewerUtils(0), mValidMediaDuration(true)
{
connect(this, SIGNAL(clicked()), this, SLOT(handleShortTap()));
connect(this, SIGNAL(longPress(QPointF)), this, SLOT(handleLongTap(QPointF)));
@@ -62,14 +64,25 @@
mMediaPath = info->path();
HbIcon audioIcon;
+
if (info->isProtected()) {
- audioIcon.setIconName(AUDIO_ICON);
+ if (mMimeType.contains(VIDEO_MIMETYPE)) {
+ audioIcon.setIconName(VIDEO_ICON);
+ }
+ else {
+ audioIcon.setIconName(AUDIO_ICON);
+ }
}
else if (info->isCorrupted()) {
audioIcon.setIconName(CORRUPTED_AUDIO_ICON);
}
else {
- audioIcon.setIconName(AUDIO_ICON);
+ if (mMimeType.contains(VIDEO_MIMETYPE)) {
+ audioIcon.setIconName(VIDEO_ICON);
+ }
+ else {
+ audioIcon.setIconName(AUDIO_ICON);
+ }
}
this->setIcon(audioIcon);
@@ -77,7 +90,28 @@
this->setText(fileInfo.baseName());
this->setTextAlignment(Qt::AlignLeft);
MsgMediaUtil mediaUtil;
- this->setAdditionalText(mediaUtil.mediaDuration(mMediaPath));
+ QString mediaDuration(mediaUtil.mediaDuration(mMediaPath));
+ if (mediaDuration.isEmpty()) {
+ mValidMediaDuration = false;
+ }
+ else {
+ mValidMediaDuration = true;
+ this->setAdditionalText(mediaDuration);
+ }
+}
+
+//----------------------------------------------------------------------------
+// UniViewerAudioWidget::setStretched
+// @see header file
+//----------------------------------------------------------------------------
+void UniViewerAudioWidget::setStretched(bool stretched)
+{
+ if (mValidMediaDuration) {
+ HbPushButton::setStretched(stretched);
+ }
+ else {
+ HbPushButton::setStretched(true);
+ }
}
//----------------------------------------------------------------------------
--- a/messagingapp/msgui/unifiedviewer/src/univiewerbodywidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/src/univiewerbodywidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -34,6 +34,8 @@
const QString VIDEO_MIMETYPE("video");
const QString TEXT_MIMETYPE("text");
+static const char VIDEO_ICON[] = "qtg_large_video_player";
+
//---------------------------------------------------------------
//UniViewerBodyWidget::UniViewerBodyWidget
// @see header file
@@ -54,98 +56,6 @@
}
//---------------------------------------------------------------
-//UniViewerBodyWidget::setImage
-// @see header file
-//---------------------------------------------------------------
-void UniViewerBodyWidget::setPixmap(UniMessageInfo *info)
-{
- setHasPixmap(true);
- //create image item instance
- if (!mPixmapItem) {
- mPixmapItem = new UniViewerPixmapWidget(this);
- HbStyle::setItemName(mPixmapItem, "pixmap");
- }
- mPixmapItem->hide();
- mPixmapItem->populate(info);
-
- this->repolish();
-}
-
-//---------------------------------------------------------------
-//UniViewerBodyWidget::setAudio
-// @see header file
-//---------------------------------------------------------------
-void UniViewerBodyWidget::setAudio(UniMessageInfo *info)
-{
- if (!mAudioItem) {
- mAudioItem = new UniViewerAudioWidget(this);
- HbStyle::setItemName(mAudioItem, "audioItem");
- }
- mAudioItem->hide();
- mAudioItem->populate(info);
-
- this->repolish();
-}
-
-//---------------------------------------------------------------
-//UniViewerBodyWidget::setVideo
-// @see header file
-//---------------------------------------------------------------
-void UniViewerBodyWidget::setVideo(UniMessageInfo *info)
-{
- setHasPixmap(true);
- //create image item instance
- if (!mPixmapItem) {
- mPixmapItem = new UniViewerPixmapWidget(this);
- HbStyle::setItemName(mPixmapItem, "pixmap");
- connect(mPixmapItem, SIGNAL(setOverlayIcon(QString)), this, SLOT(setOverlayIcon(QString)));
- }
- mPixmapItem->hide();
- mPixmapItem->populate(info);
-
- this->repolish();
-}
-
-//---------------------------------------------------------------
-//UniViewerBodyWidget::setText
-// @see header file
-//---------------------------------------------------------------
-void UniViewerBodyWidget::setText(QString text)
-{
- setHasText(true);
-
- if (!mTextItem) {
- mTextItem = new UniViewerTextItem(this);
- HbStyle::setItemName(mTextItem, "textItem");
- connect(mTextItem, SIGNAL(sendMessage(const QString&)), this,
- SIGNAL(sendMessage(const QString&)));
- }
- mTextItem->hide();
- text.replace(QChar::ParagraphSeparator, QChar::LineSeparator);
- text.replace('\r', QChar::LineSeparator);
- mTextItem->setText(text);
-
- this->repolish();
-}
-
-//---------------------------------------------------------------
-// UniViewerBodyWidget::setSlideCounter
-// @see header file
-//---------------------------------------------------------------
-void UniViewerBodyWidget::setSlideCounter(QString &slideCounter)
-{
- if (!mSlideCounter) {
- mSlideCounter = new HbTextItem(this);
- HbStyle::setItemName(mSlideCounter, "slideCounter");
- }
-
- mSlideCounter->hide();
- mSlideCounter->setText(slideCounter);
-
- this->repolish();
-}
-
-//---------------------------------------------------------------
// UniViewerBodyWidget::setHasText
// @see header file
//---------------------------------------------------------------
@@ -263,18 +173,24 @@
}
//---------------------------------------------------------------
-// UniViewerBodyWidget::setOverlayIcon
+// UniViewerBodyWidget::setText
// @see header file
//---------------------------------------------------------------
-void UniViewerBodyWidget::setOverlayIcon(const QString &iconName)
+void UniViewerBodyWidget::setText(QString text)
{
- if (!mOverlayItem) {
- mOverlayItem = new HbIconItem(this);
- HbStyle::setItemName(mOverlayItem, "overlayItem");
+ setHasText(true);
+
+ if (!mTextItem) {
+ mTextItem = new UniViewerTextItem(this);
+ mTextItem->setObjectName("textItem");
+ HbStyle::setItemName(mTextItem, "textItem");
+ connect(mTextItem, SIGNAL(sendMessage(const QString&)), this,
+ SIGNAL(sendMessage(const QString&)));
}
-
- mOverlayItem->hide();
- mOverlayItem->setIconName(iconName);
+ mTextItem->hide();
+ text.replace(QChar::ParagraphSeparator, QChar::LineSeparator);
+ text.replace('\r', QChar::LineSeparator);
+ mTextItem->setText(text);
this->repolish();
}
@@ -429,4 +345,115 @@
return szHint;
}
+//---------------------------------------------------------------
+//UniViewerBodyWidget::setPixmap
+// @see header file
+//---------------------------------------------------------------
+void UniViewerBodyWidget::setPixmap(UniMessageInfo *info)
+{
+ setHasPixmap(true);
+ //create image item instance
+ if (!mPixmapItem) {
+ mPixmapItem = new UniViewerPixmapWidget(this);
+ HbStyle::setItemName(mPixmapItem, "pixmap");
+ }
+ mPixmapItem->hide();
+ mPixmapItem->populate(info);
+
+ this->repolish();
+}
+
+//---------------------------------------------------------------
+//UniViewerBodyWidget::setAudio
+// @see header file
+//---------------------------------------------------------------
+void UniViewerBodyWidget::setAudio(UniMessageInfo *info)
+{
+ if (!mAudioItem) {
+ mAudioItem = new UniViewerAudioWidget(this);
+ HbStyle::setItemName(mAudioItem, "audioItem");
+ }
+ mAudioItem->hide();
+ mAudioItem->populate(info);
+
+ this->repolish();
+}
+
+//---------------------------------------------------------------
+//UniViewerBodyWidget::setVideo
+// @see header file
+//---------------------------------------------------------------
+void UniViewerBodyWidget::setVideo(UniMessageInfo *info)
+{
+ setHasPixmap(true);
+ //create image item instance
+ if (!mPixmapItem) {
+ mPixmapItem = new UniViewerPixmapWidget(this);
+ HbStyle::setItemName(mPixmapItem, "pixmap");
+ connect(mPixmapItem, SIGNAL(thumbnailFound(bool, UniMessageInfo*)), this,
+ SLOT(onThumbnailFound(bool, UniMessageInfo*)));
+ }
+ mPixmapItem->hide();
+ mPixmapItem->populate(info);
+
+ this->repolish();
+}
+
+//---------------------------------------------------------------
+// UniViewerBodyWidget::setSlideCounter
+// @see header file
+//---------------------------------------------------------------
+void UniViewerBodyWidget::setSlideCounter(QString &slideCounter)
+{
+ if (!mSlideCounter) {
+ mSlideCounter = new HbTextItem(this);
+ HbStyle::setItemName(mSlideCounter, "slideCounter");
+ }
+
+ mSlideCounter->hide();
+ mSlideCounter->setText(slideCounter);
+
+ this->repolish();
+}
+
+//---------------------------------------------------------------
+// UniViewerBodyWidget::setOverlayIcon
+// @see header file
+//---------------------------------------------------------------
+void UniViewerBodyWidget::setOverlayIcon(const QString &iconName)
+{
+ if (!mOverlayItem) {
+ mOverlayItem = new HbIconItem(this);
+ HbStyle::setItemName(mOverlayItem, "overlayItem");
+ }
+
+ mOverlayItem->hide();
+ mOverlayItem->setIconName(iconName);
+
+ this->repolish();
+}
+
+//---------------------------------------------------------------
+// UniViewerBodyWidget::onThumbnailFound
+// @see header file
+//---------------------------------------------------------------
+void UniViewerBodyWidget::onThumbnailFound(bool result, UniMessageInfo *info)
+{
+ if (result) {
+ // Thumbnail generation success
+ setOverlayIcon(VIDEO_ICON);
+ }
+ else {
+ // Show video content in audio widget.
+ setAudio(info);
+
+ // Remove the pixmap widget.
+ setHasPixmap(false);
+ if (mPixmapItem) {
+ HbStyle::setItemName(mPixmapItem, "");
+ mPixmapItem->hide();
+ }
+ }
+}
+
// EOF
--- a/messagingapp/msgui/unifiedviewer/src/univiewerdetailswidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/src/univiewerdetailswidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -20,7 +20,9 @@
// SYSTEM INCLUDES
#include <HbTextItem>
#include <HbIconItem>
+#include <HbExtendedLocale>
#include <QDateTime>
+#include <QStringBuilder>
// USER INCLUDES
#include "convergedmessage.h"
@@ -29,9 +31,9 @@
// LOCALIZATION
#define LOC_MESSAGE_RESEND hbTrId("txt_common_menu_resend_message")
-// LOCAL CONSTANTS
-const QString DATE_TIME_FORMAT("dd/MM/yy hh:mm ap"); //Date format.
-const QString TIME_FORMAT("hh:mm ap");
+// @see hbi18ndef.h
+static const char DATE_FORMAT[] = r_qtn_date_usual_with_zero;
+static const char TIME_FORMAT[] = r_qtn_time_usual_with_zero;
const QString MSG_HIGH_PRIORITY_ICON("qtg_small_priority_high");
const QString MSG_LOW_PRIORITY_ICON("qtg_small_priority_low");
@@ -78,12 +80,15 @@
//---------------------------------------------------------------
void UniViewerDetailsWidget::setTimeStamp(const QDateTime &aTimeStamp, const int &aSendingState)
{
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ QString date = locale.format(aTimeStamp.date(), DATE_FORMAT);
+ QString time = locale.format(aTimeStamp.time(), TIME_FORMAT);
if (aSendingState == ConvergedMessage::Resend) {
- mTime->setText(LOC_MESSAGE_RESEND + aTimeStamp.toString(TIME_FORMAT));
+ mTime->setText(LOC_MESSAGE_RESEND % time);
}
else {
- mTime->setText(aTimeStamp.toString(DATE_TIME_FORMAT));
+ mTime->setText(date % QChar(' ') % time);
}
}
--- a/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -34,21 +34,19 @@
#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_small_video");
-const QString VIDEO_OVERLAY_ICON("qtg_large_video_player");
+static const char PIXMAP_ICON[] = "qtg_small_image";
+static const char CORRUPTED_PIXMAP_ICON[] = "qtg_large_corrupted";
+static const char VIDEO_MIMETYPE[] = "video";
-const int WIDTH_RATIO = 4;
-const int HEIGHT_RATIO = 3;
+static const int WIDTH_RATIO = 4;
+static const int HEIGHT_RATIO = 3;
//---------------------------------------------------------------
// UniViewerPixmapWidget::UniViewerPixmapWidget
// @see header file
//---------------------------------------------------------------
UniViewerPixmapWidget::UniViewerPixmapWidget(QGraphicsItem *parent) :
- HbIconItem(parent), mViewerUtils(0), mThumbnailManager(0)
+ HbIconItem(parent), mInfo(0), mViewerUtils(0), mThumbnailManager(0)
{
this->grabGesture(Qt::TapGesture);
init();
@@ -60,30 +58,54 @@
//---------------------------------------------------------------
UniViewerPixmapWidget::~UniViewerPixmapWidget()
{
+ if (mInfo) {
+ delete mInfo;
+ mInfo = NULL;
+ }
}
//---------------------------------------------------------------
-// UniViewerPixmapWidget::setPixmap
+// UniViewerPixmapWidget::populate
// @see header file
//---------------------------------------------------------------
void UniViewerPixmapWidget::populate(UniMessageInfo *info)
{
mMimeType = info->mimetype();
mPixmapPath = info->path();
+
+ /**
+ * Create a copy of info for video content.
+ * mInfo will be deleted in the destructor.
+ */
if (mMimeType.contains(VIDEO_MIMETYPE)) {
- this->setIcon(MSG_VIDEO_ICON);
- mThumbnailManager->getThumbnail(mPixmapPath);
- this->ungrabGesture(Qt::TapGesture);
+ mInfo = new UniMessageInfo(*info);
}
- else if (info->isProtected()) {
- this->setIconName(PIXMAP_ICON);
+
+ if (info->isProtected()) {
+ if (mMimeType.contains(VIDEO_MIMETYPE)) {
+ emit thumbnailFound(false, mInfo);
+ }
+ else {
+ this->setIconName(PIXMAP_ICON);
+ }
}
else if (info->isCorrupted()) {
- this->setIconName(CORRUPTED_PIXMAP_ICON);
+ if (mMimeType.contains(VIDEO_MIMETYPE)) {
+ emit thumbnailFound(false, mInfo);
+ }
+ else {
+ this->setIconName(CORRUPTED_PIXMAP_ICON);
+ }
}
else {
- QPixmap pixmap(mPixmapPath);
- this->setIcon(HbIcon(pixmap));
+ if (mMimeType.contains(VIDEO_MIMETYPE)) {
+ mThumbnailManager->getThumbnail(mPixmapPath);
+ this->ungrabGesture(Qt::TapGesture);
+ }
+ else {
+ QPixmap pixmap(mPixmapPath);
+ this->setIcon(HbIcon(pixmap));
+ }
}
}
@@ -174,10 +196,13 @@
Q_UNUSED(data)
Q_UNUSED(id)
this->grabGesture(Qt::TapGesture);
- if (!error) {
+ if (error) {
+ emit thumbnailFound(false, mInfo);
+ }
+ else {
this->setIcon(HbIcon(pixmap));
this->hide();
- emit setOverlayIcon(VIDEO_OVERLAY_ICON);
+ emit thumbnailFound(true, NULL);
}
}
--- a/messagingapp/msgui/unifiedviewer/unifiedviewer.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/unifiedviewer.pro Fri Aug 06 23:19:50 2010 +0530
@@ -106,4 +106,5 @@
-lmsguiutils \
-lcentralrepository \
-lthumbnailmanagerqt \
- -lxqserviceutil
+ -lxqserviceutil \
+ -lsqldb
--- a/messagingapp/msgui/unifiedviewer/unifiedviewer.qrc Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgui/unifiedviewer/unifiedviewer.qrc Fri Aug 06 23:19:50 2010 +0530
@@ -9,5 +9,6 @@
<file alias="univiewerattachmentwidget.css">resources/layouts/univiewerattachmentwidget.css</file>
<file alias="univiewerattachmentwidget_color.css">resources/layouts/univiewerattachmentwidget_color.css</file>
<file alias="univiewerattachmentwidget.widgetml">resources/layouts/univiewerattachmentwidget.widgetml</file>
+ <file alias="univieweraddresswidget.css">resources/layouts/univieweraddresswidget.css</file>
</qresource>
</RCC>
--- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/rom/unibiomessagedataplugin.iby Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/rom/unibiomessagedataplugin.iby Fri Aug 06 23:19:50 2010 +0530
@@ -46,7 +46,6 @@
data=DATAZ_\BIOFILE_DIR\olp.rsc BIOFILE_DIR\olp.rsc
data=DATAZ_\BIOFILE_DIR\olp.mbm BIOFILE_DIR\olp.mbm
-data=DATAZ_\BIOFILE_DIR\prov.rsc BIOFILE_DIR\prov.rsc
#endif // __UNI_VCAL_DATA_PLUGIN_IBY__
--- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/src/unibiomessagedataplugin.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -30,7 +30,7 @@
UniBioMessageDataPlugin::UniBioMessageDataPlugin(QObject* parent) :
QObject(parent)
{
- QT_TRAP_THROWING(d_ptr = new UniBioMessageDataPluginPrivate(this));
+ d_ptr = q_check_ptr(new UniBioMessageDataPluginPrivate(this));
}
// UniBioMessageDataPlugin::~UniBioMessageDataPlugin()
--- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/src/testunidatamodelvcalplugin.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/src/testunidatamodelvcalplugin.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -41,17 +41,6 @@
{KBioUidValue};
-
-
-//out put directory for test results.
-QString OUTPUTDIRECTORY = "c:/logs/TestUniDataModelVCalPlugin";
-//o/p directory for data to be written on temp file.
-QString TEMPDIR = "c:/logs/TestUniDataModelVCalPlugin/testdata";
-//test result O/P file name.
-QString RESULTFILE = "c:/logs/TestUniDataModelVCalPlugin/result_%1.txt";
-// folder named UID3 of TestUniDataModelVCalPlugin inside private folder.
-const QString PRIVATE_DIR("C:/private/Ed034a47");
-
//factory method to create objects.
QObject* getObject(QString className)
{
@@ -65,59 +54,31 @@
}
}
-//creating o/p directory.
-void createOutPutDirectory()
- {
- QDir dir;
- //o/p dir
- dir.mkdir(OUTPUTDIRECTORY);
- //tmp dir
- dir.mkdir(TEMPDIR);
- // dir inside private folder.
- dir.mkdir(PRIVATE_DIR);
- }
-
//main entry point
int main(int argc, char *argv[])
{
int ret = -1;
- QCoreApplication app(argc, argv);
-
- //creating output directory.
- createOutPutDirectory();
-
- //the configuration file.
- QFile data("c:/TestUniDataModelVCalPlugin.cfg");
-
+ QCoreApplication app(argc, argv);
+
+ //the configuration file.
+ QFile data("c:/TestUniDataModelVCalPlugin.cfg");
if (data.open(QFile::ReadOnly))
{
- QTextStream in(&data);
- while(!in.atEnd())
- {
- QStringList args;
- QString appName = argv[0];
- args << appName;
-
- QString option = "-o";
- args << option;
+ QTextStream in(&data);
+ while(!in.atEnd())
+ {
+ QString name = in.readLine();
+ QObject* tc = getObject(name);
+
+ if(tc)
+ {
+ ret = QTest::qExec(tc, argc, argv);
+ delete tc;
+ }
+ }
+ }
+ return ret;
- QString outFile = RESULTFILE;
- QString name = in.readLine();
- outFile = outFile.arg(name);
- args << outFile;
-
- QObject* tc = getObject(name);
-
- if(tc)
- {
-
- ret = QTest::qExec(tc, args);
- delete tc;
- }
- }
- }
- data.close();
- return ret;
}
--- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/testunidatamodelvcalplugin.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/tsrc/testunidatamodelvcalplugin/testunidatamodelvcalplugin.pro Fri Aug 06 23:19:50 2010 +0530
@@ -84,7 +84,7 @@
DEPLOYMENT += addPl
addP2.sources = ./vcal1.txt
- addP2.path = C:/
+ addP2.path = C:/test
DEPLOYMENT += addP2
}
--- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/src/unimmsdataplugin.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unimmsdataplugin/src/unimmsdataplugin.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -23,7 +23,7 @@
UniMMSDataPlugin::UniMMSDataPlugin(QObject* parent) :
QObject(parent)
{
- QT_TRAP_THROWING( d_ptr = new UniMMSDataPluginPrivate());
+ d_ptr = q_check_ptr (new UniMMSDataPluginPrivate());
}
UniMMSDataPlugin::~UniMMSDataPlugin()
--- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/src/unismsdataplugin.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/src/unismsdataplugin.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -30,8 +30,7 @@
UniSMSDataPlugin::UniSMSDataPlugin(QObject* parent) :
QObject(parent)
{
- QT_TRAP_THROWING(d_ptr = new UniSMSDataPluginPrivate(this));
-
+ d_ptr = q_check_ptr(new UniSMSDataPluginPrivate(this));
}
//---------------------------------------------------------------
--- a/messagingapp/shareui/inc/shareuiprivate.h Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/shareui/inc/shareuiprivate.h Fri Aug 06 23:19:50 2010 +0530
@@ -232,11 +232,6 @@
*/
bool mIsEmbedded;
- /**
- * Mapping servicename to the interface descriptor.required to
- * sort the services.
- */
- QMap<QString,XQAiwInterfaceDescriptor > mServiceInterfaceMap;
};
#endif /* __SHARE_UI_PRIVATE_H__ */
--- a/messagingapp/shareui/src/shareuiprivate.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/shareui/src/shareuiprivate.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -86,7 +86,6 @@
delete request;
}
mAiwRequestList.clear();
- mServiceInterfaceMap.clear();
}
/**
@@ -153,23 +152,20 @@
if (serviceDescriptorList.size() > 0) {
initializeUi();
//sorting the services based on service names,
- //reinserting sorted list into serviceDescriptorList
+ QMap<QString,XQAiwInterfaceDescriptor > serviceInterfaceMap;
for (int i = 0; i < serviceDescriptorList.count(); i++) {
- mServiceInterfaceMap.insert(serviceDescriptorList[i].serviceName(),
+ serviceInterfaceMap.insert(serviceDescriptorList[i].serviceName(),
serviceDescriptorList[i]);
}
- QStringList serviceNames = mServiceInterfaceMap.keys();
- serviceNames.sort();
+ QStringList serviceNames = serviceInterfaceMap.keys();
serviceDescriptorList.clear();
+
for (int i = 0; i < serviceNames.count(); i++) {
- serviceDescriptorList.append(mServiceInterfaceMap.value(serviceNames.at(i)));
- }
- for (int i = 0; i < serviceDescriptorList.count(); i++) {
#ifdef __SHAREUI_MIME_HANDLING__
// Filter services based on content type
- QString allowedTypes = serviceDescriptorList[i].customProperty(QString(
+ QString allowedTypes = serviceInterfaceMap[serviceNames.at(i)].customProperty(QString(
"allowed_mime_types"));
- QString blockedTypes = serviceDescriptorList[i].customProperty(QString(
+ QString blockedTypes = serviceInterfaceMap[serviceNames.at(i)].customProperty(QString(
"blocked_mime_types"));
// Check against MIME filters
@@ -179,12 +175,13 @@
if (isContentBlocked(filteredMimeList, blockedTypes))
continue;
#endif
- HbAction* action = fetchServiceAction(serviceDescriptorList[i]);
- QString iconName = serviceDescriptorList[i].customProperty(QString("aiw_action_icon"));
+ HbAction* action = fetchServiceAction(serviceInterfaceMap[serviceNames.at(i)]);
+ QString iconName = serviceInterfaceMap[serviceNames.at(i)].customProperty(QString("aiw_action_icon"));
if (action) {
updateShareUiDialogList(action, iconName);
}
}
+ serviceInterfaceMap.clear();
if (mContentItemModel->rowCount() == 0) {
showNote(LOC_NO_SERVICES);
return true;
--- a/messagingapp/smartmessaging/ringbc/src/ringbc.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/smartmessaging/ringbc/src/ringbc.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -35,7 +35,7 @@
RingBc::RingBc()
{
QDEBUG_WRITE("RingBc::RingBc : Enter")
- QT_TRAP_THROWING(d_ptr = new RingBcPrivate());
+ d_ptr = q_check_ptr(new RingBcPrivate());
QDEBUG_WRITE("RingBc::RingBc : Exit")
}
--- a/messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -185,11 +185,13 @@
QString extension = pathList.at(pathList.count() - 1);
HBufC* fileName = XQConversions::qStringToS60Desc(path);
- TRAP_IGNORE( title = titleL(*fileName));
-
- title.append(QChar('.'));
- title.append(extension);
-
+ TRAPD(err, title = titleL(*fileName));
+ if(err == KErrNone)
+ {
+ title.append(QChar('.'));
+ title.append(extension);
+ }
+
QDEBUG_WRITE("RingBcPrivate::toneTitle : Exit")
return title;
}
@@ -228,7 +230,11 @@
{
HBufC* toneTitle = mConverter->TitleLC(data);
title = XQConversions::s60DescToQString(*toneTitle);
- CleanupStack::PopAndDestroy(); //title
+ CleanupStack::PopAndDestroy(); //tonetitle
+ }
+ else
+ {
+ User::Leave(KErrCorrupt);
}
CleanupStack::PopAndDestroy(); //dataBuf
}
Binary file mmsengine/conf/CI_mmsengine.confml has changed
Binary file mmsengine/conf/mmsengine.confml has changed
--- a/mmsengine/mmsengine.pro Tue Aug 03 21:34:40 2010 +0530
+++ b/mmsengine/mmsengine.pro Fri Aug 06 23:19:50 2010 +0530
@@ -47,6 +47,7 @@
"./loc/MmsUi.loc APP_LAYER_LOC_EXPORT_PATH(mmsui.loc)" \
#### Export confml and crml files ####
"./conf/mmsengine.confml APP_LAYER_CONFML(mmsengine.confml)" \
+ "./conf/CI_mmsengine.confml APP_LAYER_CONFML(CI_mmsengine.confml)" \
"./conf/mmsengine_100058DB.crml APP_LAYER_CRML(mmsengine_100058db.crml)" \
"./conf/mmsengine_101FB0D5.crml APP_LAYER_CRML(mmsengine_101fb0d5.crml)" \
"./conf/mmsengine_101FB0D5.crml APP_LAYER_CRML(mmsengine_101fb0d9.crml)"
--- a/mmsengine/mmsserver/src/mmsdeleteoperation.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/mmsengine/mmsserver/src/mmsdeleteoperation.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -26,7 +26,6 @@
#include <commdb.h>
#include <in_sock.h>
#include <commdbconnpref.h>
-#include <AknGlobalNote.h>
// the rest are local includes, needed always
#include "mmsconst.h"
--- a/mmsengine/mmsserver/src/mmsforwardoperation.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/mmsengine/mmsserver/src/mmsforwardoperation.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -27,7 +27,6 @@
#include <in_sock.h>
#include <commdbconnpref.h>
#include <featmgr.h>
-#include <AknGlobalNote.h>
// the rest are local includes, needed always
#include "mmsconst.h"
--- a/mmsengine/mmsserver/src/mmssendoperation.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/mmsengine/mmsserver/src/mmssendoperation.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -26,7 +26,6 @@
#include <commdb.h>
#include <in_sock.h>
#include <commdbconnpref.h>
-#include <AknGlobalNote.h>
// LOCAL INCLUDE FILES
#include "mmsconst.h"