# HG changeset patch # User hgs # Date 1283846319 -19800 # Node ID fdbe8253b596a6ef51ed27758d34d855b81428be # Parent fcb676ca077dcd5f47929cd357b2a744220689c7 201035_03 diff -r fcb676ca077d -r fdbe8253b596 messagingapp/conf/CI_messaging.confml Binary file messagingapp/conf/CI_messaging.confml has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgappfw/client/src/rcssession.cpp --- a/messagingapp/msgappfw/client/src/rcssession.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgappfw/client/src/rcssession.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -23,6 +23,8 @@ // USER INCLUDES #include "ccsdebug.h" +const TInt KCsServerRetryTimeout = 100000; +const TInt KCsServerRetryCount = 5; // ---------------------------------------------------------------------------- // StartServer // Starts the server. Used only when the server is implemented as a transient. @@ -54,15 +56,10 @@ User::WaitForRequest(status); - if (status != KErrNone) - { - server.Close(); - return status.Int(); - } - + err = (server.ExitType() == EExitPanic ) ? KErrGeneral : status.Int(); + server.Close(); PRINT ( _L("End RCsSession->StartServer") ); - - return KErrNone; + return err; } // ============================== MEMBER FUNCTIONS ============================ @@ -84,27 +81,31 @@ // ---------------------------------------------------------------------------- TInt RCsSession::Connect() { - TInt err = CreateSession(KCsServerName, Version()); - - if (err != KErrNone) + TInt retry = KCsServerRetryCount; + FOREVER { - PRINT ( _L("conversation server not running. Trying to start") ); - - err = StartServer(); - - if (err != KErrNone) - { - PRINT ( _L("Conversation server startup failed") ); - PRINT1 ( _L("End RCsSession::Connect. Error code = %d"), err ); - return err; - } - - PRINT ( _L("Conversation server startup successful") ); - - err = CreateSession(KCsServerName, Version()); + TInt err = CreateSession(KCsServerName, Version()); + if( err != KErrNotFound && err != KErrServerTerminated && err != KErrServerBusy ) + { + return err; + } + if( --retry == 0 ) + { + return err; + } + if( err == KErrServerBusy ) + { + User::After(KCsServerRetryTimeout); + } + PRINT ( _L("conversation server not running. Trying to start") ); + err = StartServer(); + if( err != KErrNone && err != KErrAlreadyExists ) + { + PRINT ( _L("Conversation server startup failed") ); + return err; + } + PRINT ( _L("Conversation server startup successful") ); } - - return err; } // ---------------------------------------------------------------------------- diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/flashmsgnotifier/flashmsgnotifier.pro --- a/messagingapp/msgnotifications/flashmsgnotifier/flashmsgnotifier.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/flashmsgnotifier/flashmsgnotifier.pro Tue Sep 07 13:28:39 2010 +0530 @@ -37,7 +37,9 @@ -lgsmu \ -lxqutils \ -lcsserverclientapi \ - -lxqsystemtoneservice + -lxqsystemtoneservice \ + -lxqsettingsmanager \ + -lhwrmvibraclient SERVICE.FILE = service_conf.xml SERVICE.OPTIONS = embeddable diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/flashmsgnotifier/inc/flashmsgnotifier.h --- a/messagingapp/msgnotifications/flashmsgnotifier/inc/flashmsgnotifier.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/flashmsgnotifier/inc/flashmsgnotifier.h Tue Sep 07 13:28:39 2010 +0530 @@ -25,6 +25,8 @@ class FlashMsgNotifierPrivate; class XQSystemToneService; +class XQSettingsManager; +class CHWRMVibra; /** * @class FlashMsgNotifier @@ -84,6 +86,17 @@ * Address string */ QString mAddress; + + /** + * Settings manager + * Owned. + */ + XQSettingsManager* mSettingsManager; + + /** + * Vibra alert on receiving a new message + */ + CHWRMVibra *mVibra; // Owned. }; #endif // MSGERRORNOTIFIER_H diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/flashmsgnotifier/src/flashmsgnotifier.cpp --- a/messagingapp/msgnotifications/flashmsgnotifier/src/flashmsgnotifier.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/flashmsgnotifier/src/flashmsgnotifier.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -27,12 +27,17 @@ #include #include #include +#include +#include +#include #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") +const XQCentralRepositorySettingsKey silenceModeKey(KCRUidProfileEngine.iUid, KProEngSilenceMode); + //------------------------------------------------------- // FlashMsgNotifier::FlashMsgNotifier() // Constructor @@ -44,6 +49,8 @@ publishAll(); mSts = new XQSystemToneService; d_ptr = q_check_ptr(new FlashMsgNotifierPrivate(this)); + QT_TRYCATCH_LEAVING(mSettingsManager = new XQSettingsManager()); + mVibra = CHWRMVibra::NewL(); } //------------------------------------------------------- @@ -54,6 +61,16 @@ { delete d_ptr; delete mSts; + if(mSettingsManager) + { + delete mSettingsManager; + mSettingsManager = NULL; + } + if(mVibra) + { + delete mVibra; + mVibra = NULL; + } } //------------------------------------------------------- @@ -120,7 +137,19 @@ notificationDialog.setAction(actionQuit, HbDeviceMessageBox::RejectButtonRole); //Play audio alert when flash msg is shown - mSts->playTone(XQSystemToneService::SmsAlertTone); + QVariant silenceMode = mSettingsManager->readItemValue(silenceModeKey, XQSettingsManager::TypeInt); + int silent = silenceMode.toInt(); + if(silent < 1) + { + //Play new message alert tone. + mSts->playTone(XQSystemToneService::SmsAlertTone); + } + // Execute the vibra effect. + if (mVibra) + { + TInt err = KErrNone; + TRAP(err,mVibra->StartVibraL(1000)); + } const QAction* result = notificationDialog.exec(); // if accepted launch view else quit diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgerrornotifier/inc/msgerrornotifiersvc.h --- a/messagingapp/msgnotifications/msgerrornotifier/inc/msgerrornotifiersvc.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgerrornotifier/inc/msgerrornotifiersvc.h Tue Sep 07 13:28:39 2010 +0530 @@ -21,9 +21,6 @@ #include #include -//Forward Declaration -class XQSystemToneService; - class MsgErrorNotifierSvc: public XQServiceProvider { @@ -49,12 +46,6 @@ */ void displayErrorNote(QVariantList displayParams); -private: - - /** - * Object to handle audio alerts - */ - XQSystemToneService* mSts; }; #endif /* MSGERRORNOTIFIERSVC_H_ */ diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgerrornotifier/msgerrornotifier.pro --- a/messagingapp/msgnotifications/msgerrornotifier/msgerrornotifier.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgerrornotifier/msgerrornotifier.pro Tue Sep 07 13:28:39 2010 +0530 @@ -25,8 +25,7 @@ src/msgerrornotifiersvc.cpp LIBS += -lxqservice \ - -lxqserviceutil \ - -lxqsystemtoneservice + -lxqserviceutil SERVICE.FILE = service_conf.xml SERVICE.OPTIONS = embeddable diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp --- a/messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -26,7 +26,6 @@ #include #include #include -#include #define LOC_VIEW hbTrId("txt_messaging_button_view") #define LOC_CANCEL hbTrId("txt_common_button_cancel") @@ -38,7 +37,6 @@ MsgErrorNotifierSvc::MsgErrorNotifierSvc(QObject* parent) : XQServiceProvider(QLatin1String("messaging.com.nokia.symbian.MsgErrorNotifier"), parent) { - mSts = new XQSystemToneService(); publishAll(); } @@ -47,11 +45,6 @@ //--------------------------------------------------------- MsgErrorNotifierSvc::~MsgErrorNotifierSvc() { - if(mSts) - { - delete mSts; - mSts = NULL; - } } //--------------------------------------------------------- @@ -93,10 +86,7 @@ messageBox.setAction(actionQuit,HbDeviceMessageBox::RejectButtonRole); setCurrentRequestAsync(); - - //Play audio alert when error notification is shown - mSts->playTone(XQSystemToneService::MessageSendFailureTone); - + // launch Messagebox const QAction* result = messageBox.exec(); diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgindicatorplugin/inc/msgindicator.h --- a/messagingapp/msgnotifications/msgindicatorplugin/inc/msgindicator.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgindicatorplugin/inc/msgindicator.h Tue Sep 07 13:28:39 2010 +0530 @@ -24,6 +24,7 @@ #include "msginfodefs.h" class MsgIndicatorPrivate; +class QTranslator; class ServiceRequestSenderTask : public QRunnable { @@ -137,6 +138,18 @@ MsgIndicatorPrivate* d_ptr; /** + * Translator member variable + * Owned + */ + QTranslator* mTranslator; + + /** + * Translator member variable + * Owned + */ + QTranslator* mTranslator_comm; + + /** * Primary Text * */ diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgindicatorplugin/msgindicatorplugin.pro --- a/messagingapp/msgnotifications/msgindicatorplugin/msgindicatorplugin.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgindicatorplugin/msgindicatorplugin.pro Tue Sep 07 13:28:39 2010 +0530 @@ -34,7 +34,8 @@ SOURCES += src/msgindicatorplugin.cpp \ src/msgindicator.cpp \ src/msgindicator_p.cpp - + +TRANSLATIONS = messaging.ts symbian { TARGET.EPOCALLOWDLLDATA=1 diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator.cpp --- a/messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgindicatorplugin/src/msgindicator.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -30,19 +30,20 @@ #include #include - +#include +#include +#include //Localized Constants #define LOC_UNREAD_MESSAGES hbTrId("txt_messaging_list_ln") #define LOC_NEW_MESSAGES hbTrId("txt_common_opt_ln_new_messages") -#define LOC_RECEIVED_FILES hbTrId("Received files") -#define LOC_UNREAD_SINGLE_MESSAGE hbTrId("Unread Message") -#define LOC_UNREAD_MULTIPLE_MESSAGES hbTrId("Unread Messages") -#define LOC_FAILED_SINGLE_MESSAGE hbTrId("Failed Message") -#define LOC_FAILED_MULTIPLE_MESSAGES hbTrId("Failed Messages") -#define LOC_OUTGOING_SINGLE_MESSAGE hbTrId("Outgoing Message") -#define LOC_OUTGOING_MULTIPLE_MESSAGES hbTrId("Outgoing Messages") +#define LOC_RECEIVED_FILES hbTrId("txt_messaging_title_received_files") +#define LOC_UNREAD_MULTIPLE_MESSAGES hbTrId("txt_messaging_list_ln_new_messages") // for unread messages +#define LOC_FAILED_SINGLE_MESSAGE hbTrId("txt_messaging_list_failed_message") +#define LOC_FAILED_MULTIPLE_MESSAGES hbTrId("txt_messaging_dpophead_ln_failed_messages") +#define LOC_OUTGOING_SINGLE_MESSAGE hbTrId("txt_messaging_indimenu_list_outgoing_message") +#define LOC_OUTGOING_MULTIPLE_MESSAGES hbTrId("txt_messaging_dpophead_ln_outgoing_messages") #define STATUS_MONO_NEW_MESSAGE QString("qtg_status_new_message") -#define LOC_BUSINESSCARD hbTrId("Business card") +#define LOC_BUSINESSCARD hbTrId("txt_messaging_menu_business_card") #define LOC_MULTIMEDIA_MSG hbTrId("txt_messaging_list_indimenu_multimedia_message") /** * The number of indicators. @@ -122,6 +123,16 @@ InteractionActivated), mIndicatorType(NULL) { + QString locale = QLocale::system().name(); + QString path = "z:/resource/qt/translations/"; + + mTranslator = new QTranslator(); + mTranslator_comm = new QTranslator(); + mTranslator->load(path + QString("messaging_") + locale); + mTranslator_comm->load(path + QString("common_") + locale); + qApp->installTranslator(mTranslator); + qApp->installTranslator(mTranslator_comm); + d_ptr = q_check_ptr(new MsgIndicatorPrivate(this)); } @@ -132,6 +143,8 @@ MsgIndicator::~MsgIndicator() { delete d_ptr; + delete mTranslator; + delete mTranslator_comm; } // ---------------------------------------------------------------------------- diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgnotifier/inc/msgnotifier_p.h --- a/messagingapp/msgnotifications/msgnotifier/inc/msgnotifier_p.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgnotifier/inc/msgnotifier_p.h Tue Sep 07 13:28:39 2010 +0530 @@ -29,6 +29,7 @@ class XQSettingsManager; class XQPublishAndSubscribeUtils; class XQSystemToneService; +class CHWRMVibra; /** * Structure to hold the details of a class 0 SMS @@ -198,6 +199,11 @@ * Object to handle audio alert when new message is received */ XQSystemToneService* mSts; + + /** + * Vibra alert on receiving a new message + */ + CHWRMVibra *mVibra; // Owned. }; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgnotifier/msgnotifier.pro --- a/messagingapp/msgnotifications/msgnotifier/msgnotifier.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgnotifier/msgnotifier.pro Tue Sep 07 13:28:39 2010 +0530 @@ -75,5 +75,6 @@ -lxqsystemtoneservice \ -lmsgerrorwatcher \ -lgsmu \ - -lssmcmn + -lssmcmn \ + -lhwrmvibraclient diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp --- a/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgnotifier/src/msgnotifier_p.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -32,6 +32,8 @@ #include #include #include +#include +#include //USER INCLUDES #include "msgnotifier.h" @@ -41,6 +43,8 @@ #include "conversationidpsconsts.h" #include "debugtraces.h" +const XQCentralRepositorySettingsKey silenceModeKey(KCRUidProfileEngine.iUid, KProEngSilenceMode); + // ---------------------------------------------------------------------------- // MsgNotifierPrivate::MsgNotifierPrivate // @see MsgNotifierPrivate.h @@ -89,6 +93,11 @@ mSts = NULL; } + if(mVibra) + { + delete mVibra; + mVibra = NULL; + } QDEBUG_WRITE("MsgNotifierPrivate::~MsgNotifierPrivate : Exit") } @@ -127,6 +136,8 @@ QT_TRYCATCH_LEAVING(mSts = new XQSystemToneService()); + mVibra = CHWRMVibra::NewL(); + QDEBUG_WRITE("MsgNotifierPrivate::initL : Exit") } @@ -228,8 +239,19 @@ notifData.mDescription = XQConversions::s60DescToQString(*descrp); } - //Play new message alert tone. - mSts->playTone(XQSystemToneService::SmsAlertTone); + QVariant silenceMode = mSettingsManager->readItemValue(silenceModeKey, XQSettingsManager::TypeInt); + int silent = silenceMode.toInt(); + if(silent < 1) + { + //Play new message alert tone. + mSts->playTone(XQSystemToneService::SmsAlertTone); + } + // Execute the vibra effect. + if (mVibra) + { + TInt err = KErrNone; + TRAP(err,mVibra->StartVibraL(1000)); + } // check whether opened cv id and received // cv id are same and show notification diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/mmstestbed/mmstestbed.pro --- a/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/mmstestbed/mmstestbed.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/mmstestbed/mmstestbed.pro Tue Sep 07 13:28:39 2010 +0530 @@ -14,7 +14,7 @@ # Description: # -QT += testlib +#QT += testlib QT -= gui TEMPLATE = lib diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsplugin/testmmsplugin.pro --- a/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsplugin/testmmsplugin.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsplugin/testmmsplugin.pro Tue Sep 07 13:28:39 2010 +0530 @@ -56,7 +56,8 @@ symbian { TARGET.UID3 = 0xE7232a7c - TARGET.CAPABILITY = CAP_GENERAL_DLL +# TARGET.CAPABILITY = CAP_GENERAL_DLL + TARGET.CAPABILITY = CAP_APPLICATION TARGET.EPOCSTACKSIZE = 0x8000 TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 TARGET.EPOCALLOWDLLDATA = 1 diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgservices/msgserviceapp/inc/msgserviceviewmanager.h --- a/messagingapp/msgservices/msgserviceapp/inc/msgserviceviewmanager.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgservices/msgserviceapp/inc/msgserviceviewmanager.h Tue Sep 07 13:28:39 2010 +0530 @@ -90,14 +90,19 @@ */ void send(ConvergedMessage message); - - /** * Opens the viewer to view the message. * @param msgId message id of the message. */ void view(int msgId); + /** + * Handles the HW key events. + * @param key key type. + * @return true if key event handled else false. + */ + bool handleKeyEvent(int key); + private: /* * Switch to unieditor. diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgservices/msgserviceapp/inc/msgservicewindow.h --- a/messagingapp/msgservices/msgserviceapp/inc/msgservicewindow.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgservices/msgserviceapp/inc/msgservicewindow.h Tue Sep 07 13:28:39 2010 +0530 @@ -43,6 +43,14 @@ */ ~MsgServiceWindow(); +protected: + + /** + * Key press event handler + * @see QGraphicsItem + */ + void keyPressEvent(QKeyEvent *event); + private: /** * View interface object diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgservices/msgserviceapp/service_conf.xml --- a/messagingapp/msgservices/msgserviceapp/service_conf.xml Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgservices/msgserviceapp/service_conf.xml Tue Sep 07 13:28:39 2010 +0530 @@ -15,7 +15,7 @@ 1.0 Share UI send interface messaging - txt_messaging_list_attach_to_new_message + txt_share_dblist_message qtg_large_message video/* diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgservices/msgserviceapp/src/msgserviceviewmanager.cpp --- a/messagingapp/msgservices/msgserviceapp/src/msgserviceviewmanager.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgservices/msgserviceapp/src/msgserviceviewmanager.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -390,6 +390,20 @@ } // ---------------------------------------------------------------------------- +// MsgServiceViewManager::handleKeyEvent +// @see header +// ---------------------------------------------------------------------------- +bool MsgServiceViewManager::handleKeyEvent(int key) +{ + MsgBaseView *baseView = static_cast(mMainWindow->currentView()); + bool eventHandled = false; + if (baseView) { + eventHandled = baseView->handleKeyEvent(key); + } + return eventHandled; +} + +// ---------------------------------------------------------------------------- // MsgServiceViewManager::handleSmsMmsMsg // @see header // ---------------------------------------------------------------------------- diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp --- a/messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -25,6 +25,8 @@ #include "msgstorehandler.h" #include "msgserviceviewmanager.h" +#include + // LOCALIZATION #define LOC_BUTTON_DELETE hbTrId("txt_common_button_delete") #define LOC_BUTTON_CANCEL hbTrId("txt_common_button_cancel") @@ -91,8 +93,23 @@ } } - +//--------------------------------------------------------------- +// MsgServiceWindow::keyPressEvent +// @see header +//--------------------------------------------------------------- +void MsgServiceWindow::keyPressEvent(QKeyEvent *event) +{ + bool eventHandled = false; + if (Qt::Key_Yes == event->key()) { + eventHandled = mViewManager->handleKeyEvent(event->key()); + } - + if (eventHandled) { + event->accept(); + } + else { + HbMainWindow::keyPressEvent(event); + } - +} +// EOF diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgsettings/msginit/src/simscnumberdetector.cpp --- a/messagingapp/msgsettings/msginit/src/simscnumberdetector.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgsettings/msginit/src/simscnumberdetector.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -448,22 +448,40 @@ } QDEBUG_WRITE("CMsgSimOperation::DoStartRunL create name") - - TBuf<100> name(KSmscSimDefaultName); - name.AppendNum(i); - - QDEBUG_WRITE("CMsgSimOperation::DoStartRunL name created") - - smsSettings->AddServiceCenterL(name, entry.iServiceCentre.iTelNumber); + + TBool duplicateFound(EFalse); + + numSCAddresses = smsSettings->ServiceCenterCount(); + for ( TInt j = 0; j < numSCAddresses; j++ ) + { + if ( entry.iServiceCentre.iTelNumber == smsSettings->GetServiceCenter( j ).Address() ) + { + QDEBUG_WRITE_FORMAT("DoStartRunL - Duplicate. SMSC ", i) + QDEBUG_WRITE_FORMAT("DoStartRunL - of Sms Settings SMSC ", j) + duplicateFound = ETrue; + break; + } + } + if(!duplicateFound) + { + TBuf name; + name = entry.iText; + if ( name == KNullDesC ) + { + name.Append(KSmscSimDefaultName); + name.AppendNum(i); + } + + QDEBUG_WRITE("CMsgSimOperation::DoStartRunL name created") + smsSettings->AddServiceCenterL(name, entry.iServiceCentre.iTelNumber); + QDEBUG_WRITE("CMsgSimOperation::DoStartRunL AddServiceCenterL completed") + } - - QDEBUG_WRITE("CMsgSimOperation::DoStartRunL AddServiceCenterL completed") - - if ( i == 0 ) + if (i==0) { - smsSettings->SetDefaultServiceCenter(i); - QDEBUG_WRITE("CMsgSimOperation::DoStartRunL SetDefaultServiceCenter completed") - } + smsSettings->SetDefaultServiceCenter(i); + QDEBUG_WRITE("CMsgSimOperation::DoStartRunL SetDefaultServiceCenter completed") + } } // save settings diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/appengine/src/conversationmsgstorehandler.cpp --- a/messagingapp/msgui/appengine/src/conversationmsgstorehandler.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/appengine/src/conversationmsgstorehandler.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -53,9 +53,9 @@ #define LOC_CLASS_INFORMATIONAL hbTrId("txt_messaging_list_informational") #define LOC_CLASS_PERSONAL hbTrId("txt_messaging_list_personal") #define LOC_MMS_RETRIEVAL_FAILED hbTrId("txt_messaging_dialog_mms_retrieval_failed") -#define LOC_MMS_NOTIF_EXPIRED hbTrId("Message Expired !") //TODO: localization +#define LOC_MMS_NOTIF_EXPIRED hbTrId("txt_messaging_list_message_expired") #define LOC_MMS_WAITING hbTrId("txt_wireframe_list_multimedia_message_waiting") -#define LOC_MMS_RETRIEVING hbTrId("Retrieving message...") //TODO: localization +#define LOC_MMS_RETRIEVING hbTrId("txt_messaging_list_retrieving_message") #define LOC_MMS_EXPIRY_DATE hbTrId("txt_messaging_list_expiry_date") // ================= MEMBER FUNCTIONS ======================= diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/bwins/conversationviewu.def --- a/messagingapp/msgui/bwins/conversationviewu.def Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/bwins/conversationviewu.def Tue Sep 07 13:28:39 2010 +0530 @@ -2,28 +2,29 @@ ?qt_metacast@MsgConversationBaseView@@UAEPAXPBD@Z @ 1 NONAME ; void * MsgConversationBaseView::qt_metacast(char const *) ?metaObject@MsgConversationBaseView@@UBEPBUQMetaObject@@XZ @ 2 NONAME ; struct QMetaObject const * MsgConversationBaseView::metaObject(void) const ?handleConversationIdChange@MsgConversationBaseView@@AAEX_J@Z @ 3 NONAME ; void MsgConversationBaseView::handleConversationIdChange(long long) - ?closeConversationView@MsgConversationBaseView@@QAEXXZ @ 4 NONAME ; void MsgConversationBaseView::closeConversationView(void) - ?trUtf8@MsgConversationBaseView@@SA?AVQString@@PBD0H@Z @ 5 NONAME ; class QString MsgConversationBaseView::trUtf8(char const *, char const *, int) - ?handleError@MsgConversationBaseView@@AAEXHABVQString@@@Z @ 6 NONAME ; void MsgConversationBaseView::handleError(int, class QString const &) - ?tr@MsgConversationBaseView@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString MsgConversationBaseView::tr(char const *, char const *, int) - ?hideChrome@MsgConversationBaseView@@AAEX_N@Z @ 8 NONAME ; void MsgConversationBaseView::hideChrome(bool) - ??0MsgConversationBaseView@@QAE@PAVQGraphicsItem@@@Z @ 9 NONAME ; MsgConversationBaseView::MsgConversationBaseView(class QGraphicsItem *) - ?handleOk@MsgConversationBaseView@@AAEXABVQVariant@@@Z @ 10 NONAME ; void MsgConversationBaseView::handleOk(class QVariant const &) - ?trUtf8@MsgConversationBaseView@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString MsgConversationBaseView::trUtf8(char const *, char const *) - ?saveContentToDrafts@MsgConversationBaseView@@QAEHXZ @ 12 NONAME ; int MsgConversationBaseView::saveContentToDrafts(void) - ?setPSCVId@MsgConversationBaseView@@QAEX_N@Z @ 13 NONAME ; void MsgConversationBaseView::setPSCVId(bool) - ?doDelayedConstruction@MsgConversationBaseView@@AAEXXZ @ 14 NONAME ; void MsgConversationBaseView::doDelayedConstruction(void) - ?openConversation@MsgConversationBaseView@@QAEX_J@Z @ 15 NONAME ; void MsgConversationBaseView::openConversation(long long) - ?conversationId@MsgConversationBaseView@@QAE_JXZ @ 16 NONAME ; long long MsgConversationBaseView::conversationId(void) - ?staticMetaObject@MsgConversationBaseView@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const MsgConversationBaseView::staticMetaObject - ?conversationViewClosed@MsgConversationBaseView@@IAEXXZ @ 18 NONAME ; void MsgConversationBaseView::conversationViewClosed(void) - ?initView@MsgConversationBaseView@@AAEXXZ @ 19 NONAME ; void MsgConversationBaseView::initView(void) - ?markMessagesAsRead@MsgConversationBaseView@@QAEXXZ @ 20 NONAME ; void MsgConversationBaseView::markMessagesAsRead(void) - ?tr@MsgConversationBaseView@@SA?AVQString@@PBD0@Z @ 21 NONAME ; class QString MsgConversationBaseView::tr(char const *, char const *) - ?qt_metacall@MsgConversationBaseView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 22 NONAME ; int MsgConversationBaseView::qt_metacall(enum QMetaObject::Call, int, void * *) - ?getStaticMetaObject@MsgConversationBaseView@@SAABUQMetaObject@@XZ @ 23 NONAME ; struct QMetaObject const & MsgConversationBaseView::getStaticMetaObject(void) - ??1MsgConversationBaseView@@UAE@XZ @ 24 NONAME ; MsgConversationBaseView::~MsgConversationBaseView(void) - ?handleViewReady@MsgConversationBaseView@@AAEXXZ @ 25 NONAME ; void MsgConversationBaseView::handleViewReady(void) - ??_EMsgConversationBaseView@@UAE@I@Z @ 26 NONAME ; MsgConversationBaseView::~MsgConversationBaseView(unsigned int) - ?clearContent@MsgConversationBaseView@@QAEXXZ @ 27 NONAME ; void MsgConversationBaseView::clearContent(void) + ?handleKeyEvent@MsgConversationBaseView@@UAE_NH@Z @ 4 NONAME ; bool MsgConversationBaseView::handleKeyEvent(int) + ?closeConversationView@MsgConversationBaseView@@QAEXXZ @ 5 NONAME ; void MsgConversationBaseView::closeConversationView(void) + ?trUtf8@MsgConversationBaseView@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString MsgConversationBaseView::trUtf8(char const *, char const *, int) + ?handleError@MsgConversationBaseView@@AAEXHABVQString@@@Z @ 7 NONAME ; void MsgConversationBaseView::handleError(int, class QString const &) + ?tr@MsgConversationBaseView@@SA?AVQString@@PBD0H@Z @ 8 NONAME ; class QString MsgConversationBaseView::tr(char const *, char const *, int) + ?hideChrome@MsgConversationBaseView@@AAEX_N@Z @ 9 NONAME ; void MsgConversationBaseView::hideChrome(bool) + ??0MsgConversationBaseView@@QAE@PAVQGraphicsItem@@@Z @ 10 NONAME ; MsgConversationBaseView::MsgConversationBaseView(class QGraphicsItem *) + ?handleOk@MsgConversationBaseView@@AAEXABVQVariant@@@Z @ 11 NONAME ; void MsgConversationBaseView::handleOk(class QVariant const &) + ?trUtf8@MsgConversationBaseView@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString MsgConversationBaseView::trUtf8(char const *, char const *) + ?saveContentToDrafts@MsgConversationBaseView@@QAEHXZ @ 13 NONAME ; int MsgConversationBaseView::saveContentToDrafts(void) + ?setPSCVId@MsgConversationBaseView@@QAEX_N@Z @ 14 NONAME ; void MsgConversationBaseView::setPSCVId(bool) + ?doDelayedConstruction@MsgConversationBaseView@@AAEXXZ @ 15 NONAME ; void MsgConversationBaseView::doDelayedConstruction(void) + ?openConversation@MsgConversationBaseView@@QAEX_J@Z @ 16 NONAME ; void MsgConversationBaseView::openConversation(long long) + ?conversationId@MsgConversationBaseView@@QAE_JXZ @ 17 NONAME ; long long MsgConversationBaseView::conversationId(void) + ?staticMetaObject@MsgConversationBaseView@@2UQMetaObject@@B @ 18 NONAME ; struct QMetaObject const MsgConversationBaseView::staticMetaObject + ?conversationViewClosed@MsgConversationBaseView@@IAEXXZ @ 19 NONAME ; void MsgConversationBaseView::conversationViewClosed(void) + ?initView@MsgConversationBaseView@@AAEXXZ @ 20 NONAME ; void MsgConversationBaseView::initView(void) + ?markMessagesAsRead@MsgConversationBaseView@@QAEXXZ @ 21 NONAME ; void MsgConversationBaseView::markMessagesAsRead(void) + ?tr@MsgConversationBaseView@@SA?AVQString@@PBD0@Z @ 22 NONAME ; class QString MsgConversationBaseView::tr(char const *, char const *) + ?qt_metacall@MsgConversationBaseView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 23 NONAME ; int MsgConversationBaseView::qt_metacall(enum QMetaObject::Call, int, void * *) + ?getStaticMetaObject@MsgConversationBaseView@@SAABUQMetaObject@@XZ @ 24 NONAME ; struct QMetaObject const & MsgConversationBaseView::getStaticMetaObject(void) + ??1MsgConversationBaseView@@UAE@XZ @ 25 NONAME ; MsgConversationBaseView::~MsgConversationBaseView(void) + ?handleViewReady@MsgConversationBaseView@@AAEXXZ @ 26 NONAME ; void MsgConversationBaseView::handleViewReady(void) + ??_EMsgConversationBaseView@@UAE@I@Z @ 27 NONAME ; MsgConversationBaseView::~MsgConversationBaseView(unsigned int) + ?clearContent@MsgConversationBaseView@@QAEXXZ @ 28 NONAME ; void MsgConversationBaseView::clearContent(void) diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/bwins/unifiededitoru.def --- a/messagingapp/msgui/bwins/unifiededitoru.def Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/bwins/unifiededitoru.def Tue Sep 07 13:28:39 2010 +0530 @@ -49,20 +49,21 @@ ?qt_metacast@MsgUnifiedEditorView@@UAEPAXPBD@Z @ 48 NONAME ; void * MsgUnifiedEditorView::qt_metacast(char const *) ?enableSendButton@MsgUnifiedEditorView@@AAEX_N@Z @ 49 NONAME ; void MsgUnifiedEditorView::enableSendButton(bool) ?ScaleImageL@CUniImageProcessor@@QAEXAAVRFile@@AAPAVCFbsBitmap@@1AAVTSize@@H@Z @ 50 NONAME ; void CUniImageProcessor::ScaleImageL(class RFile &, class CFbsBitmap * &, class CFbsBitmap * &, class TSize &, int) - ?initView@MsgUnifiedEditorView@@AAEXXZ @ 51 NONAME ; void MsgUnifiedEditorView::initView(void) - ?packMessage@MsgUnifiedEditorView@@AAEHAAVConvergedMessage@@_N@Z @ 52 NONAME ; int MsgUnifiedEditorView::packMessage(class ConvergedMessage &, bool) - ??1MsgUnifiedEditorView@@UAE@XZ @ 53 NONAME ; MsgUnifiedEditorView::~MsgUnifiedEditorView(void) - ?hideChrome@MsgUnifiedEditorView@@AAEX_N@Z @ 54 NONAME ; void MsgUnifiedEditorView::hideChrome(bool) - ?getStaticMetaObject@MsgUnifiedEditorView@@SAABUQMetaObject@@XZ @ 55 NONAME ; struct QMetaObject const & MsgUnifiedEditorView::getStaticMetaObject(void) - ?tr@MsgUnifiedEditorView@@SA?AVQString@@PBD0@Z @ 56 NONAME ; class QString MsgUnifiedEditorView::tr(char const *, char const *) - ?trUtf8@MsgUnifiedEditorView@@SA?AVQString@@PBD0@Z @ 57 NONAME ; class QString MsgUnifiedEditorView::trUtf8(char const *, char const *) - ?tr@MsgUnifiedEditorView@@SA?AVQString@@PBD0H@Z @ 58 NONAME ; class QString MsgUnifiedEditorView::tr(char const *, char const *, int) - ?Reset@CUniImageProcessor@@QAEXXZ @ 59 NONAME ; void CUniImageProcessor::Reset(void) - ?openDraftsMessage@MsgUnifiedEditorView@@QAEXABV?$QList@VQVariant@@@@@Z @ 60 NONAME ; void MsgUnifiedEditorView::openDraftsMessage(class QList const &) - ?contactsFetched@MsgUnifiedEditorView@@AAEXABVQVariant@@@Z @ 61 NONAME ; void MsgUnifiedEditorView::contactsFetched(class QVariant const &) - ?removeAttachmentContainer@MsgUnifiedEditorView@@AAEXXZ @ 62 NONAME ; void MsgUnifiedEditorView::removeAttachmentContainer(void) - ??0MsgUnifiedEditorView@@QAE@PAVQGraphicsItem@@@Z @ 63 NONAME ; MsgUnifiedEditorView::MsgUnifiedEditorView(class QGraphicsItem *) - ?trUtf8@MsgUnifiedEditorView@@SA?AVQString@@PBD0H@Z @ 64 NONAME ; class QString MsgUnifiedEditorView::trUtf8(char const *, char const *, int) - ?deleteMessage@MsgUnifiedEditorView@@AAEXXZ @ 65 NONAME ; void MsgUnifiedEditorView::deleteMessage(void) - ?deactivateInputBlocker@MsgUnifiedEditorView@@AAEXXZ @ 66 NONAME ; void MsgUnifiedEditorView::deactivateInputBlocker(void) + ?handleKeyEvent@MsgUnifiedEditorView@@UAE_NH@Z @ 51 NONAME ; bool MsgUnifiedEditorView::handleKeyEvent(int) + ?initView@MsgUnifiedEditorView@@AAEXXZ @ 52 NONAME ; void MsgUnifiedEditorView::initView(void) + ?packMessage@MsgUnifiedEditorView@@AAEHAAVConvergedMessage@@_N@Z @ 53 NONAME ; int MsgUnifiedEditorView::packMessage(class ConvergedMessage &, bool) + ??1MsgUnifiedEditorView@@UAE@XZ @ 54 NONAME ; MsgUnifiedEditorView::~MsgUnifiedEditorView(void) + ?hideChrome@MsgUnifiedEditorView@@AAEX_N@Z @ 55 NONAME ; void MsgUnifiedEditorView::hideChrome(bool) + ?getStaticMetaObject@MsgUnifiedEditorView@@SAABUQMetaObject@@XZ @ 56 NONAME ; struct QMetaObject const & MsgUnifiedEditorView::getStaticMetaObject(void) + ?tr@MsgUnifiedEditorView@@SA?AVQString@@PBD0@Z @ 57 NONAME ; class QString MsgUnifiedEditorView::tr(char const *, char const *) + ?trUtf8@MsgUnifiedEditorView@@SA?AVQString@@PBD0@Z @ 58 NONAME ; class QString MsgUnifiedEditorView::trUtf8(char const *, char const *) + ?tr@MsgUnifiedEditorView@@SA?AVQString@@PBD0H@Z @ 59 NONAME ; class QString MsgUnifiedEditorView::tr(char const *, char const *, int) + ?Reset@CUniImageProcessor@@QAEXXZ @ 60 NONAME ; void CUniImageProcessor::Reset(void) + ?openDraftsMessage@MsgUnifiedEditorView@@QAEXABV?$QList@VQVariant@@@@@Z @ 61 NONAME ; void MsgUnifiedEditorView::openDraftsMessage(class QList const &) + ?contactsFetched@MsgUnifiedEditorView@@AAEXABVQVariant@@@Z @ 62 NONAME ; void MsgUnifiedEditorView::contactsFetched(class QVariant const &) + ?removeAttachmentContainer@MsgUnifiedEditorView@@AAEXXZ @ 63 NONAME ; void MsgUnifiedEditorView::removeAttachmentContainer(void) + ??0MsgUnifiedEditorView@@QAE@PAVQGraphicsItem@@@Z @ 64 NONAME ; MsgUnifiedEditorView::MsgUnifiedEditorView(class QGraphicsItem *) + ?trUtf8@MsgUnifiedEditorView@@SA?AVQString@@PBD0H@Z @ 65 NONAME ; class QString MsgUnifiedEditorView::trUtf8(char const *, char const *, int) + ?deleteMessage@MsgUnifiedEditorView@@AAEXXZ @ 66 NONAME ; void MsgUnifiedEditorView::deleteMessage(void) + ?deactivateInputBlocker@MsgUnifiedEditorView@@AAEXXZ @ 67 NONAME ; void MsgUnifiedEditorView::deactivateInputBlocker(void) diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/bwins/unifiedvieweru.def --- a/messagingapp/msgui/bwins/unifiedvieweru.def Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/bwins/unifiedvieweru.def Tue Sep 07 13:28:39 2010 +0530 @@ -1,26 +1,28 @@ EXPORTS ?trUtf8@UnifiedViewer@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString UnifiedViewer::trUtf8(char const *, char const *) - ?populateContent@UnifiedViewer@@QAEXH_NH@Z @ 2 NONAME ; void UnifiedViewer::populateContent(int, bool, int) - ?handleReplyAction@UnifiedViewer@@AAEXXZ @ 3 NONAME ; void UnifiedViewer::handleReplyAction(void) - ?handleDeleteAction@UnifiedViewer@@QAEXXZ @ 4 NONAME ; void UnifiedViewer::handleDeleteAction(void) - ?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 *) - ??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) + ?handleReplyAction@UnifiedViewer@@AAEXXZ @ 2 NONAME ; void UnifiedViewer::handleReplyAction(void) + ?handleDeleteAction@UnifiedViewer@@QAEXXZ @ 3 NONAME ; void UnifiedViewer::handleDeleteAction(void) + ?metaObject@UnifiedViewer@@UBEPBUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const * UnifiedViewer::metaObject(void) const + ?sendMessage@UnifiedViewer@@AAEXABVQString@@0@Z @ 5 NONAME ; void UnifiedViewer::sendMessage(class QString const &, class QString const &) + ?resizeEvent@UnifiedViewer@@MAEXPAVQGraphicsSceneResizeEvent@@@Z @ 6 NONAME ; void UnifiedViewer::resizeEvent(class QGraphicsSceneResizeEvent *) + ??0UnifiedViewer@@QAE@HPAVQGraphicsItem@@@Z @ 7 NONAME ; UnifiedViewer::UnifiedViewer(int, class QGraphicsItem *) + ?isForwardOk@UnifiedViewer@@AAE_NXZ @ 8 NONAME ; bool UnifiedViewer::isForwardOk(void) + ?handleFwdAction@UnifiedViewer@@QAEXXZ @ 9 NONAME ; void UnifiedViewer::handleFwdAction(void) + ?qt_metacast@UnifiedViewer@@UAEPAXPBD@Z @ 10 NONAME ; void * UnifiedViewer::qt_metacast(char const *) + ?onDialogDeleteMsg@UnifiedViewer@@AAEXH@Z @ 11 NONAME ; void UnifiedViewer::onDialogDeleteMsg(int) + ?handleKeyEvent@UnifiedViewer@@UAE_NH@Z @ 12 NONAME ; bool UnifiedViewer::handleKeyEvent(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) + ?populateContent@UnifiedViewer@@QAEXH_NH_J@Z @ 15 NONAME ; void UnifiedViewer::populateContent(int, bool, int, long long) + ??_EUnifiedViewer@@UAE@I@Z @ 16 NONAME ; UnifiedViewer::~UnifiedViewer(unsigned int) + ?qt_metacall@UnifiedViewer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 17 NONAME ; int UnifiedViewer::qt_metacall(enum QMetaObject::Call, int, void * *) + ?tr@UnifiedViewer@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString UnifiedViewer::tr(char const *, char const *) + ?getStaticMetaObject@UnifiedViewer@@SAABUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const & UnifiedViewer::getStaticMetaObject(void) + ?staticMetaObject@UnifiedViewer@@2UQMetaObject@@B @ 20 NONAME ; struct QMetaObject const UnifiedViewer::staticMetaObject + ?call@UnifiedViewer@@AAEXABVQString@@@Z @ 21 NONAME ; void UnifiedViewer::call(class QString const &) + ?handleReplyAllAction@UnifiedViewer@@AAEXXZ @ 22 NONAME ; void UnifiedViewer::handleReplyAllAction(void) + ?trUtf8@UnifiedViewer@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString UnifiedViewer::trUtf8(char const *, char const *, int) + ?clearContent@UnifiedViewer@@QAEXXZ @ 24 NONAME ; void UnifiedViewer::clearContent(void) + ?launchEditor@UnifiedViewer@@AAEXW4UniEditorOperation@MsgBaseView@@@Z @ 25 NONAME ; void UnifiedViewer::launchEditor(enum MsgBaseView::UniEditorOperation) + ?tr@UnifiedViewer@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString UnifiedViewer::tr(char const *, char const *, int) diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/conversationview/inc/msgconversationbaseview.h --- a/messagingapp/msgui/conversationview/inc/msgconversationbaseview.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/conversationview/inc/msgconversationbaseview.h Tue Sep 07 13:28:39 2010 +0530 @@ -84,6 +84,14 @@ */ qint64 conversationId(); + /** + * Event handler + * @param key Key code + * @return true if key event handled else false. + * @see MsgBaseView + */ + bool handleKeyEvent(int key); + public slots: /** * Close the conversation view diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/conversationview/inc/msgconversationview.h --- a/messagingapp/msgui/conversationview/inc/msgconversationview.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/conversationview/inc/msgconversationview.h Tue Sep 07 13:28:39 2010 +0530 @@ -73,6 +73,14 @@ */ int saveContentToDrafts(); + /** + * Event handler + * @param key Key code + * @return true if key event handled else false. + * @see MsgBaseView + */ + bool handleKeyEvent(int key); + private slots: /** @@ -417,6 +425,11 @@ */ void showContextMenu(HbAbstractViewItem* viewItem,const QPointF& point, int placement); + /** + * Launches Dialer Service + */ + void call(const QString& address); + private: /** diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp --- a/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -345,29 +345,30 @@ //--------------------------------------------------------------- void MsgContactCardWidget::openContactInfo() { + //service stuff. + QString service("phonebookservices"); + QString interface; QString operation; QList args; if (KBluetoothMsgsConversationId != ConversationsEngine::instance()->getCurrentConversationId()) { int contactId = resolveContactId(mContactNumber); if (contactId > 0) { //open existing contact card - operation = QString("open(int)"); + interface = QString("com.nokia.symbian.IContactsView"); + operation = QString("openContactCard(int)"); args << contactId; } else { //populate data and open unknown contact template + interface = QString("com.nokia.symbian.IContactsEdit"); operation = QString("editCreateNew(QString,QString)"); QString type = QContactPhoneNumber::DefinitionName; - args << type; args << mAddress; } - //service stuff. - QString serviceName("com.nokia.services.phonebookservices"); - XQAiwRequest* request; XQApplicationManager appManager; - request = appManager.create(serviceName, "Fetch", operation, true); // embedded + request = appManager.create(service, interface, operation, true); // embedded if (request == NULL) { return; } @@ -379,7 +380,7 @@ //disbale subscritption for the CV events ConversationsEngine::instance()->disableRegisterationForCVEvents(); - + request->setArguments(args); request->send(); delete request; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp --- a/messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -284,4 +284,13 @@ mSettingsManager->writeItemValue(mCVIdkey, -1); } } + +//--------------------------------------------------------------- +// MsgConversationBaseView::handleKeyEvent +// +//--------------------------------------------------------------- +bool MsgConversationBaseView::handleKeyEvent(int key) +{ + return mConversationView->handleKeyEvent(key); +} // EOF diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/conversationview/src/msgconversationview.cpp --- a/messagingapp/msgui/conversationview/src/msgconversationview.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/conversationview/src/msgconversationview.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -536,12 +535,12 @@ if(!action) return; - QList args; - QString serviceName("com.nokia.services.phonebookservices"); - QString operation("fetch(QString,QString,QString)"); + QString service("phonebookservices"); + QString interface("com.nokia.symbian.IContactsFetch"); + QString operation("multiFetch(QString,QString)"); XQAiwRequest* request; XQApplicationManager appManager; - request = appManager.create(serviceName, "Fetch", operation, true); //embedded + request = appManager.create(service, interface, operation, true); //embedded if ( request == NULL ) { return; @@ -562,6 +561,7 @@ connect (request, SIGNAL(requestError(int,const QString&)), this, SLOT(serviceRequestError(int,const QString&))); + QList args; args << QString(tr("Phonebook")); args << KCntActionAll; args << KCntFilterDisplayAll; @@ -582,13 +582,15 @@ XQAiwRequest* request = NULL; XQApplicationManager appManager; request = appManager.create(service,interface, operation, true); // embedded - request->setSynchronous(true); // synchronous + if(!request) { QDEBUG_WRITE("AIW-ERROR: NULL request"); return; } + request->setSynchronous(true); // synchronous + connect(request, SIGNAL(requestOk(const QVariant&)), this, SLOT(imagesFetched(const QVariant&))); connect(request, SIGNAL(requestError(int,const QString&)), @@ -982,7 +984,7 @@ // For suspended message both short tap and long tap needs to show the same // context menu..... if(direction == ConvergedMessage::Outgoing - &&sendingState == ConvergedMessage::Suspended ) + && ((sendingState == ConvergedMessage::Suspended) || (sendingState == ConvergedMessage::Failed))) { handleShortTap(); return; @@ -1111,7 +1113,6 @@ if(!data2.isNull()) params << data2; - clearEditors(); emit switchView(params); } @@ -1494,6 +1495,10 @@ return shared; } +//--------------------------------------------------------------- +// MsgConversationView::onAudioSelected +// @see header file +//--------------------------------------------------------------- void MsgConversationView::onAudioSelected(QString& filePath) { QVariantList params; @@ -1524,4 +1529,45 @@ emit switchView(params); } +//--------------------------------------------------------------- +// MsgConversationView::handleKeyEvent +// @see header file +//--------------------------------------------------------------- +bool MsgConversationView::handleKeyEvent(int key) +{ + bool eventHandled = false; + if (Qt::Key_Yes == key) { + //getting address of last sent/received msg. + const int rowCount = mMessageModel->rowCount(); + QModelIndex index = mMessageModel->index(rowCount - 1, 0); + QString address = index.data(ConversationAddress).toString(); + + if (!address.isEmpty()) { + call(address); + eventHandled = true; + } + } + return eventHandled; +} + +//--------------------------------------------------------------- +// MsgConversationView::call +// @see header +//--------------------------------------------------------------- +void MsgConversationView::call(const QString& address) +{ + QString service("phoneui"); + QString interface("com.nokia.symbian.ICallDial"); + QString operation("dial(QString)"); + + XQApplicationManager appManager; + QScopedPointer request(appManager.create(service, interface, operation, false)); + if (request) { + QList args; + args << address; + request->setArguments(args); + request->send(); + } +} + // EOF diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/eabi/conversationviewu.def --- a/messagingapp/msgui/eabi/conversationviewu.def Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/eabi/conversationviewu.def Tue Sep 07 13:28:39 2010 +0530 @@ -5,29 +5,30 @@ _ZN23MsgConversationBaseView11qt_metacastEPKc @ 4 NONAME _ZN23MsgConversationBaseView12clearContentEv @ 5 NONAME _ZN23MsgConversationBaseView14conversationIdEv @ 6 NONAME - _ZN23MsgConversationBaseView15handleViewReadyEv @ 7 NONAME - _ZN23MsgConversationBaseView16openConversationEx @ 8 NONAME - _ZN23MsgConversationBaseView16staticMetaObjectE @ 9 NONAME DATA 16 - _ZN23MsgConversationBaseView18markMessagesAsReadEv @ 10 NONAME - _ZN23MsgConversationBaseView19getStaticMetaObjectEv @ 11 NONAME - _ZN23MsgConversationBaseView19saveContentToDraftsEv @ 12 NONAME - _ZN23MsgConversationBaseView21closeConversationViewEv @ 13 NONAME - _ZN23MsgConversationBaseView21doDelayedConstructionEv @ 14 NONAME - _ZN23MsgConversationBaseView22conversationViewClosedEv @ 15 NONAME - _ZN23MsgConversationBaseView26handleConversationIdChangeEx @ 16 NONAME - _ZN23MsgConversationBaseView8handleOkERK8QVariant @ 17 NONAME - _ZN23MsgConversationBaseView8initViewEv @ 18 NONAME - _ZN23MsgConversationBaseView9setPSCVIdEb @ 19 NONAME - _ZN23MsgConversationBaseViewC1EP13QGraphicsItem @ 20 NONAME - _ZN23MsgConversationBaseViewC2EP13QGraphicsItem @ 21 NONAME - _ZN23MsgConversationBaseViewD0Ev @ 22 NONAME - _ZN23MsgConversationBaseViewD1Ev @ 23 NONAME - _ZN23MsgConversationBaseViewD2Ev @ 24 NONAME - _ZNK23MsgConversationBaseView10metaObjectEv @ 25 NONAME - _ZTI23MsgConversationBaseView @ 26 NONAME - _ZTV23MsgConversationBaseView @ 27 NONAME - _ZThn16_N23MsgConversationBaseViewD0Ev @ 28 NONAME - _ZThn16_N23MsgConversationBaseViewD1Ev @ 29 NONAME - _ZThn8_N23MsgConversationBaseViewD0Ev @ 30 NONAME - _ZThn8_N23MsgConversationBaseViewD1Ev @ 31 NONAME + _ZN23MsgConversationBaseView14handleKeyEventEi @ 7 NONAME + _ZN23MsgConversationBaseView15handleViewReadyEv @ 8 NONAME + _ZN23MsgConversationBaseView16openConversationEx @ 9 NONAME + _ZN23MsgConversationBaseView16staticMetaObjectE @ 10 NONAME DATA 16 + _ZN23MsgConversationBaseView18markMessagesAsReadEv @ 11 NONAME + _ZN23MsgConversationBaseView19getStaticMetaObjectEv @ 12 NONAME + _ZN23MsgConversationBaseView19saveContentToDraftsEv @ 13 NONAME + _ZN23MsgConversationBaseView21closeConversationViewEv @ 14 NONAME + _ZN23MsgConversationBaseView21doDelayedConstructionEv @ 15 NONAME + _ZN23MsgConversationBaseView22conversationViewClosedEv @ 16 NONAME + _ZN23MsgConversationBaseView26handleConversationIdChangeEx @ 17 NONAME + _ZN23MsgConversationBaseView8handleOkERK8QVariant @ 18 NONAME + _ZN23MsgConversationBaseView8initViewEv @ 19 NONAME + _ZN23MsgConversationBaseView9setPSCVIdEb @ 20 NONAME + _ZN23MsgConversationBaseViewC1EP13QGraphicsItem @ 21 NONAME + _ZN23MsgConversationBaseViewC2EP13QGraphicsItem @ 22 NONAME + _ZN23MsgConversationBaseViewD0Ev @ 23 NONAME + _ZN23MsgConversationBaseViewD1Ev @ 24 NONAME + _ZN23MsgConversationBaseViewD2Ev @ 25 NONAME + _ZNK23MsgConversationBaseView10metaObjectEv @ 26 NONAME + _ZTI23MsgConversationBaseView @ 27 NONAME + _ZTV23MsgConversationBaseView @ 28 NONAME + _ZThn16_N23MsgConversationBaseViewD0Ev @ 29 NONAME + _ZThn16_N23MsgConversationBaseViewD1Ev @ 30 NONAME + _ZThn8_N23MsgConversationBaseViewD0Ev @ 31 NONAME + _ZThn8_N23MsgConversationBaseViewD1Ev @ 32 NONAME diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/eabi/unifiededitoru.def --- a/messagingapp/msgui/eabi/unifiededitoru.def Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/eabi/unifiededitoru.def Tue Sep 07 13:28:39 2010 +0530 @@ -22,52 +22,53 @@ _ZN20MsgUnifiedEditorView13imagesFetchedERK8QVariant @ 21 NONAME _ZN20MsgUnifiedEditorView14addAttachmentsE11QStringList @ 22 NONAME _ZN20MsgUnifiedEditorView14changePriorityEv @ 23 NONAME - _ZN20MsgUnifiedEditorView14vkbAboutToOpenEv @ 24 NONAME - _ZN20MsgUnifiedEditorView15contactsFetchedERK8QVariant @ 25 NONAME - _ZN20MsgUnifiedEditorView15formatAddressesER5QListIP23ConvergedMessageAddressE @ 26 NONAME - _ZN20MsgUnifiedEditorView15onAudioSelectedER7QString @ 27 NONAME - _ZN20MsgUnifiedEditorView15populateContentERK5QListI8QVariantE @ 28 NONAME - _ZN20MsgUnifiedEditorView15vkbAboutToCloseEv @ 29 NONAME - _ZN20MsgUnifiedEditorView16createTempFolderEv @ 30 NONAME - _ZN20MsgUnifiedEditorView16enableSendButtonEb @ 31 NONAME - _ZN20MsgUnifiedEditorView16generateFileNameER7QString @ 32 NONAME - _ZN20MsgUnifiedEditorView16onContentChangedEv @ 33 NONAME - _ZN20MsgUnifiedEditorView16removeTempFolderEv @ 34 NONAME - _ZN20MsgUnifiedEditorView16staticMetaObjectE @ 35 NONAME DATA 16 - _ZN20MsgUnifiedEditorView17isReplyPathBrokenEv @ 36 NONAME - _ZN20MsgUnifiedEditorView17onDialogDeleteMsgEP8HbAction @ 37 NONAME - _ZN20MsgUnifiedEditorView17openDraftsMessageERK5QListI8QVariantE @ 38 NONAME - _ZN20MsgUnifiedEditorView19getStaticMetaObjectEv @ 39 NONAME - _ZN20MsgUnifiedEditorView19onDialogMmsSettingsEP8HbAction @ 40 NONAME - _ZN20MsgUnifiedEditorView19onDialogSmsSettingsEP8HbAction @ 41 NONAME - _ZN20MsgUnifiedEditorView19saveContentToDraftsEv @ 42 NONAME - _ZN20MsgUnifiedEditorView19serviceRequestErrorEiRK7QString @ 43 NONAME - _ZN20MsgUnifiedEditorView20activateInputBlockerEv @ 44 NONAME - _ZN20MsgUnifiedEditorView21doDelayedConstructionEv @ 45 NONAME - _ZN20MsgUnifiedEditorView21fetchMessageFromStoreER18ConvergedMessageIdN16ConvergedMessage11MessageTypeEi @ 46 NONAME - _ZN20MsgUnifiedEditorView22deactivateInputBlockerEv @ 47 NONAME - _ZN20MsgUnifiedEditorView22setAttachOptionEnabledENS_16TBE_AttachOptionEb @ 48 NONAME - _ZN20MsgUnifiedEditorView23handleViewExtnActivatedEP16HbListWidgetItem @ 49 NONAME - _ZN20MsgUnifiedEditorView25populateContentIntoEditorERK16ConvergedMessageb @ 50 NONAME - _ZN20MsgUnifiedEditorView25removeAttachmentContainerEv @ 51 NONAME - _ZN20MsgUnifiedEditorView25updateOtherRecipientCountEb @ 52 NONAME - _ZN20MsgUnifiedEditorView4sendEv @ 53 NONAME - _ZN20MsgUnifiedEditorView7addMenuEv @ 54 NONAME - _ZN20MsgUnifiedEditorView8addCcBccEv @ 55 NONAME - _ZN20MsgUnifiedEditorView8initViewEv @ 56 NONAME - _ZN20MsgUnifiedEditorView8setFocusEP26MsgUnifiedEditorBaseWidget @ 57 NONAME - _ZN20MsgUnifiedEditorView9vkbClosedEv @ 58 NONAME - _ZN20MsgUnifiedEditorView9vkbOpenedEv @ 59 NONAME - _ZN20MsgUnifiedEditorViewC1EP13QGraphicsItem @ 60 NONAME - _ZN20MsgUnifiedEditorViewC2EP13QGraphicsItem @ 61 NONAME - _ZN20MsgUnifiedEditorViewD0Ev @ 62 NONAME - _ZN20MsgUnifiedEditorViewD1Ev @ 63 NONAME - _ZN20MsgUnifiedEditorViewD2Ev @ 64 NONAME - _ZNK20MsgUnifiedEditorView10metaObjectEv @ 65 NONAME - _ZTI20MsgUnifiedEditorView @ 66 NONAME - _ZTV20MsgUnifiedEditorView @ 67 NONAME - _ZThn16_N20MsgUnifiedEditorViewD0Ev @ 68 NONAME - _ZThn16_N20MsgUnifiedEditorViewD1Ev @ 69 NONAME - _ZThn8_N20MsgUnifiedEditorViewD0Ev @ 70 NONAME - _ZThn8_N20MsgUnifiedEditorViewD1Ev @ 71 NONAME + _ZN20MsgUnifiedEditorView14handleKeyEventEi @ 24 NONAME + _ZN20MsgUnifiedEditorView14vkbAboutToOpenEv @ 25 NONAME + _ZN20MsgUnifiedEditorView15contactsFetchedERK8QVariant @ 26 NONAME + _ZN20MsgUnifiedEditorView15formatAddressesER5QListIP23ConvergedMessageAddressE @ 27 NONAME + _ZN20MsgUnifiedEditorView15onAudioSelectedER7QString @ 28 NONAME + _ZN20MsgUnifiedEditorView15populateContentERK5QListI8QVariantE @ 29 NONAME + _ZN20MsgUnifiedEditorView15vkbAboutToCloseEv @ 30 NONAME + _ZN20MsgUnifiedEditorView16createTempFolderEv @ 31 NONAME + _ZN20MsgUnifiedEditorView16enableSendButtonEb @ 32 NONAME + _ZN20MsgUnifiedEditorView16generateFileNameER7QString @ 33 NONAME + _ZN20MsgUnifiedEditorView16onContentChangedEv @ 34 NONAME + _ZN20MsgUnifiedEditorView16removeTempFolderEv @ 35 NONAME + _ZN20MsgUnifiedEditorView16staticMetaObjectE @ 36 NONAME DATA 16 + _ZN20MsgUnifiedEditorView17isReplyPathBrokenEv @ 37 NONAME + _ZN20MsgUnifiedEditorView17onDialogDeleteMsgEP8HbAction @ 38 NONAME + _ZN20MsgUnifiedEditorView17openDraftsMessageERK5QListI8QVariantE @ 39 NONAME + _ZN20MsgUnifiedEditorView19getStaticMetaObjectEv @ 40 NONAME + _ZN20MsgUnifiedEditorView19onDialogMmsSettingsEP8HbAction @ 41 NONAME + _ZN20MsgUnifiedEditorView19onDialogSmsSettingsEP8HbAction @ 42 NONAME + _ZN20MsgUnifiedEditorView19saveContentToDraftsEv @ 43 NONAME + _ZN20MsgUnifiedEditorView19serviceRequestErrorEiRK7QString @ 44 NONAME + _ZN20MsgUnifiedEditorView20activateInputBlockerEv @ 45 NONAME + _ZN20MsgUnifiedEditorView21doDelayedConstructionEv @ 46 NONAME + _ZN20MsgUnifiedEditorView21fetchMessageFromStoreER18ConvergedMessageIdN16ConvergedMessage11MessageTypeEi @ 47 NONAME + _ZN20MsgUnifiedEditorView22deactivateInputBlockerEv @ 48 NONAME + _ZN20MsgUnifiedEditorView22setAttachOptionEnabledENS_16TBE_AttachOptionEb @ 49 NONAME + _ZN20MsgUnifiedEditorView23handleViewExtnActivatedEP16HbListWidgetItem @ 50 NONAME + _ZN20MsgUnifiedEditorView25populateContentIntoEditorERK16ConvergedMessageb @ 51 NONAME + _ZN20MsgUnifiedEditorView25removeAttachmentContainerEv @ 52 NONAME + _ZN20MsgUnifiedEditorView25updateOtherRecipientCountEb @ 53 NONAME + _ZN20MsgUnifiedEditorView4sendEv @ 54 NONAME + _ZN20MsgUnifiedEditorView7addMenuEv @ 55 NONAME + _ZN20MsgUnifiedEditorView8addCcBccEv @ 56 NONAME + _ZN20MsgUnifiedEditorView8initViewEv @ 57 NONAME + _ZN20MsgUnifiedEditorView8setFocusEP26MsgUnifiedEditorBaseWidget @ 58 NONAME + _ZN20MsgUnifiedEditorView9vkbClosedEv @ 59 NONAME + _ZN20MsgUnifiedEditorView9vkbOpenedEv @ 60 NONAME + _ZN20MsgUnifiedEditorViewC1EP13QGraphicsItem @ 61 NONAME + _ZN20MsgUnifiedEditorViewC2EP13QGraphicsItem @ 62 NONAME + _ZN20MsgUnifiedEditorViewD0Ev @ 63 NONAME + _ZN20MsgUnifiedEditorViewD1Ev @ 64 NONAME + _ZN20MsgUnifiedEditorViewD2Ev @ 65 NONAME + _ZNK20MsgUnifiedEditorView10metaObjectEv @ 66 NONAME + _ZTI20MsgUnifiedEditorView @ 67 NONAME + _ZTV20MsgUnifiedEditorView @ 68 NONAME + _ZThn16_N20MsgUnifiedEditorViewD0Ev @ 69 NONAME + _ZThn16_N20MsgUnifiedEditorViewD1Ev @ 70 NONAME + _ZThn8_N20MsgUnifiedEditorViewD0Ev @ 71 NONAME + _ZThn8_N20MsgUnifiedEditorViewD1Ev @ 72 NONAME diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/eabi/unifiedvieweru.def --- a/messagingapp/msgui/eabi/unifiedvieweru.def Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/eabi/unifiedvieweru.def Tue Sep 07 13:28:39 2010 +0530 @@ -7,24 +7,26 @@ _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 + _ZN13UnifiedViewer14handleKeyEventEi @ 9 NONAME + _ZN13UnifiedViewer15handleFwdActionEv @ 10 NONAME + _ZN13UnifiedViewer15populateContentEibix @ 11 NONAME + _ZN13UnifiedViewer16staticMetaObjectE @ 12 NONAME DATA 16 + _ZN13UnifiedViewer17handleReplyActionEv @ 13 NONAME + _ZN13UnifiedViewer17onDialogDeleteMsgEi @ 14 NONAME + _ZN13UnifiedViewer18handleDeleteActionEv @ 15 NONAME + _ZN13UnifiedViewer19getStaticMetaObjectEv @ 16 NONAME + _ZN13UnifiedViewer20handleReplyAllActionEv @ 17 NONAME + _ZN13UnifiedViewer4callERK7QString @ 18 NONAME + _ZN13UnifiedViewerC1EiP13QGraphicsItem @ 19 NONAME + _ZN13UnifiedViewerC2EiP13QGraphicsItem @ 20 NONAME + _ZN13UnifiedViewerD0Ev @ 21 NONAME + _ZN13UnifiedViewerD1Ev @ 22 NONAME + _ZN13UnifiedViewerD2Ev @ 23 NONAME + _ZNK13UnifiedViewer10metaObjectEv @ 24 NONAME + _ZTI13UnifiedViewer @ 25 NONAME + _ZTV13UnifiedViewer @ 26 NONAME + _ZThn16_N13UnifiedViewerD0Ev @ 27 NONAME + _ZThn16_N13UnifiedViewerD1Ev @ 28 NONAME + _ZThn8_N13UnifiedViewerD0Ev @ 29 NONAME + _ZThn8_N13UnifiedViewerD1Ev @ 30 NONAME diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/inc/msgbaseview.h --- a/messagingapp/msgui/inc/msgbaseview.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/inc/msgbaseview.h Tue Sep 07 13:28:39 2010 +0530 @@ -34,6 +34,17 @@ MsgBaseView(QGraphicsItem* parent=0):HbView(parent){} /** + * Handler for HW key events. + * @param key Key code. + * @return true if key event handled else false. + */ + virtual bool handleKeyEvent(int key) + { + Q_UNUSED(key) + return false; + } + + /** * enum defining view id(s). */ enum viewId @@ -75,7 +86,6 @@ * Forceful close of conversation view */ void closeOpenConversationView(); - }; #endif //MSG_BASE_VIEW_H_ diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/inc/msgactivityhandler.h --- a/messagingapp/msgui/msgapp/inc/msgactivityhandler.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/inc/msgactivityhandler.h Tue Sep 07 13:28:39 2010 +0530 @@ -24,6 +24,7 @@ class MsgMainWindow; class MsgViewManager; +class AfActivityStorage; class MsgActivityHandler: public QObject { @@ -71,7 +72,13 @@ /** * main window reference not owned. */ - MsgMainWindow* mMainWindow; + MsgMainWindow *mMainWindow; + + /** + * App Framework activity service. + * Own. + */ + AfActivityStorage *mActivityStorage; }; #endif /* MSGACTIVITYHANDLER_H_ */ diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/inc/msgmainwindow.h --- a/messagingapp/msgui/msgapp/inc/msgmainwindow.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/inc/msgmainwindow.h Tue Sep 07 13:28:39 2010 +0530 @@ -53,6 +53,15 @@ * Returns view manager. */ MsgViewManager* viewManager(); + +protected: + + /** + * Key press event handler + * @see QGraphicsItem + */ + void keyPressEvent(QKeyEvent *event); + private: MsgServiceInterface* mMsgSI; MsgSendServiceInterface* mMsgSendSI; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/inc/msgviewmanager.h --- a/messagingapp/msgui/msgapp/inc/msgviewmanager.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/inc/msgviewmanager.h Tue Sep 07 13:28:39 2010 +0530 @@ -95,6 +95,14 @@ * Saves the content of editor or Cv to draft. */ int saveContentToDraft(); + + /** + * Handles the HW key events. + * @param key key type. + * @return true if key event handled else false. + */ + bool handleKeyEvent(int key); + private: /** * swiches back to last view after service request is complete. diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/msgapp.pro --- a/messagingapp/msgui/msgapp/msgapp.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/msgapp.pro Tue Sep 07 13:28:39 2010 +0530 @@ -101,5 +101,6 @@ -lQtContacts \ -lsettingsview \ -lringbc \ + -lafservice \ -lunidatamodelloader diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/rom/messaging_uda.confml --- a/messagingapp/msgui/msgapp/rom/messaging_uda.confml Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/rom/messaging_uda.confml Tue Sep 07 13:28:39 2010 +0530 @@ -10,7 +10,7 @@ - true + false diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/rom/msgapp.iby --- a/messagingapp/msgui/msgapp/rom/msgapp.iby Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/rom/msgapp.iby Tue Sep 07 13:28:39 2010 +0530 @@ -19,7 +19,6 @@ file=ABI_DIR\UREL\messaging101.exe SHARED_LIB_DIR\messaging101.exe data=DATAZ_\private\10003a3f\import\apps\messaging101_reg.rsc private\10003a3f\import\apps\messaging101_reg.rsc -data=DATAZ_\resource\apps\messaging101.mif resource\apps\messaging101.mif data=DATAZ_\system\install\msgapp_stub.sis system\install\msgapp_stub.sis diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/src/msgactivityhandler.cpp --- a/messagingapp/msgui/msgapp/src/msgactivityhandler.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/src/msgactivityhandler.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -21,9 +21,8 @@ #include "msgviewmanager.h" #include "msgbaseview.h" #include "msgmainwindow.h" -#include -#include #include +#include const int INVALID_MSGID = -1; // Activity Names @@ -37,7 +36,7 @@ MsgActivityHandler::MsgActivityHandler(QObject* parent): QObject(parent) { - + mActivityStorage = new AfActivityStorage(); } //----------------------------------------------------------------------------- @@ -46,7 +45,10 @@ //----------------------------------------------------------------------------- MsgActivityHandler::~MsgActivityHandler() { - + if (mActivityStorage) { + delete mActivityStorage; + mActivityStorage = NULL; + } } //----------------------------------------------------------------------------- @@ -55,9 +57,6 @@ //----------------------------------------------------------------------------- void MsgActivityHandler::saveActivity() { - HbActivityManager* activityManager = - qobject_cast(qApp)->activityManager(); - int currentView = mMainWindow->viewManager()->currentView(); int msgId = INVALID_MSGID; if((currentView == MsgBaseView::CV) || (currentView== MsgBaseView::UNIEDITOR)) @@ -81,16 +80,14 @@ stream << msgId; // add the activity to the activity manager - bool ok = activityManager->addActivity(EditorActivityName, - serializedActivity, metadata); + mActivityStorage->saveActivity(EditorActivityName, serializedActivity, metadata); } else { stream << ListViewActivityName; // add the activity to the activity manager - bool ok = activityManager->addActivity(ListViewActivityName, - serializedActivity, metadata); + mActivityStorage->saveActivity(ListViewActivityName, serializedActivity, metadata); } } @@ -119,10 +116,8 @@ //----------------------------------------------------------------------------- void MsgActivityHandler::clearActivities() { - HbActivityManager* activityManager = - qobject_cast(qApp)->activityManager(); - activityManager->removeActivity(ListViewActivityName); - activityManager->removeActivity(EditorActivityName); + mActivityStorage->removeActivity(ListViewActivityName); + mActivityStorage->removeActivity(EditorActivityName); } //----------------------------------------------------------------------------- diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/src/msglistview.cpp --- a/messagingapp/msgui/msgapp/src/msglistview.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/src/msglistview.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -381,12 +381,13 @@ args << data; //service stuff. - QString serviceName("com.nokia.services.phonebookservices"); + QString service("phonebookservices"); + QString interface("com.nokia.symbian.IContactsEdit"); QString operation("editCreateNew(QString,QString)"); XQAiwRequest* request; XQApplicationManager appManager; - request = appManager.create(serviceName, "Fetch", operation, true); // embedded + request = appManager.create(service, interface, operation, true); // embedded if ( request == NULL ) { return; @@ -412,12 +413,13 @@ args << contactId; //service stuff. - QString serviceName("com.nokia.services.phonebookservices"); - QString operation("open(int)"); + QString service("phonebookservices"); + QString interface("com.nokia.symbian.IContactsView"); + QString operation("openContactCard(int)"); XQAiwRequest* request; XQApplicationManager appManager; - request = appManager.create(serviceName, "Fetch", operation, true); // embedded + request = appManager.create(service, interface, operation, true); // embedded if ( request == NULL ) { return; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/src/msgmainwindow.cpp --- a/messagingapp/msgui/msgapp/src/msgmainwindow.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/src/msgmainwindow.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -23,6 +23,8 @@ #include "msgsendserviceinterface.h" #include "conversationsengine.h" +#include + //--------------------------------------------------------------- // MsgMainWindow::MsgMainWindow @@ -68,4 +70,24 @@ { return mViewManager; } + +//--------------------------------------------------------------- +// MsgMainWindow::keyPressEvent +// @see header +//--------------------------------------------------------------- +void MsgMainWindow::keyPressEvent(QKeyEvent *event) +{ + bool eventHandled = false; + if (Qt::Key_Yes == event->key()) { + eventHandled = mViewManager->handleKeyEvent(event->key()); + } + + if (eventHandled) { + event->accept(); + } + else { + HbMainWindow::keyPressEvent(event); + } + +} // End of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgapp/src/msgviewmanager.cpp --- a/messagingapp/msgui/msgapp/src/msgviewmanager.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgapp/src/msgviewmanager.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -683,11 +683,6 @@ mUniViewer = NULL; } - if (mConversationView) - { - //clearing content of cv. - mConversationView->clearContent(); - } // reset conversation id published if(mPreviousView == MsgBaseView::CV && mConversationView) @@ -766,7 +761,7 @@ connect(mUniViewer, SIGNAL(switchView(const QVariantList&)), this, SLOT(switchView(const QVariantList&))); } - mUniViewer->populateContent(messageId, true, msgCount); + mUniViewer->populateContent(messageId, true, msgCount, mConversationId); } if(mPreviousView==MsgBaseView::CV && mConversationView) @@ -926,7 +921,7 @@ connect(mUniViewer, SIGNAL(switchView(const QVariantList&)), this, SLOT(switchView(const QVariantList&))); } - mUniViewer->populateContent(msgId, true, -1); + mUniViewer->populateContent(msgId, true, -1, mConversationId); mMainWindow->setCurrentView(mUniViewer,true,Hb::ViewSwitchSequential); } @@ -1100,6 +1095,20 @@ } // ---------------------------------------------------------------------------- +// MsgViewManager::handleKeyEvent +// @see header +// ---------------------------------------------------------------------------- +bool MsgViewManager::handleKeyEvent(int key) +{ + MsgBaseView *baseView = static_cast(mMainWindow->currentView()); + bool eventHandled = false; + if (baseView) { + eventHandled = baseView->handleKeyEvent(key); + } + return eventHandled; +} + +// ---------------------------------------------------------------------------- // MsgViewManager::saveContentToDraft // @see header // ---------------------------------------------------------------------------- diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/msgaudiofetcher/src/msgaudioselectionengine.cpp --- a/messagingapp/msgui/msgaudiofetcher/src/msgaudioselectionengine.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/msgaudiofetcher/src/msgaudioselectionengine.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -22,6 +22,7 @@ #include #include #include +#include // USER INCLUDES #include "msgaudioselectionengine.h" @@ -135,6 +136,7 @@ } else { + QMap nameUriList; CMdEObjectQuery* query = static_cast (&aQuery); TInt count = query->Count(); for (TInt i = 0; i < count; ++i) @@ -153,11 +155,30 @@ property->TextValueL())); QString uriValue(XQConversions::s60DescToQString( object->Uri())); - iNameList.append(songName); - iUriList.append(uriValue); + + //insert into the map + nameUriList.insertMulti(uriValue, songName); } CleanupStack::PopAndDestroy(object); } + + //now get all the song names and sort them + iNameList = nameUriList.values(); + iNameList.sort(); + + // go through the song list and get the associated uri + // insert into the uri list + int nameListTotal = iNameList.count(); + for(int nameListCount = 0; + nameListCountblockSignals(true); - QList args; - QString serviceName("com.nokia.services.phonebookservices"); - QString operation("fetch(QString,QString,QString)"); + QString service("phonebookservices"); + QString interface("com.nokia.symbian.IContactsFetch"); + QString operation("multiFetch(QString,QString)"); XQAiwRequest* request; XQApplicationManager appManager; - request = appManager.create(serviceName, "Fetch", operation, true); // embedded + request = appManager.create(service, interface, operation, true); // embedded if ( request == NULL ) { return; @@ -112,6 +112,7 @@ connect (request, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&))); connect (request, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&))); + QList args; args << QString(tr("Phonebook")); args << KCntActionAll; args << KCntFilterDisplayAll; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp --- a/messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -1266,6 +1266,17 @@ return msgId; } +bool MsgUnifiedEditorView::handleKeyEvent(int key) +{ + bool eventHandled = false; + if (Qt::Key_Yes == key && mSendAction->isEnabled()) { + eventHandled = true; + send(); + } + + return eventHandled; +} + void MsgUnifiedEditorView::resizeEvent( QGraphicsSceneResizeEvent * event ) { Q_UNUSED(event) @@ -1293,22 +1304,31 @@ QContactManager* contactManager = new QContactManager("symbian"); CntServicesContactList cntServicesContacts = qVariantValue(value); int cntCount = cntServicesContacts.count(); + + QCRITICAL_WRITE_FORMAT("servicecontactlist count:",cntCount); + QList contactList; for(int i = 0; i < cntCount; i++ ) - { + { contactList << contactManager->contact( cntServicesContacts.at(i).mContactId ); } delete contactManager; - + // get list of all versit-documents QVersitDocument::VersitType versitType(QVersitDocument::VCard21Type); - QVersitContactExporter* exporter = new QVersitContactExporter(); + + QVersitContactExporter exporter; + bool ret_val = exporter.exportContacts(contactList, versitType); - bool ret_val = exporter->exportContacts(contactList, versitType); - QList documentList = exporter->documents(); - - delete exporter; - + if(ret_val == false) + { + QCRITICAL_WRITE("QVersitContactExporter::exportContacts returned false"); + return KErrGeneral; + } + + // process the documents + QList documentList = exporter.documents(); + // loop though and create a vcard for each contact QVersitWriter* writer = new QVersitWriter(); for(int i = 0; i < cntCount; i++ ) @@ -1333,17 +1353,29 @@ // trap ignore so that, incase of multiselection, other vcards are still created QByteArray bufArr; TRAP_IGNORE( - CBufBase* contactbufbase = CBufFlat::NewL(contactsbuf.size()); - CleanupStack::PushL(contactbufbase); - contactbufbase->InsertL( contactbufbase->Size(), - *XQConversions::qStringToS60Desc8( contactsbuf.data() ) ); - TPtr8 ptrbuf(contactbufbase->Ptr(0)); - bufArr = XQConversions::s60Desc8ToQByteArray(ptrbuf); - CleanupStack::PopAndDestroy(contactbufbase); - ); - file.write(bufArr); - file.close(); - filelist << filepath; + HBufC8* contactBuf8 = XQConversions::qStringToS60Desc8(contactsbuf.data()); + if(contactBuf8) + { + CleanupStack::PushL(contactBuf8); + CBufBase* contactbufbase = CBufFlat::NewL(contactsbuf.size()); + CleanupStack::PushL(contactbufbase); + + contactbufbase->InsertL( contactbufbase->Size(), *contactBuf8); + + TPtr8 ptrbuf(contactbufbase->Ptr(0)); + bufArr = XQConversions::s60Desc8ToQByteArray(ptrbuf); + + CleanupStack::PopAndDestroy(contactbufbase); + CleanupStack::PopAndDestroy(contactBuf8); + + // write to file + file.write(bufArr); + filelist << filepath; + } + ); // TRAP END + + //close file + file.close(); } } } @@ -1436,25 +1468,26 @@ //--------------------------------------------------------------- void MsgUnifiedEditorView::fetchContacts() { - QList args; - QString serviceName("com.nokia.services.phonebookservices"); - QString operation("fetch(QString,QString,QString)"); + QString service("phonebookservices"); + QString interface("com.nokia.symbian.IContactsFetch"); + QString operation("multiFetch(QString,QString)"); XQAiwRequest* request; XQApplicationManager appManager; - request = appManager.create(serviceName, "Fetch", operation, true); //embedded + request = appManager.create(service, interface, operation, true); //embedded if ( request == NULL ) { QCRITICAL_WRITE("AIW-ERROR: NULL request"); - return; + return; } // Result handlers - connect (request, SIGNAL(requestOk(const QVariant&)), + connect (request, SIGNAL(requestOk(const QVariant&)), this, SLOT(contactsFetched(const QVariant&))); - connect (request, SIGNAL(requestError(int,const QString&)), + connect (request, SIGNAL(requestError(int,const QString&)), this, SLOT(serviceRequestError(int,const QString&))); - args << QString(tr("Phonebook")); + QList args; + args << QString(tr("Phonebook")); args << KCntActionAll; args << KCntFilterDisplayAll; @@ -1478,12 +1511,14 @@ XQAiwRequest* request = NULL; XQApplicationManager appManager; request = appManager.create(service,interface, operation, true);//embedded - request->setSynchronous(true); // synchronous + if(!request) { QCRITICAL_WRITE("AIW-ERROR: NULL request"); return; } + + request->setSynchronous(true); // synchronous connect(request, SIGNAL(requestOk(const QVariant&)), this, SLOT(imagesFetched(const QVariant&))); diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h --- a/messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h Tue Sep 07 13:28:39 2010 +0530 @@ -58,7 +58,30 @@ /** * Populates the content on the widget */ - void populateContent(const qint32 messageId, bool update, int msgCount); + void populateContent(const qint32 messageId, bool update, int msgCount, qint64 conversationId=-1); + + /** + * Event handler + * @param key Key code + * @return true if key event handled else false. + * @see MsgBaseView + */ + bool handleKeyEvent(int key); + +public slots: + + /** + * Clears the content on the widget + */ + void clearContent(); + + // Used for internal testing will be removed + void handleFwdAction(); + + /** + * Handle delete + */ + void handleDeleteAction(); protected: @@ -87,20 +110,11 @@ */ void launchEditor(MsgBaseView::UniEditorOperation operation); -public slots: - /** - * Clears the content on the widget + * Launches the dialer interface. + * @args number Number to be called. */ - void clearContent(); - - // Used for internal testing will be removed - void handleFwdAction(); - - /** - * Handle delete - */ - void handleDeleteAction(); + void call(const QString &number); private slots: /** @@ -144,6 +158,11 @@ * Owned */ UniContentsWidget* mContentsWidget; + + /** + * Conversation ID + */ + qint64 mConversationID; /** * Contact id @@ -159,6 +178,7 @@ * Message count */ int mMsgCount; + }; #endif diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/inc/univiewerattachmentwidget.h Tue Sep 07 13:28:39 2010 +0530 @@ -85,10 +85,8 @@ */ void handleOpen(); - /** - * Handles saving of media. - */ - void handleSave(); + + /** * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/inc/univieweraudiowidget.h Tue Sep 07 13:28:39 2010 +0530 @@ -88,10 +88,8 @@ */ void handleOpen(); - /** - * Handles saving of media. - */ - void handleSave(); + + /** * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h --- a/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/inc/univiewerpixmapwidget.h Tue Sep 07 13:28:39 2010 +0530 @@ -87,10 +87,8 @@ */ void handleOpen(); - /** - * Handles saving of media. - */ - void handleSave(); + + /** * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp --- a/messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -27,6 +27,8 @@ #include #include #include +#include +#include // USER INCLUDES #include "uniscrollarea.h" @@ -64,7 +66,7 @@ //---------------------------------------------------------------------------- UnifiedViewer::UnifiedViewer(const qint32 messageId, QGraphicsItem *parent) : - MsgBaseView(parent) + MsgBaseView(parent), mConversationID(-1) { QDEBUG_WRITE("UnifiedViewer contruction start"); @@ -160,12 +162,13 @@ // UnifiedViewer::populateContent // @see header file //--------------------------------------------------------------- -void UnifiedViewer::populateContent(const qint32 messageId, bool update, int msgCount) +void UnifiedViewer::populateContent(const qint32 messageId, bool update, int msgCount, qint64 conversationId) { QDEBUG_WRITE("UnifiedViewer populateContent Start"); mMsgCount = msgCount; mMessageId = messageId; + mConversationID = conversationId; QDEBUG_WRITE("UnifiedViewer feeder->updateContent START"); @@ -198,6 +201,42 @@ } //--------------------------------------------------------------- +// UnifiedViewer::handleKeyEvent +// @see header file +//--------------------------------------------------------------- +bool UnifiedViewer::handleKeyEvent(int key) +{ + bool eventHandled = false; + if (Qt::Key_Yes == key) { + bool incoming = mViewFeeder->isIncoming(); + QString number; + if (incoming) { + QString alias; + mViewFeeder->fromAddressAndAlias(number, alias); + } + else if (!incoming && 1 == mViewFeeder->recipientCount()) { + ConvergedMessageAddressList addrList; + if ((addrList = mViewFeeder->toAddressList()).count()) { + number = addrList[0]->address(); + } + else if((addrList = mViewFeeder->ccAddressList()).count()) { + number = addrList[0]->address(); + } + else if ((addrList = mViewFeeder->bccAddressList()).count()) { + number = addrList[0]->address(); + } + } + + // Call + if (!number.isEmpty()) { + eventHandled = true; + call(number); + } + } + return eventHandled; +} + +//--------------------------------------------------------------- // UnifiedViewer::handleFwdAction // @see header file //--------------------------------------------------------------- @@ -298,6 +337,7 @@ if (mMsgCount > 1) { param << MsgBaseView::CV; param << MsgBaseView::UNIVIEWER; + param << mConversationID; } else { param << MsgBaseView::CLV; @@ -345,6 +385,26 @@ } //--------------------------------------------------------------- +// UnifiedViewer::call +// @see header file +//--------------------------------------------------------------- +void UnifiedViewer::call(const QString &number) +{ + QString service("phoneui"); + QString interface("com.nokia.symbian.ICallDial"); + QString operation("dial(QString)"); + + XQApplicationManager appManager; + QScopedPointer request(appManager.create(service, interface, operation, false)); + if (request) { + QList args; + args << number; + request->setArguments(args); + request->send(); + } +} + +//--------------------------------------------------------------- // UnifiedViewer::isForwardOk // @see header file //--------------------------------------------------------------- diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/src/univieweraddresswidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univieweraddresswidget.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univieweraddresswidget.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -475,9 +475,6 @@ if(action) { - QList args; - QString operation; - QString data = action->data().toString(); int contactId = MsgContactHandler::resolveContactDisplayName( @@ -495,29 +492,31 @@ QContactEmailAddress::FieldEmailAddress); } + //service stuff. + QString service("phonebookservices"); + QString interface; + QString operation; + QList args; + if(contactId > 0) { //open contact card - operation = QString("open(int)"); + interface = QString("com.nokia.symbian.IContactsView"); + operation = QString("openContactCard(int)"); args << contactId; } else { //save to contacts with phone number field prefilled. - + interface = QString("com.nokia.symbian.IContactsEdit"); operation = QString("editCreateNew(QString,QString)"); QString type = QContactPhoneNumber::DefinitionName; - args << type; args << data; } - - //service stuff. - QString serviceName("com.nokia.services.phonebookservices"); - XQAiwRequest* request; XQApplicationManager appManager; - request = appManager.create(serviceName, "Fetch", operation, true); // embedded + request = appManager.create(service, interface, operation, true); // embedded if ( request == NULL ) { return; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -35,7 +35,6 @@ // LOCAL CONSTANTS #define LOC_OPEN hbTrId("txt_common_menu_open") -#define LOC_SAVE hbTrId("txt_common_menu_save") #define LOC_SAVE_TO_CONTACTS hbTrId("txt_messaging_menu_save_to_contacts") const QString BG_FRAME_NORMAL("qtg_fr_list_normal"); @@ -181,14 +180,7 @@ QTimer::singleShot(300,this,SLOT(regrabGesture())); } -//---------------------------------------------------------------------------- -// UniViewerAttachmentWidget::handleSave -// @see header file -//---------------------------------------------------------------------------- -void UniViewerAttachmentWidget::handleSave() -{ -} //---------------------------------------------------------------------------- // UniViewerAttachmentWidget::handleShortTap @@ -221,7 +213,7 @@ } else { menu->addAction(LOC_OPEN, this, SLOT(handleOpen())); - menu->addAction(LOC_SAVE, this, SLOT(handleSave())); + } menu->show(); diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univieweraudiowidget.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -28,7 +28,7 @@ // LOCAL CONSTANTS #define LOC_OPEN hbTrId("txt_common_menu_open") -#define LOC_SAVE hbTrId("txt_common_menu_save") + static const char VIDEO_MIMETYPE[] = "video"; static const char AUDIO_ICON[] = "qtg_mono_audio"; @@ -138,7 +138,6 @@ HbMenu* menu = new HbMenu; menu->setAttribute(Qt::WA_DeleteOnClose); menu->addAction(LOC_OPEN, this, SLOT(handleOpen())); - menu->addAction(LOC_SAVE, this, SLOT(handleSave())); menu->setPreferredPos(position); menu->show(); } @@ -160,14 +159,7 @@ QTimer::singleShot(300,this,SLOT(regrabGesture())); } -//---------------------------------------------------------------------------- -// UniViewerAudioWidget::handleSave -// @see header file -//---------------------------------------------------------------------------- -void UniViewerAudioWidget::handleSave() -{ -} //--------------------------------------------------------------- // UniViewerAudioWidget::regrabGesture diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/src/univiewerfeeder.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerfeeder.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerfeeder.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -202,41 +202,48 @@ return d_ptr->clearContent(); } +// --------------------------------------------------------------------------- // UniViewerFeeder::fromAddressAndAlias // @see header file -// +// --------------------------------------------------------------------------- void UniViewerFeeder::fromAddressAndAlias(QString& from, QString& alias) { return d_ptr->fromAddressAndAlias(from, alias); } +// --------------------------------------------------------------------------- // UniViewerFeeder::isIncoming // @see header file -// +// --------------------------------------------------------------------------- bool UniViewerFeeder::isIncoming() { return d_ptr->isIncoming(); } +// --------------------------------------------------------------------------- // UniViewerFeeder::priority // @see header file -// +// --------------------------------------------------------------------------- int UniViewerFeeder::priority() { return d_ptr->priority(); } +// --------------------------------------------------------------------------- // UniViewerFeeder::subject // @see header file -// +// --------------------------------------------------------------------------- QString UniViewerFeeder::subject() { return d_ptr->subject(); } +// --------------------------------------------------------------------------- +// UniViewerFeeder::sendingState +// @see header file +// --------------------------------------------------------------------------- int UniViewerFeeder::sendingState() { - - return d_ptr->sendingState(); + return d_ptr->sendingState(); } // EOF diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -247,14 +247,24 @@ (alias.isEmpty()) ? mHeaderGroupBox->setHeading(from) : mHeaderGroupBox->setHeading(alias); } else { - QString toAddrList = createAddressList(mViewFeeder->toAddressList()); - QString ccAddrList = createAddressList(mViewFeeder->ccAddressList()); - - if (!ccAddrList.isEmpty()) { - toAddrList.append(ADDR_LIST_SEPARATOR); - toAddrList.append(ccAddrList); + ConvergedMessageAddressList addrList; + QString headingStr; + if ((addrList = mViewFeeder->toAddressList()).count()) { + headingStr.append(createAddressList(addrList)); } - mHeaderGroupBox->setHeading(toAddrList); + if ((addrList = mViewFeeder->ccAddressList()).count()) { + if (!headingStr.isEmpty()) { + headingStr.append(ADDR_LIST_SEPARATOR); + } + headingStr.append(createAddressList(addrList)); + } + if ((addrList = mViewFeeder->bccAddressList()).count()) { + if (!headingStr.isEmpty()) { + headingStr.append(ADDR_LIST_SEPARATOR); + } + headingStr.append(createAddressList(addrList)); + } + mHeaderGroupBox->setHeading(headingStr); } } diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univiewerpixmapwidget.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -32,7 +32,7 @@ // LOCAL CONSTANTS #define LOC_OPEN hbTrId("txt_common_menu_open") -#define LOC_SAVE hbTrId("txt_common_menu_save") + static const char PIXMAP_ICON[] = "qtg_small_image"; static const char CORRUPTED_PIXMAP_ICON[] = "qtg_large_corrupted"; @@ -170,13 +170,7 @@ QTimer::singleShot(300,this,SLOT(regrabGesture())); } -//--------------------------------------------------------------- -// UniViewerPixmapWidget::handleSave -// @see header file -//--------------------------------------------------------------- -void UniViewerPixmapWidget::handleSave() -{ -} + //--------------------------------------------------------------- // UniViewerPixmapWidget::regrabGesture @@ -244,7 +238,7 @@ HbMenu* menu = new HbMenu; menu->setAttribute(Qt::WA_DeleteOnClose); menu->addAction(LOC_OPEN, this, SLOT(handleOpen())); - menu->addAction(LOC_SAVE, this, SLOT(handleSave())); + menu->setPreferredPos(position); menu->show(); } diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgui/unifiedviewer/src/univiewertextitem.cpp --- a/messagingapp/msgui/unifiedviewer/src/univiewertextitem.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgui/unifiedviewer/src/univiewertextitem.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -493,8 +493,11 @@ if(action) { + //service stuff. + QString service("phonebookservices"); + QString interface; + QString operation; QList args; - QString operation; QString data = action->data().toString(); @@ -510,16 +513,16 @@ if(contactId > 0) { //open contact card - operation = QString("open(int)"); + interface = QString("com.nokia.symbian.IContactsView"); + operation = QString("openContactCard(int)"); args << contactId; } else { //save to contacts with phone number field prefilled. - + interface = QString("com.nokia.symbian.IContactsEdit"); operation = QString("editCreateNew(QString,QString)"); QString type = QContactPhoneNumber::DefinitionName; - args << type; args << data; } @@ -536,28 +539,23 @@ if(contactId > 0) { //open contact card - operation = QString("open(int)"); + interface = QString("com.nokia.symbian.IContactsView"); + operation = QString("openContactCard(int)"); args << contactId; } else { //save to contacts with e-mail field prefilled. - - operation = QString("editCreateNew(QString,QString)"); - + interface = QString("com.nokia.symbian.IContactsEdit"); + operation = QString("editCreateNew(QString,QString)"); QString type = QContactEmailAddress::DefinitionName; - args << type; args << data; } - } - - //service stuff. - QString serviceName("com.nokia.services.phonebookservices"); - + } XQAiwRequest* request; XQApplicationManager appManager; - request = appManager.create(serviceName, "Fetch", operation, true); // embedded + request = appManager.create(service, interface, operation, true); // embedded if ( request == NULL ) { return; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/convergedmessageutils/tsrc/testconvergedmessageutilsapp/mmstestbed/mmstestbed.pro --- a/messagingapp/msgutils/convergedmessageutils/tsrc/testconvergedmessageutilsapp/mmstestbed/mmstestbed.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgutils/convergedmessageutils/tsrc/testconvergedmessageutilsapp/mmstestbed/mmstestbed.pro Tue Sep 07 13:28:39 2010 +0530 @@ -11,29 +11,36 @@ # # Contributors: # -# Description: Project Definiton File for mmstestbed +# Description: # -QT += testlib +#QT += testlib QT -= gui -CONFIG += hb -CONFIG += symbian_test -CONFIG += qtestlib - TEMPLATE = lib +CONFIG += hb +#CONFIG += qtestlib +CONFIG += symbian_test TARGET = mmstestbed INCLUDEPATH += . INCLUDEPATH += inc INCLUDEPATH += ../../../inc + INCLUDEPATH += ../../../../../../mmsengine/inc +INCLUDEPATH += ../../../../../../mmsengine/mmsserver/inc +INCLUDEPATH += ../../../../../../mmsengine/mmsmessage/inc INCLUDEPATH += ../../../../../../mmsengine/mmscodec/inc -INCLUDEPATH += ../../../../../../mmsengine/mmshttptransport/inc -INCLUDEPATH += ../../../../../../mmsengine/mmsmessage/inc -INCLUDEPATH += ../../../../../../mmsengine/mmsconninit/inc -INCLUDEPATH += ../../../../../../mmsengine/mmsserver/inc +INCLUDEPATH += ../../../../../../inc +INCLUDEPATH += ../../../../../../mmsengine/mmsengine/inc +INCLUDEPATH += ../../../../../../../../mmsengine/inc +INCLUDEPATH += ../../../../../../../../mmsengine/mmscodec/inc +INCLUDEPATH += ../../../../../../../../mmsengine/mmshttptransport/inc +INCLUDEPATH += ../../../../../../../../mmsengine/mmsmessage/inc +INCLUDEPATH += ../../../../../../../../mmsengine/mmsconninit/inc +#INCLUDEPATH += ../../../../mmsengine/mmscodec/inc +INCLUDEPATH += ../../../../../../../../mmsengine/mmsserver/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += BUILD_MMSTESTBED_DLL @@ -51,23 +58,23 @@ SYMBIAN_PLATFORMS = WINSCW ARMV5 +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE eabi/mmstestbedu.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE bwins/mmstestbedu.def" \ + "$${LITERAL_HASH}endif" + + symbian { TARGET.UID3 = 0xE5c588a1 TARGET.CAPABILITY = CAP_GENERAL_DLL TARGET.EPOCSTACKSIZE = 0x8000 TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 - TARGET.EPOCALLOWDLLDATA = 1 + TARGET.EPOCALLOWDLLDATA = 1 VENDORID = VID_DEFAULT } -#Def File rules -defBlock = \ -"$${LITERAL_HASH}if defined(EABI)" \ -"DEFFILE eabi/mmstestbedu.def" \ -"$${LITERAL_HASH}else" \ -"DEFFILE bwins/mmstestbedu.def" \ -"$${LITERAL_HASH}endif" - # Build.inf rules BLD_INF_RULES.prj_exports += \ "$${LITERAL_HASH}include " diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/convergedmessageutils/tsrc/testconvergedmessageutilsapp/testconvergedmessageutils/testconvergedmessageutils.pro --- a/messagingapp/msgutils/convergedmessageutils/tsrc/testconvergedmessageutilsapp/testconvergedmessageutils/testconvergedmessageutils.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgutils/convergedmessageutils/tsrc/testconvergedmessageutilsapp/testconvergedmessageutils/testconvergedmessageutils.pro Tue Sep 07 13:28:39 2010 +0530 @@ -52,7 +52,8 @@ SYMBIAN_PLATFORMS = WINSCW ARMV5 symbian { TARGET.UID3 = 0xE39cd515 - TARGET.CAPABILITY = All -TCB -DRM +# TARGET.CAPABILITY = All -TCB -DRM + TARGET.CAPABILITY = CAP_APPLICATION TARGET.EPOCSTACKSIZE = 0x8000 TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 VENDORID = VID_DEFAULT diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/data/SmileyFace.gif Binary file messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/data/SmileyFace.gif has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/data/sample.txt diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/inc/testunidatamodelloader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/inc/testunidatamodelloader.h Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,110 @@ +/* + * 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 TEST_UNI_DATA_MODEL_LOADER_H +#define TEST_UNI_DATA_MODEL_LOADER_H + +#ifdef BUILD_TEST_DLL +#define TEST_EXPORT Q_DECL_EXPORT +#else +#define TEST_EXPORT Q_DECL_IMPORT +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include + +const TInt32 KUidBIOVCalenderMsg = {0x10005533}; // VCalender diary + +class UniDataModelPluginInterface; +class UniDataModelLoader; +class MsgObserver; +class S60QConversions; +class ConvergedMessage; +class CBIODatabase; +class ConvergedMessgageAddress; +class UniEditorPluginInterface; + +typedef enum + { // GENERATE A MESSAGE USING.... + ENoMessage, // .. error cases + EBioIapSettingsMessage, // .. IAP grammar, includes Internet settings + // Email settings, and logon scripts, + EBioEnpMessage, // .. Email Notification grammar. + EBioRingTonesMessage, // .. Ringing Tones binary data + EBioOpLogoMessage, // .. Logo for Operator service + EBioCompBusCardMessage, // .. Compact Business Card data + EBiovCardMessage, // .. virtual business card data + EBiovCalenderMessage, // .. vCalender data + EBioWAPSettingsMessage, // .. wap settings + EBioWPRVSettingsMessage // .. wprv settings + } TBIOMessageType; + + +class TEST_EXPORT TestUniDataModelLoader: public QObject +{ +Q_OBJECT + +private slots: + //called by frame work. + void initTestCase();//called before the first testfunction is executed. + void init();//called before each testfunction is executed. + + //test cases. + void testBioMessage(); + void testMMSMessage(); + void testSMSMessage(); + + void cleanup();//called after every testfunction. + void cleanupTestCase();//called after the last testfunction was executed. + +private: + + UniDataModelPluginInterface* pluginInterface; + MsgObserver* iObserver; + CMsvSession* iMSession; + CClientMtmRegistry* iMtmReg; + TMsvId messageId; + UniDataModelLoader* pluginLoader; + QDateTime retTimeStamp; + RFs iFs; + CMsvEntry* iMsvEntry; + CBIODatabase* iBioDb; + TMsvId newEntryId; + HBufC* tempNumber; + TBufC currentFile; + TBool inbox; + +}; + +class MsgObserver : public MMsvSessionObserver +{ +public: + void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, + TAny* aArg3); +}; + +#endif //TEST_UNI_DATA_MODEL_LOADER_H diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/inc/testunidatamodelloader.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/inc/testunidatamodelloader.ini Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,15 @@ +//this file is used to provide predefined set of input data. + +//eg. +const char TEST_MSG_RECIEPIENT[] = "Shweta Singh<77>"; +const char TEST_MSG_FROM1[] = "88"; +const char TEST_MSG_ALIAS1[] = "Shweta Singh"; +const char TEST_MSG_FROM2[] = "999"; +const char TEST_MSG_SUBJECT[] = "Hi"; +const char TEST_MSG_BODY[] = "Hello"; +const char TEST_SERVICE_NAME_MMS[] = "messaging.mserver.testservice.MMS"; +const char TEST_SENDER[] = "+918888"; +const char TEST_ATTACHMENT4[] = "c:\\data\\SmileyFace.gif"; +const char TEST_ATTACHMENT5[] = "c:\\data\\sample.txt"; +const char TEST_CC[] = "DummyCCAddress"; +const char TEST_BCC[] = "DummyBCCAddress"; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/src/testunidatamodelloader.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/src/testunidatamodelloader.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "convergedmessageaddress.h" + +#include "testunidatamodelloader.h" +#include +#include "testunidatamodelloader.ini" +#include "unidatamodelplugininterface.h" +#include +#include + +const TInt KTelephoneNumberMaxLength = 32; + +// vCalender +_LIT(KUnixEpoch, "19700000:000000.000000"); +#define KBioUidValue 0x10001262 + +const TUid KBioUidValueUid = {KBioUidValue}; + + +//--------------------------------------------------------------- +//Main entry point +//--------------------------------------------------------------- +int main(int argc, char *argv[]) + { + int ret = -1; + QCoreApplication app(argc, argv); + QObject* tc = new TestUniDataModelLoader(); + +#ifdef __WINSCW__ + char *new_argv[3]; + QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; + QByteArray bytes = str.toAscii(); + char arg1[] = "-o"; + new_argv[0] = argv[0]; + new_argv[1] = arg1; + new_argv[2] = bytes.data(); + ret = QTest::qExec(tc, 3, new_argv); +#else + ret = QTest::qExec(tc, argc, argv); +#endif + delete tc; + return ret; + + } + +//--------------------------------------------------------------- +// TestUniDataModelLoader::init +//--------------------------------------------------------------- +void TestUniDataModelLoader::initTestCase() +{ + iObserver = new (ELeave) MsgObserver(); + + // Create a new messaging server session.. + iMSession = CMsvSession::OpenSyncL(*iObserver); + + iMsvEntry = iMSession->GetEntryL(KMsvRootIndexEntryId); + newEntryId = 0; + pluginLoader = new UniDataModelLoader(); + + retTimeStamp = QDateTime::currentDateTime(); + int err = iFs.Connect(); + QVERIFY(err == 0); + iBioDb = CBIODatabase::NewL(iFs); + iFs.SetSessionPath(_L("c:\\")); + inbox = EFalse; +} + +//--------------------------------------------------------------- +// TestUniDataModelLoader::init +//--------------------------------------------------------------- +void TestUniDataModelLoader::init() +{ + +} + +//--------------------------------------------------------------- +// TestUniDataModelLoader::testBioMessage +//--------------------------------------------------------------- +void TestUniDataModelLoader::testBioMessage() +{ + inbox = ETrue; + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::BioMsg); + + QVERIFY( pluginInterface != NULL ); + + QString msgType = pluginInterface->messageType(); + + qDebug() <<"msgType" << msgType; + QCOMPARE(msgType, QString("biomessage")); + + qDebug() <<"UnidataModel Loader for Biomessage Created Successfully"; +} + +//--------------------------------------------------------------- +// TestUniDataModelLoader::testMMSMessage +//--------------------------------------------------------------- +void TestUniDataModelLoader::testMMSMessage() +{ + qRegisterMetaType ("long int"); + QString service = TEST_SERVICE_NAME_MMS; + QString subject = TEST_MSG_SUBJECT; + qint64 timeStamp = QDateTime::currentDateTime().toTime_t(); + + QString sender(TEST_SENDER); + ConvergedMessageAddress address(sender); + ConvergedMessageAttachmentList attachmentList; + + QString attachment2Path = TEST_ATTACHMENT4; + ConvergedMessageAttachment* attachment2 = + new ConvergedMessageAttachment(attachment2Path, ConvergedMessageAttachment::EAttachment); + + QString attachmentPath = TEST_ATTACHMENT5; + ConvergedMessageAttachment* attachment = + new ConvergedMessageAttachment(attachmentPath, ConvergedMessageAttachment::EAttachment); + + attachmentList.append(attachment); + attachmentList.append(attachment2); + ConvergedMessage msg; + msg.setMessageType(ConvergedMessage::Mms); + msg.setSubject(subject); + msg.setTimeStamp(timeStamp); + msg.addToRecipient(address); + msg.addAttachments(attachmentList); + msg.setPriority(ConvergedMessage::Normal); + //Adding alias + ConvergedMessageAddress address1; + address1.setAlias(QString(TEST_MSG_RECIEPIENT)); + msg.addToRecipient(address1); + + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Mms); + pluginInterface->setMessageId(newEntryId); + + QVERIFY( pluginInterface != NULL ); + + QString msgType = pluginInterface->messageType(); + + qDebug() <<"msgType" << msgType; + QCOMPARE(msgType, QString("mms")); + + qDebug() <<"UnidataModel Loader for MMS Created Successfully"; +} + +//--------------------------------------------------------------- +// TestUniDataModelLoader::testSMSMessage +//--------------------------------------------------------------- +void TestUniDataModelLoader::testSMSMessage() +{ + qint64 timeStamp = QDateTime::currentDateTime().toTime_t(); + QString sender(TEST_SENDER); + ConvergedMessageAddress address(sender); + ConvergedMessage msg; + msg.setMessageType(ConvergedMessage::Sms); + msg.setTimeStamp(timeStamp); + msg.addToRecipient(address); + msg.setBodyText( TEST_MSG_BODY); + msg.setPriority(ConvergedMessage::Normal); + //Adding alias + ConvergedMessageAddress address1; + address1.setAlias(QString(TEST_MSG_RECIEPIENT)); + msg.addToRecipient(address1); + + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); + + QVERIFY( pluginInterface != NULL ); + + QString msgType = pluginInterface->messageType(); + + qDebug() <<"msgType" << msgType; + QCOMPARE(msgType, QString("sms")); + + qDebug() <<"UnidataModel Loader for SMS Created Successfully"; +} + +//--------------------------------------------------------------- +// TestUniDataModelLoader::cleanup +//--------------------------------------------------------------- +void TestUniDataModelLoader::cleanup() +{ + +} + +//--------------------------------------------------------------- +// TestUniDataModelLoader::cleanupTestCase +//--------------------------------------------------------------- +void TestUniDataModelLoader::cleanupTestCase() +{ + delete iMsvEntry; + iMsvEntry = NULL; + delete iObserver; + iObserver = NULL; + delete iMSession; + iMSession = NULL; + delete pluginLoader; +} + +//--------------------------------------------------------------- +// TestUniDataModelLoader::HandleSessionEventL +//--------------------------------------------------------------- +void MsgObserver::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, + TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) +{ +} diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/testunidatamodelloader.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/testunidatamodelloader.pro Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,100 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +QT += testlib +QT -= gui + +TEMPLATE = app +TARGET = testunidatamodelloader + +CONFIG += hb +CONFIG += symbian_test + + +INCLUDEPATH += inc +INCLUDEPATH += ../../../../../../inc +INCLUDEPATH += ../../../../../../../inc +INCLUDEPATH += ../../../../../../../../../../epoc32/include/platform/mw +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + +DEFINES += BUILD_TEST_DLL + +SOURCES += \ + src/testunidatamodelloader.cpp + + +# Input +HEADERS += \ + inc/testunidatamodelloader.h + + + +SYMBIAN_PLATFORMS = WINSCW ARMV5 + symbian { + TARGET.CAPABILITY = All -TCB -DRM + TARGET.EPOCSTACKSIZE = 0x8000 + TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 + VENDORID = VID_DEFAULT + BLD_INF_RULES.prj_exports += "data/SmileyFace.gif c:/data/SmileyFace.gif" + BLD_INF_RULES.prj_exports += "data/sample.txt c:/data/sample.txt" + } + + + +packageheader = "$${LITERAL_HASH}{\"QTestUnidataModelLoader\"},(0xEadfc3ef.),1,0,0,TYPE=SA" + +vendorinfo = \ + "; Localised Vendor name" \ + "%{\"Nokia\"}" \ + "; Unique Vendor name" \ + ":\"Nokia\"" + +dependencyinfo = \ + "; Default HW/platform dependencies" \ + "[0x101F7961],0,0,0,{\"S60ProductID\"}" \ + "[0x2001E61C],4,6,3,{"Qt"} + +default_deployment.pkg_prerules = packageheader \ + vendorinfo \ + dependencyinfo + + + LIBS += -leuser \ + -lconvergedmessageutils\ + -lmsgs \ + -lsmcm \ + -lgsmu \ + -letext \ + -lmsgs \ + -lunidatamodelloader\ + -lQtCore \ + -lbioc \ + -lefsrv \ + -lbiodb \ + -lxqutils \ + -lbifu + +#Copy the dependent DLL +symbian: { + addP1.sources = ./data/SmileyFace.gif + addP1.path = C:/data/ + DEPLOYMENT += addP1 + + addP2.sources = ./data/sample.txt + addP2.path = C:/data/ + DEPLOYMENT += addP2 + } + \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/tsrc.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/tsrc.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/tsrc.pro Tue Sep 07 13:28:39 2010 +0530 @@ -19,7 +19,7 @@ CONFIG += symbian_test #Sub .pro files -SUBDIRS += unittest_unidatamodelloader +SUBDIRS += testunidatamodelloader # Platforms SYMBIAN_PLATFORMS = DEFAULT \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/data/SmileyFace.gif Binary file messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/data/SmileyFace.gif has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/data/sample.txt diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/data/testunidatamodelloader.cfg --- a/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/data/testunidatamodelloader.cfg Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -TestUniDataModelLoader diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/inc/testunidatamodelloader.h --- a/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/inc/testunidatamodelloader.h Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - */ - -#ifndef TEST_UNI_DATA_MODEL_LOADER_H -#define TEST_UNI_DATA_MODEL_LOADER_H - -#ifdef BUILD_TEST_DLL -#define TEST_EXPORT Q_DECL_EXPORT -#else -#define TEST_EXPORT Q_DECL_IMPORT -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include - -const TInt32 KUidBIOVCalenderMsg = {0x10005533}; // VCalender diary - -class UniDataModelPluginInterface; -class UniDataModelLoader; -class MsgObserver; -class S60QConversions; -class ConvergedMessage; -class CBIODatabase; -class ConvergedMessgageAddress; -class UniEditorPluginInterface; - -typedef enum - { // GENERATE A MESSAGE USING.... - ENoMessage, // .. error cases - EBioIapSettingsMessage, // .. IAP grammar, includes Internet settings - // Email settings, and logon scripts, - EBioEnpMessage, // .. Email Notification grammar. - EBioRingTonesMessage, // .. Ringing Tones binary data - EBioOpLogoMessage, // .. Logo for Operator service - EBioCompBusCardMessage, // .. Compact Business Card data - EBiovCardMessage, // .. virtual business card data - EBiovCalenderMessage, // .. vCalender data - EBioWAPSettingsMessage, // .. wap settings - EBioWPRVSettingsMessage // .. wprv settings - } TBIOMessageType; - - -class TEST_EXPORT TestUniDataModelLoader: public QObject -{ -Q_OBJECT - -private slots: - //called by frame work. - void initTestCase();//called before the first testfunction is executed. - void init();//called before each testfunction is executed. - - //test cases. - void testBioMessage(); - - void testMMSMessage(); - void testSMSMessage(); - - void cleanup();//called after every testfunction. - void cleanupTestCase();//called after the last testfunction was executed. - -private: - - UniDataModelPluginInterface* pluginInterface; - MsgObserver* iObserver; - CMsvSession* iMSession; - CClientMtmRegistry* iMtmReg; - TMsvId messageId; - UniDataModelLoader* pluginLoader; - QDateTime retTimeStamp; - RFs iFs; - CMsvEntry* iMsvEntry; - CBIODatabase* iBioDb; - TMsvId newEntryId; - HBufC* tempNumber; - TBufC currentFile; - TBool inbox; - -}; - -class MsgObserver : public MMsvSessionObserver -{ -public: - void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, - TAny* aArg3); -}; - -#endif //TEST_UNI_DATA_MODEL_LOADER_H diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/inc/testunidatamodelloader.ini --- a/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/inc/testunidatamodelloader.ini Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -//this file is used to provide predefined set of input data. - -//eg. -const char TEST_MSG_RECIEPIENT[] = "Shweta Singh<77>"; -const char TEST_MSG_FROM1[] = "88"; -const char TEST_MSG_ALIAS1[] = "Shweta Singh"; -const char TEST_MSG_FROM2[] = "999"; -const char TEST_MSG_SUBJECT[] = "Hi"; -const char TEST_MSG_BODY[] = "Hello"; -const char TEST_SERVICE_NAME_MMS[] = "messaging.mserver.testservice.MMS"; -const char TEST_SENDER[] = "+918888"; -const char TEST_ATTACHMENT4[] = "c:\\SmileyFace.gif"; -const char TEST_ATTACHMENT5[] = "c:\\sample.txt"; -const char TEST_CC[] = "DummyCCAddress"; -const char TEST_BCC[] = "DummyBCCAddress"; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/src/testunidatamodelloader.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/src/testunidatamodelloader.cpp Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,244 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "convergedmessageaddress.h" - -#include "testunidatamodelloader.h" -#include -#include "testunidatamodelloader.ini" -#include "unidatamodelplugininterface.h" -#include -#include - -const TInt KTelephoneNumberMaxLength = 32; - -// vCalender -_LIT(KUnixEpoch, "19700000:000000.000000"); -#define KBioUidValue 0x10001262 - -const TUid KBioUidValueUid = {KBioUidValue}; - - -//--------------------------------------------------------------- -//Main entry point -//--------------------------------------------------------------- -int main(int argc, char *argv[]) - { - int ret = -1; - QCoreApplication app(argc, argv); - QObject* tc = new TestUniDataModelLoader(); - -#ifdef __WINSCW__ - char *new_argv[3]; - QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; - QByteArray bytes = str.toAscii(); - char arg1[] = "-o"; - new_argv[0] = argv[0]; - new_argv[1] = arg1; - new_argv[2] = bytes.data(); - ret = QTest::qExec(tc, 3, new_argv); -#else - ret = QTest::qExec(tc, argc, argv); -#endif - delete tc; - return ret; - - } -//--------------------------------------------------------------- -// TestUniDataModelLoader::init -//--------------------------------------------------------------- - - -void TestUniDataModelLoader::initTestCase() -{ - iObserver = new (ELeave) MsgObserver(); - - // Create a new messaging server session.. - iMSession = CMsvSession::OpenSyncL(*iObserver); - - iMsvEntry = iMSession->GetEntryL(KMsvRootIndexEntryId); - newEntryId = 0; - pluginLoader = new UniDataModelLoader(); - - retTimeStamp = QDateTime::currentDateTime(); - int err = iFs.Connect(); - QVERIFY(err == 0); - iBioDb = CBIODatabase::NewL(iFs); - iFs.SetSessionPath(_L("c:\\")); - inbox = EFalse; -} - -//--------------------------------------------------------------- -// TestUniDataModelLoader::cleanupTestCase -//--------------------------------------------------------------- - -void TestUniDataModelLoader::cleanupTestCase() -{ - delete iMsvEntry; - iMsvEntry = NULL; - delete iObserver; - iObserver = NULL; - delete iMSession; - iMSession = NULL; - delete pluginLoader; -} - - -//--------------------------------------------------------------- -// TestUniDataModelLoader::init -//--------------------------------------------------------------- - -void TestUniDataModelLoader::init() -{ - -} - -//--------------------------------------------------------------- -// TestUniDataModelLoader::cleanup -//--------------------------------------------------------------- -void TestUniDataModelLoader::cleanup() -{ - - -} - -//--------------------------------------------------------------- -// TestUniDataModelLoader::testSMSMessage -//--------------------------------------------------------------- - -void TestUniDataModelLoader::testSMSMessage() -{ - QString subject = TEST_MSG_SUBJECT; - qint64 timeStamp = QDateTime::currentDateTime().toTime_t(); - QString sender(TEST_SENDER); - ConvergedMessageAddress address(sender); - ConvergedMessage msg; - msg.setMessageType(ConvergedMessage::Sms); - msg.setSubject(subject); - msg.setTimeStamp(timeStamp); - msg.addToRecipient(address); - msg.setBodyText( TEST_MSG_BODY); - msg.setPriority(ConvergedMessage::Normal); - //Adding alias - ConvergedMessageAddress address1; - address1.setAlias(QString(TEST_MSG_RECIEPIENT)); - msg.addToRecipient(address1); - - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); - - QVERIFY( pluginInterface != NULL ); - - QString msgType = pluginInterface->messageType(); - - qDebug() <<"msgType" << msgType; - QCOMPARE(msgType, QString("sms")); - - qDebug() <<"UnidataModel Loader for SMS Created Successfully"; - -} - - -//--------------------------------------------------------------- -// TestUniDataModelLoader::testMMSMessage -//--------------------------------------------------------------- - -void TestUniDataModelLoader::testMMSMessage() -{ - qRegisterMetaType ("long int"); - QString service = TEST_SERVICE_NAME_MMS; - QString subject = TEST_MSG_SUBJECT; - qint64 timeStamp = QDateTime::currentDateTime().toTime_t(); - - QString sender(TEST_SENDER); - ConvergedMessageAddress address(sender); - ConvergedMessageAttachmentList attachmentList; - - QString attachment2Path = TEST_ATTACHMENT4; - ConvergedMessageAttachment* attachment2 = - new ConvergedMessageAttachment(attachment2Path, ConvergedMessageAttachment::EAttachment); - - QString attachmentPath = TEST_ATTACHMENT5; - ConvergedMessageAttachment* attachment = - new ConvergedMessageAttachment(attachmentPath, ConvergedMessageAttachment::EAttachment); - - attachmentList.append(attachment); - attachmentList.append(attachment2); - ConvergedMessage msg; - msg.setMessageType(ConvergedMessage::Mms); - msg.setSubject(subject); - msg.setTimeStamp(timeStamp); - msg.addToRecipient(address); - msg.addAttachments(attachmentList); - msg.setPriority(ConvergedMessage::Normal); - //Adding alias - ConvergedMessageAddress address1; - address1.setAlias(QString(TEST_MSG_RECIEPIENT)); - msg.addToRecipient(address1); - - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Mms); - pluginInterface->setMessageId(newEntryId); - - QVERIFY( pluginInterface != NULL ); - - QString msgType = pluginInterface->messageType(); - - qDebug() <<"msgType" << msgType; - QCOMPARE(msgType, QString("mms")); - - qDebug() <<"UnidataModel Loader for MMS Created Successfully"; - int count = pluginInterface->attachmentCount(); - QVERIFY(count == 1); - -} - -//--------------------------------------------------------------- -// TestUniDataModelLoader::testBioMessage -//--------------------------------------------------------------- - -void TestUniDataModelLoader::testBioMessage() -{ - inbox = ETrue; - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::BioMsg); - - QVERIFY( pluginInterface != NULL ); - - QString msgType = pluginInterface->messageType(); - - qDebug() <<"msgType" << msgType; - QCOMPARE(msgType, QString("biomessage")); - - qDebug() <<"UnidataModel Loader for Biomessage Created Successfully"; - - -} - - -//--------------------------------------------------------------- -// TestUniDataModelLoader::HandleSessionEventL -//--------------------------------------------------------------- - -void MsgObserver::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, - TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) -{ -} diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/testunidatamodelloader.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/unittest_unidatamodelloader/testunidatamodelloader.pro Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -QT += testlib -QT -= gui - -TEMPLATE = app -TARGET = testunidatamodelloader - -CONFIG += hb -CONFIG += symbian_test - - -INCLUDEPATH += inc -INCLUDEPATH += ../../../../../../inc -INCLUDEPATH += ../../../../../../../inc -INCLUDEPATH += ../../../../../../../../../../epoc32/include/platform/mw -INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - -DEFINES += BUILD_TEST_DLL - -SOURCES += \ - src/testunidatamodelloader.cpp - - -# Input -HEADERS += \ - inc/testunidatamodelloader.h - - - -SYMBIAN_PLATFORMS = WINSCW ARMV5 - symbian { - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.EPOCSTACKSIZE = 0x8000 - TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 - TARGET.EPOCALLOWDLLDATA = 1 - BLD_INF_RULES.prj_exports += "testunidatamodelloader.cfg c:/testunidatamodelloader.cfg" - BLD_INF_RULES.prj_exports += "data/SmileyFace.gif c:/SmileyFace.gif" - BLD_INF_RULES.prj_exports += "data/sample.txt c:/sample.txt" - } - - - -packageheader = "$${LITERAL_HASH}{\"QTestUnidataModelLoader\"},(0xEadfc3ef.),1,0,0,TYPE=SA" - -vendorinfo = \ - "; Localised Vendor name" \ - "%{\"Nokia\"}" \ - "; Unique Vendor name" \ - ":\"Nokia\"" - -dependencyinfo = \ - "; Default HW/platform dependencies" \ - "[0x101F7961],0,0,0,{\"S60ProductID\"}" \ - "[0x2001E61C],4,6,3,{"Qt"} - -default_deployment.pkg_prerules = packageheader \ - vendorinfo \ - dependencyinfo - - - LIBS += -leuser \ - -lconvergedmessageutils\ - -lmsgs \ - -lsmcm \ - -lgsmu \ - -letext \ - -lmsgs \ - -lunidatamodelloader\ - -lQtCore \ - -lbioc \ - -lefsrv \ - -lbiodb \ - -lxqutils \ - -lbifu - -#Copy the dependent DLL -symbian: { - addCfg.sources = ./data/testunidatamodelloader.cfg - addCfg.path = C:/ - DEPLOYMENT += addCfg - - addP2.sources = ./data/SmileyFace.gif - addP2.path = C:/ - DEPLOYMENT += addP2 - - addP3.sources = ./data/sample.txt - addP3.path = C:/ - DEPLOYMENT += addP3 - - } - diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/inc/testunidatamodelsmsplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/inc/testunidatamodelsmsplugin.h Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,87 @@ +/* + * 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 TEST_UNI_DATA_MODEL_SMS_PLUGIN_H +#define TEST_UNI_DATA_MODEL_SMS_PLUGIN_H + +#ifdef BUILD_TEST_DLL +#define TEST_EXPORT Q_DECL_EXPORT +#else +#define TEST_EXPORT Q_DECL_IMPORT +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class UniDataModelPluginInterface; +class UniDataModelLoader; +class TestObserver; + +class ConvergedMessage; + +class TEST_EXPORT TestUniDataModelSMSPlugin : public QObject +{ +Q_OBJECT + +private slots: + //called by frame work. + // void initTestCase();//called before the first testfunction is executed. + // void cleanupTestCase();//called after the last testfunction was executed. + void init();//called before each testfunction is executed. + void cleanup();//called after every testfunction. + + //test cases. + + void testInboxMessage(); + void testOutboxMessage(); + void testDraftsMessage(); + void testDraftsMessageNoRecipient(); + void testUnusedAPIs(); + +private: + void createInboxSMS(); + void createOutboxSMS(); + void createDraftsSMS(); + void createDraftsSMSNoRecipient(); + void testGetPluginWithoutLoading(); + + +private: + UniDataModelPluginInterface* pluginInterface; + TestObserver* iObserver; + CMsvSession* iMSession; + CClientMtmRegistry* iMtmReg; + CSmsClientMtm* iSmsClientMtm; + TMsvId messageId; + UniDataModelLoader* pluginLoader; + QDateTime retTimeStamp ; +}; + +class TestObserver : public MMsvSessionObserver +{ +public: + void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, + TAny* aArg3); +}; + +#endif //TEST_UNI_DATA_MODEL_SMS_PLUGIN_H diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/inc/testunidatamodelsmsplugin.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/inc/testunidatamodelsmsplugin.ini Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,10 @@ +//this file is used to provide predefined set of input data. + +//eg. +const char TEST_MSG_BODY[] = "Hi Phone Owner"; +const char TEST_MSG_RECIEPIENT[] = "9222"; +const char TEST_MSG_FROM1[] = "911"; +const char TEST_MSG_ALIAS1[] = "ABC"; +const char TEST_MSG_FROM2[] = "9797979797"; +const char TEST_MSG_ALIAS2[] = "XYZ"; +const char TEST_MSG_SUBJECT[] = "Message Subject"; diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/src/testunidatamodelsmsplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/src/testunidatamodelsmsplugin.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,602 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + */ +#include +#include +#include +#include +#include +#include + +#include "convergedmessage.h" +#include "unidatamodelplugininterface.h" +#include "unidatamodelloader.h" +#include "testunidatamodelsmsplugin.h" +#include "testunidatamodelsmsplugin.ini" +_LIT(KUnixEpoch, "19700000:000000.000000"); + + +//main entry point +int main(int argc, char *argv[]) + { + int ret = -1; + QCoreApplication app(argc, argv); + QObject* tc = new TestUniDataModelSMSPlugin(); + +#ifdef __WINSCW__ + char *new_argv[3]; + QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; + QByteArray bytes = str.toAscii(); + char arg1[] = "-o"; + new_argv[0] = argv[0]; + new_argv[1] = arg1; + new_argv[2] = bytes.data(); + ret = QTest::qExec(tc, 3, new_argv); +#else + ret = QTest::qExec(tc, argc, argv); +#endif + + delete tc; + return ret; + + } + + + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::init +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::init() +{ + iObserver = new (ELeave) TestObserver(); + + // Create a new messaging server session.. + iMSession = CMsvSession::OpenSyncL(*iObserver); + // Create the client mtm registry + iMtmReg = CClientMtmRegistry::NewL(*iMSession); + + // Get the SMS clientmtm + iSmsClientMtm = static_cast (iMtmReg->NewMtmL(KUidMsgTypeSMS)); + + TRAPD(err, iSmsClientMtm->DefaultServiceL()) ; + + if( err == KErrNotFound) + { + CSmsAccount* account = CSmsAccount::NewL(); + CleanupStack::PushL(account); + CSmsSettings* settings = CSmsSettings::NewL(); + CleanupStack::PushL(settings); + account->InitialiseDefaultSettingsL(*settings); + CleanupStack::PopAndDestroy(2); + } + messageId = 0; + pluginLoader = new UniDataModelLoader(); + retTimeStamp = QDateTime::currentDateTime(); +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::cleanup +//--------------------------------------------------------------- +void TestUniDataModelSMSPlugin::cleanup() +{ + + if (messageId > 0) + iSmsClientMtm->Entry().DeleteL(messageId); + + delete iObserver; + iObserver = NULL; + + delete iSmsClientMtm; + iSmsClientMtm = NULL; + + delete iMtmReg; + iMtmReg = NULL; + + delete iMSession; + iMSession = NULL; + + delete pluginLoader; +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::validateMsg +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::createInboxSMS() +{ + TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvGlobalInBoxIndexEntryId)); + + // Create a SMS message + iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); + TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); + + indexEntry.SetInPreparation(ETrue); + indexEntry.iMtm = KUidMsgTypeSMS; + indexEntry.iType = KUidMsvMessageEntry; + indexEntry.iServiceId = iSmsClientMtm->ServiceId(); + indexEntry.iDate.HomeTime(); + + // Convert TTime to QDateTime , this will be used for comparing the time of message + // when fetched from datamodel + TTime unixEpoch(KUnixEpoch); + TTimeIntervalSeconds seconds; + TTime timeStamp = indexEntry.iDate; + timeStamp.SecondsFrom(unixEpoch, seconds); + retTimeStamp.setTime_t(seconds.Int()); + + //AddBody + QString body(TEST_MSG_BODY); + + HBufC* bodyText = XQConversions::qStringToS60Desc(body); + if (bodyText) + { + CleanupStack::PushL(bodyText); + // Set the Body of the message + CRichText & body = iSmsClientMtm->Body(); + body.Reset(); + body.InsertL(0, *bodyText); + + TBuf<32> buf; + buf.Copy(bodyText->Left(32)); + indexEntry.iDescription.Set(buf); + + CleanupStack::PopAndDestroy(bodyText); + } + + QString recepient(TEST_MSG_FROM1); + QString recepient2(TEST_MSG_FROM2); + QString alias(TEST_MSG_ALIAS1); + + HBufC* addr = XQConversions::qStringToS60Desc(recepient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); + HBufC* alias1 = XQConversions::qStringToS60Desc(alias); + + if (addr) + { + CleanupStack::PushL(addr); + TBuf<32> name; + name.Copy(addr->Left(32)); + indexEntry.iDetails.Set(name); + CSmsHeader& smsHeader = iSmsClientMtm->SmsHeader(); + smsHeader.SetFromAddressL(*addr); + messageId = indexEntry.Id(); + + CleanupStack::PopAndDestroy(addr); + } + + indexEntry.SetAttachment(EFalse); + indexEntry.SetVisible(ETrue); + indexEntry.SetInPreparation(EFalse); + + indexEntry.SetComplete(ETrue); + iSmsClientMtm->Entry().ChangeL(indexEntry); + iSmsClientMtm->SaveMessageL(); + +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::createOutboxSMS +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::createOutboxSMS() +{ + TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId)); + + // Create a SMS message + iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); + TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); + + indexEntry.SetInPreparation(ETrue); + indexEntry.iMtm = KUidMsgTypeSMS; + indexEntry.iType = KUidMsvMessageEntry; + indexEntry.iServiceId = iSmsClientMtm->ServiceId(); + indexEntry.iDate.HomeTime(); + + // Convert TTime to QDateTime , this will be used for comparing the time of message + // when fetched from datamodel + TTime unixEpoch(KUnixEpoch); + TTimeIntervalSeconds seconds; + TTime timeStamp = indexEntry.iDate; + timeStamp.SecondsFrom(unixEpoch, seconds); + retTimeStamp.setTime_t(seconds.Int()); + + //AddBody + QString body(TEST_MSG_BODY); + + HBufC* bodyText = XQConversions::qStringToS60Desc(body); + if (bodyText) + { + CleanupStack::PushL(bodyText); + // Set the Body of the message + CRichText & body = iSmsClientMtm->Body(); + body.Reset(); + body.InsertL(0, *bodyText); + + TBuf<32> buf; + buf.Copy(bodyText->Left(32)); + indexEntry.iDescription.Set(buf); + + CleanupStack::PopAndDestroy(bodyText); + } + + QString recepient(TEST_MSG_FROM1); + QString recepient2(TEST_MSG_FROM2); + QString alias(TEST_MSG_ALIAS1); + + HBufC* addr = XQConversions::qStringToS60Desc(recepient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); + HBufC* alias1 = XQConversions::qStringToS60Desc(alias); + + if (addr) + { + CleanupStack::PushL(addr); + TBuf<32> name; + name.Copy(addr->Left(32)); + indexEntry.iDetails.Set(name); + + // If drafts/ outbox message , set the recipients + iSmsClientMtm->AddAddresseeL(*addr, TPtrC()); + iSmsClientMtm->AddAddresseeL(*addr2, *alias1); + indexEntry.SetSendingState(KMsvSendStateWaiting); + messageId = indexEntry.Id(); + CleanupStack::PopAndDestroy(addr); + } + + indexEntry.SetAttachment(EFalse); + indexEntry.SetVisible(ETrue); + indexEntry.SetInPreparation(EFalse); + + indexEntry.SetComplete(ETrue); + iSmsClientMtm->Entry().ChangeL(indexEntry); + iSmsClientMtm->SaveMessageL(); + +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::createDraftsSMS +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::createDraftsSMS() +{ + TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvDraftEntryId)); + // Create a SMS message + iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); + TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); + + indexEntry.SetInPreparation(ETrue); + indexEntry.iMtm = KUidMsgTypeSMS; + indexEntry.iType = KUidMsvMessageEntry; + indexEntry.iServiceId = iSmsClientMtm->ServiceId(); + indexEntry.iDate.HomeTime(); + + // Convert TTime to QDateTime , this will be used for comparing the time of message + // when fetched from datamodel + TTime unixEpoch(KUnixEpoch); + TTimeIntervalSeconds seconds; + TTime timeStamp = indexEntry.iDate; + timeStamp.SecondsFrom(unixEpoch, seconds); + retTimeStamp.setTime_t(seconds.Int()); + + //AddBody + QString body(TEST_MSG_BODY); + + HBufC* bodyText = XQConversions::qStringToS60Desc(body); + if (bodyText) + { + CleanupStack::PushL(bodyText); + // Set the Body of the message + CRichText & body = iSmsClientMtm->Body(); + body.Reset(); + body.InsertL(0, *bodyText); + + TBuf<32> buf; + buf.Copy(bodyText->Left(32)); + indexEntry.iDescription.Set(buf); + + CleanupStack::PopAndDestroy(bodyText); + } + + QString recipient(TEST_MSG_FROM1); + QString recipient2(TEST_MSG_FROM2); + QString alias(TEST_MSG_ALIAS1); + + HBufC* addr = XQConversions::qStringToS60Desc(recipient); + HBufC* addr2 = XQConversions::qStringToS60Desc(recipient2); + HBufC* alias1 = XQConversions::qStringToS60Desc(alias); + + if (addr) + { + CleanupStack::PushL(addr); + TBuf<32> name; + name.Copy(addr->Left(32)); + indexEntry.iDetails.Set(name); + + // If drafts/ outbox message , set the recipients + iSmsClientMtm->AddAddresseeL(*addr, TPtrC()); + indexEntry.SetSendingState(KMsvSendStateWaiting); + messageId = indexEntry.Id(); + + CleanupStack::PopAndDestroy(addr); + } + + indexEntry.SetAttachment(EFalse); + indexEntry.SetVisible(ETrue); + indexEntry.SetInPreparation(EFalse); + + indexEntry.SetComplete(ETrue); + iSmsClientMtm->Entry().ChangeL(indexEntry); + iSmsClientMtm->SaveMessageL(); + +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::createDraftsSMSNoRecipient +//--------------------------------------------------------------- +void TestUniDataModelSMSPlugin::createDraftsSMSNoRecipient() +{ + TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvDraftEntryId)); + // Create a SMS message + iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); + TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); + + indexEntry.SetInPreparation(ETrue); + indexEntry.iMtm = KUidMsgTypeSMS; + indexEntry.iType = KUidMsvMessageEntry; + indexEntry.iServiceId = iSmsClientMtm->ServiceId(); + indexEntry.iDate.HomeTime(); + + //AddBody + QString body(TEST_MSG_BODY); + + HBufC* bodyText = XQConversions::qStringToS60Desc(body); + if (bodyText) + { + CleanupStack::PushL(bodyText); + // Set the Body of the message + CRichText & body = iSmsClientMtm->Body(); + body.Reset(); + body.InsertL(0, *bodyText); + + TBuf<32> buf; + buf.Copy(bodyText->Left(32)); + indexEntry.iDescription.Set(buf); + + CleanupStack::PopAndDestroy(bodyText); + } + + indexEntry.SetSendingState(KMsvSendStateWaiting); + messageId = indexEntry.Id(); + + indexEntry.SetAttachment(EFalse); + indexEntry.SetVisible(ETrue); + indexEntry.SetInPreparation(EFalse); + + indexEntry.SetComplete(ETrue); + iSmsClientMtm->Entry().ChangeL(indexEntry); + iSmsClientMtm->SaveMessageL(); +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::testInboxMessage +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::testInboxMessage() +{ + createInboxSMS(); + + // Get the SMS data modelplugin + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); + + pluginInterface->setMessageId(messageId); + + int size = pluginInterface->messageSize(); + + QVERIFY(pluginInterface->timeStamp() == retTimeStamp); + + QString body; + pluginInterface->body(body); + QString origBody(TEST_MSG_BODY); + QVERIFY(origBody == body); + + ConvergedMessageAddressList recipientList; + pluginInterface->toRecipientList(recipientList); + + QString recipient(TEST_MSG_FROM1); + QString recipient2(TEST_MSG_FROM2); + QString origalias(TEST_MSG_ALIAS1); + + QVERIFY(recipientList.count() == 0); + + int size1 = pluginInterface->messageSize(); + + QString fromaddress; + pluginInterface->fromAddress(fromaddress); + QVERIFY(recipient == fromaddress); +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::testOutboxMessage +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::testOutboxMessage() +{ + createOutboxSMS(); + // Get the SMS data modelplugin + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); + + // Get the data for the first message in DRAFTS + pluginInterface->setMessageId(messageId); + int size = pluginInterface->messageSize(); + + QVERIFY(pluginInterface->timeStamp() == retTimeStamp); + + QString body; + pluginInterface->body(body); + QString origBody(TEST_MSG_BODY); + QVERIFY(origBody == body); + + ConvergedMessageAddressList recipientList; + pluginInterface->toRecipientList(recipientList); + + QString recipient(TEST_MSG_FROM1); + QString recipient2(TEST_MSG_FROM2); + QString origalias(TEST_MSG_ALIAS1); + + QVERIFY(recipientList.count() == 2); + QVERIFY(recipient == recipientList[0]->address() + && recipientList[0]->alias().isEmpty()); + + const QString& as = recipientList[1]->address(); + const QString& as1 = recipientList[1]->alias(); + QVERIFY(recipient2 == as); + + // ConvergedMessageAddress::alias return a QSting with a space + origalias.append(' '); + QVERIFY(origalias == as1); + + int size1 = pluginInterface->messageSize(); + + QString fromaddress; + pluginInterface->fromAddress(fromaddress); + QVERIFY(fromaddress.isEmpty()); +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::testDraftsMessage +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::testDraftsMessage() +{ + createDraftsSMS(); + // Get the SMS data modelplugin + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); + + // Get the data for the first message in DRAFTS + pluginInterface->setMessageId(messageId); + int size = pluginInterface->messageSize(); + + QVERIFY(pluginInterface->timeStamp() == retTimeStamp); + + QString body; + pluginInterface->body(body); + QString origBody(TEST_MSG_BODY); + QVERIFY(origBody == body); + + ConvergedMessageAddressList recipientList; + pluginInterface->toRecipientList(recipientList); + + QString recipient(TEST_MSG_FROM1); + + QVERIFY(recipientList.count() == 1); + QVERIFY(recipient == recipientList[0]->address() + && recipientList[0]->alias().isEmpty()); + + QString fromaddress; + pluginInterface->fromAddress(fromaddress); + QVERIFY(fromaddress.isEmpty()); +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::testDraftsMessageNoRecipient +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::testDraftsMessageNoRecipient() +{ + createDraftsSMSNoRecipient(); + // Get the SMS data modelplugin + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); + + // Get the data for the first message in DRAFTS + pluginInterface->setMessageId(messageId); + int size = pluginInterface->messageSize(); + + QString body; + pluginInterface->body(body); + QString origBody(TEST_MSG_BODY); + QVERIFY(origBody == body); + + ConvergedMessageAddressList recipientList; + pluginInterface->toRecipientList(recipientList); + + QVERIFY(recipientList.count() == 0); + + QString fromaddress; + pluginInterface->fromAddress(fromaddress); + QVERIFY(fromaddress.isEmpty()); +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::testGetPluginWithoutLoading +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::testGetPluginWithoutLoading() +{ + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); + QVERIFY(pluginInterface == NULL); + + // Try to geta plugin for a differnt message type + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Mms); + QVERIFY(pluginInterface == NULL); +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::testUnusedAPIs +//--------------------------------------------------------------- + +void TestUniDataModelSMSPlugin::testUnusedAPIs() +{ + pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); + + QVERIFY(pluginInterface->hasAttachment() == false); + + UniMessageInfoList attachmentlist = pluginInterface->attachmentList(); + QVERIFY(attachmentlist.isEmpty()); + + QVERIFY(pluginInterface->objectCount() == 0); + + UniMessageInfoList objectlist = pluginInterface->objectList(); + QVERIFY(objectlist.isEmpty()); + + QVERIFY(pluginInterface->slideCount() == 0); + + UniMessageInfoList slidelist = pluginInterface->slideContent(0); + QVERIFY(slidelist.isEmpty()); + + ConvergedMessageAddressList recipientList; + + pluginInterface->ccRecipientList(recipientList); + QVERIFY(recipientList.count() == 0); + + pluginInterface->bccRecipientList(recipientList); + QVERIFY(recipientList.count() == 0); + + MsgPriority priority = pluginInterface->messagePriority(); + // Normal priority + qDebug() << "prority" << priority; + QVERIFY(priority == 1); + int count = pluginInterface->attachmentCount(); + QVERIFY(count == 0); + +} + +//--------------------------------------------------------------- +// TestUniDataModelSMSPlugin::HandleSessionEventL +//--------------------------------------------------------------- + +void TestObserver::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, + TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) +{ +} diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.pro Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,92 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +QT += testlib +QT -= gui + +TEMPLATE = app +TARGET = test-unidatamodel-sms-plugin + + +CONFIG += hb +CONFIG += symbian_test + +INCLUDEPATH += inc +INCLUDEPATH += ../../../../../../inc +INCLUDEPATH += ../../../../../../../inc +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + +DEFINES += BUILD_TEST_DLL + +SOURCES += \ + src/testunidatamodelsmsplugin.cpp + + + +# Input +HEADERS += \ + inc/testunidatamodelsmsplugin.h + + + +SYMBIAN_PLATFORMS = WINSCW ARMV5 + symbian { + TARGET.CAPABILITY = All -TCB -DRM + TARGET.EPOCSTACKSIZE = 0x8000 + TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 + VENDORID = VID_DEFAULT + } + +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE ../eabi/test_unidatamodel_sms_plugin.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/test_unidatamodel_sms_plugin.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + + +packageheader = "$${LITERAL_HASH}{\"QTestLibCVsClientServerTest\"},(0xEa1ebe60),1,0,0,TYPE=SA" + +vendorinfo = \ + "; Localised Vendor name" \ + "%{\"Nokia\"}" \ + "; Unique Vendor name" \ + ":\"Nokia\"" + +dependencyinfo = \ + "; Default HW/platform dependencies" \ + "[0x101F7961],0,0,0,{\"S60ProductID\"}" \ + "[0x2001E61C],4,6,3,{"Qt"} + +default_deployment.pkg_prerules = packageheader \ + vendorinfo \ + dependencyinfo + + + + LIBS += -leuser \ + -lconvergedmessageutils\ + -lxqutils \ + -lmsgs \ + -lsmcm \ + -lgsmu \ + -letext \ + -lmsgs \ + -lunidatamodelloader\ + -lQtCore + \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/tsrc.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/tsrc.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/tsrc.pro Tue Sep 07 13:28:39 2010 +0530 @@ -19,7 +19,7 @@ CONFIG += symbian_test #Sub .pro files -SUBDIRS += unittest_unidatamodelsmsplugin +SUBDIRS += testunidatamodelsmsplugin # Platforms SYMBIAN_PLATFORMS = DEFAULT \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/unittest_unidatamodelsmsplugin/data/Testunidatamodelsmsplugin.cfg --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/unittest_unidatamodelsmsplugin/data/Testunidatamodelsmsplugin.cfg Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -TestUniDataModelSMSPlugin diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/unittest_unidatamodelsmsplugin/src/testunidatamodelsmsplugin.cpp --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/unittest_unidatamodelsmsplugin/src/testunidatamodelsmsplugin.cpp Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,725 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - */ -#include -#include -#include -#include -#include -#include - -#include "convergedmessage.h" -#include "unidatamodelplugininterface.h" -#include "unidatamodelloader.h" -#include "testunidatamodelsmsplugin.h" -#include "testunidatamodelsmsplugin.ini" -_LIT(KUnixEpoch, "19700000:000000.000000"); - - -//main entry point -int main(int argc, char *argv[]) - { - int ret = -1; - QCoreApplication app(argc, argv); - QObject* tc = new TestUniDataModelSMSPlugin(); - - #ifdef __WINSCW__ - char *new_argv[3]; - QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; - QByteArray bytes = str.toAscii(); - char arg1[] = "-o"; - new_argv[0] = argv[0]; - new_argv[1] = arg1; - new_argv[2] = bytes.data(); - ret = QTest::qExec(tc, 3, new_argv); - - #else - ret = QTest::qExec(tc, argc, argv); - #endif - - - delete tc; - return ret; - - } - - - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::init -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::init() -{ - iObserver = new (ELeave) TestObserver(); - - // Create a new messaging server session.. - iMSession = CMsvSession::OpenSyncL(*iObserver); - // Create the client mtm registry - iMtmReg = CClientMtmRegistry::NewL(*iMSession); - - // Get the SMS clientmtm - iSmsClientMtm = static_cast (iMtmReg->NewMtmL(KUidMsgTypeSMS)); - - TRAPD(err, iSmsClientMtm->DefaultServiceL()) ; - - if( err == KErrNotFound) - { - CSmsAccount* account = CSmsAccount::NewL(); - CleanupStack::PushL(account); - CSmsSettings* settings = CSmsSettings::NewL(); - CleanupStack::PushL(settings); - account->InitialiseDefaultSettingsL(*settings); - CleanupStack::PopAndDestroy(2); - } - messageId = 0; - pluginLoader = new UniDataModelLoader(); - retTimeStamp = QDateTime::currentDateTime(); -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::cleanup -//--------------------------------------------------------------- -void TestUniDataModelSMSPlugin::cleanup() -{ - - if (messageId > 0) - iSmsClientMtm->Entry().DeleteL(messageId); - - delete iObserver; - iObserver = NULL; - - delete iSmsClientMtm; - iSmsClientMtm = NULL; - - delete iMtmReg; - iMtmReg = NULL; - - delete iMSession; - iMSession = NULL; - - delete pluginLoader; -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::validateMsg -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::createInboxSMS() -{ - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvGlobalInBoxIndexEntryId)); - - // Create a SMS message - iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); - TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); - - indexEntry.SetInPreparation(ETrue); - indexEntry.iMtm = KUidMsgTypeSMS; - indexEntry.iType = KUidMsvMessageEntry; - indexEntry.iServiceId = iSmsClientMtm->ServiceId(); - indexEntry.iDate.HomeTime(); - - // Convert TTime to QDateTime , this will be used for comparing the time of message - // when fetched from datamodel - TTime unixEpoch(KUnixEpoch); - TTimeIntervalSeconds seconds; - TTime timeStamp = indexEntry.iDate; - timeStamp.SecondsFrom(unixEpoch, seconds); - retTimeStamp.setTime_t(seconds.Int()); - - //AddBody - QString body(TEST_MSG_BODY); - - HBufC* bodyText = XQConversions::qStringToS60Desc(body); - if (bodyText) - { - CleanupStack::PushL(bodyText); - // Set the Body of the message - CRichText & body = iSmsClientMtm->Body(); - body.Reset(); - body.InsertL(0, *bodyText); - - TBuf<32> buf; - buf.Copy(bodyText->Left(32)); - indexEntry.iDescription.Set(buf); - - CleanupStack::PopAndDestroy(bodyText); - } - - QString recepient(TEST_MSG_FROM1); - QString recepient2(TEST_MSG_FROM2); - QString alias(TEST_MSG_ALIAS1); - - HBufC* addr = XQConversions::qStringToS60Desc(recepient); - HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); - HBufC* alias1 = XQConversions::qStringToS60Desc(alias); - - if (addr) - { - CleanupStack::PushL(addr); - TBuf<32> name; - name.Copy(addr->Left(32)); - indexEntry.iDetails.Set(name); - CSmsHeader& smsHeader = iSmsClientMtm->SmsHeader(); - smsHeader.SetFromAddressL(*addr); - messageId = indexEntry.Id(); - - CleanupStack::PopAndDestroy(addr); - } - - indexEntry.SetAttachment(EFalse); - indexEntry.SetVisible(ETrue); - indexEntry.SetInPreparation(EFalse); - - indexEntry.SetComplete(ETrue); - iSmsClientMtm->Entry().ChangeL(indexEntry); - iSmsClientMtm->SaveMessageL(); - -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::createOutboxSMS -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::createOutboxSMS() -{ - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId)); - - // Create a SMS message - iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); - TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); - - indexEntry.SetInPreparation(ETrue); - indexEntry.iMtm = KUidMsgTypeSMS; - indexEntry.iType = KUidMsvMessageEntry; - indexEntry.iServiceId = iSmsClientMtm->ServiceId(); - indexEntry.iDate.HomeTime(); - - // Convert TTime to QDateTime , this will be used for comparing the time of message - // when fetched from datamodel - TTime unixEpoch(KUnixEpoch); - TTimeIntervalSeconds seconds; - TTime timeStamp = indexEntry.iDate; - timeStamp.SecondsFrom(unixEpoch, seconds); - retTimeStamp.setTime_t(seconds.Int()); - - //AddBody - QString body(TEST_MSG_BODY); - - HBufC* bodyText = XQConversions::qStringToS60Desc(body); - if (bodyText) - { - CleanupStack::PushL(bodyText); - // Set the Body of the message - CRichText & body = iSmsClientMtm->Body(); - body.Reset(); - body.InsertL(0, *bodyText); - - TBuf<32> buf; - buf.Copy(bodyText->Left(32)); - indexEntry.iDescription.Set(buf); - - CleanupStack::PopAndDestroy(bodyText); - } - - QString recepient(TEST_MSG_FROM1); - QString recepient2(TEST_MSG_FROM2); - QString alias(TEST_MSG_ALIAS1); - - HBufC* addr = XQConversions::qStringToS60Desc(recepient); - HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); - HBufC* alias1 = XQConversions::qStringToS60Desc(alias); - - if (addr) - { - CleanupStack::PushL(addr); - TBuf<32> name; - name.Copy(addr->Left(32)); - indexEntry.iDetails.Set(name); - - // If drafts/ outbox message , set the recipients - iSmsClientMtm->AddAddresseeL(*addr, TPtrC()); - iSmsClientMtm->AddAddresseeL(*addr2, *alias1); - indexEntry.SetSendingState(KMsvSendStateWaiting); - messageId = indexEntry.Id(); - CleanupStack::PopAndDestroy(addr); - } - - indexEntry.SetAttachment(EFalse); - indexEntry.SetVisible(ETrue); - indexEntry.SetInPreparation(EFalse); - - indexEntry.SetComplete(ETrue); - iSmsClientMtm->Entry().ChangeL(indexEntry); - iSmsClientMtm->SaveMessageL(); - -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::createSentSMS -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::createSentSMS() -{ - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvSentEntryId)); - - // Create a SMS message - iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); - TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); - - indexEntry.SetInPreparation(ETrue); - indexEntry.iMtm = KUidMsgTypeSMS; - indexEntry.iType = KUidMsvMessageEntry; - indexEntry.iServiceId = iSmsClientMtm->ServiceId(); - indexEntry.iDate.HomeTime(); - - // Convert TTime to QDateTime , this will be used for comparing the time of message - // when fetched from datamodel - - TTime unixEpoch(KUnixEpoch); - TTimeIntervalSeconds seconds; - TTime timeStamp = indexEntry.iDate; - timeStamp.SecondsFrom(unixEpoch, seconds); - retTimeStamp.setTime_t(seconds.Int()); - - //AddBody - QString body(TEST_MSG_BODY); - - HBufC* bodyText = XQConversions::qStringToS60Desc(body); - if (bodyText) - { - CleanupStack::PushL(bodyText); - // Set the Body of the message - CRichText & body = iSmsClientMtm->Body(); - body.Reset(); - body.InsertL(0, *bodyText); - - TBuf<32> buf; - buf.Copy(bodyText->Left(32)); - indexEntry.iDescription.Set(buf); - - CleanupStack::PopAndDestroy(bodyText); - } - - QString recepient(TEST_MSG_FROM1); - QString recepient2(TEST_MSG_FROM2); - QString alias(TEST_MSG_ALIAS1); - - HBufC* addr = XQConversions::qStringToS60Desc(recepient); - HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); - HBufC* alias1 = XQConversions::qStringToS60Desc(alias); - - if (addr) - { - CleanupStack::PushL(addr); - TBuf<32> name; - name.Copy(addr->Left(32)); - indexEntry.iDetails.Set(name); - - // If inbox/ sent folder message , set the from address - CSmsHeader& smsHeader = iSmsClientMtm->SmsHeader(); - smsHeader.SetFromAddressL(*addr); - messageId = indexEntry.Id(); - - CleanupStack::PopAndDestroy(addr); - } - - indexEntry.SetAttachment(EFalse); - indexEntry.SetVisible(ETrue); - indexEntry.SetInPreparation(EFalse); - - indexEntry.SetComplete(ETrue); - iSmsClientMtm->Entry().ChangeL(indexEntry); - iSmsClientMtm->SaveMessageL(); - -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::createDraftsSMS -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::createDraftsSMS() -{ - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvDraftEntryId)); - // Create a SMS message - iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); - TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); - - indexEntry.SetInPreparation(ETrue); - indexEntry.iMtm = KUidMsgTypeSMS; - indexEntry.iType = KUidMsvMessageEntry; - indexEntry.iServiceId = iSmsClientMtm->ServiceId(); - indexEntry.iDate.HomeTime(); - - // Convert TTime to QDateTime , this will be used for comparing the time of message - // when fetched from datamodel - TTime unixEpoch(KUnixEpoch); - TTimeIntervalSeconds seconds; - TTime timeStamp = indexEntry.iDate; - timeStamp.SecondsFrom(unixEpoch, seconds); - retTimeStamp.setTime_t(seconds.Int()); - - //AddBody - QString body(TEST_MSG_BODY); - - HBufC* bodyText = XQConversions::qStringToS60Desc(body); - if (bodyText) - { - CleanupStack::PushL(bodyText); - // Set the Body of the message - CRichText & body = iSmsClientMtm->Body(); - body.Reset(); - body.InsertL(0, *bodyText); - - TBuf<32> buf; - buf.Copy(bodyText->Left(32)); - indexEntry.iDescription.Set(buf); - - CleanupStack::PopAndDestroy(bodyText); - } - - QString recipient(TEST_MSG_FROM1); - QString recipient2(TEST_MSG_FROM2); - QString alias(TEST_MSG_ALIAS1); - - HBufC* addr = XQConversions::qStringToS60Desc(recipient); - HBufC* addr2 = XQConversions::qStringToS60Desc(recipient2); - HBufC* alias1 = XQConversions::qStringToS60Desc(alias); - - if (addr) - { - CleanupStack::PushL(addr); - TBuf<32> name; - name.Copy(addr->Left(32)); - indexEntry.iDetails.Set(name); - - // If drafts/ outbox message , set the recipients - iSmsClientMtm->AddAddresseeL(*addr, TPtrC()); - indexEntry.SetSendingState(KMsvSendStateWaiting); - messageId = indexEntry.Id(); - - CleanupStack::PopAndDestroy(addr); - } - - indexEntry.SetAttachment(EFalse); - indexEntry.SetVisible(ETrue); - indexEntry.SetInPreparation(EFalse); - - indexEntry.SetComplete(ETrue); - iSmsClientMtm->Entry().ChangeL(indexEntry); - iSmsClientMtm->SaveMessageL(); - -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::createDraftsSMSNoRecipient -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::createDraftsSMSNoRecipient() -{ - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvDraftEntryId)); - // Create a SMS message - iSmsClientMtm->CreateMessageL(iSmsClientMtm->DefaultServiceL()); - TMsvEntry indexEntry = iSmsClientMtm->Entry().Entry(); - - indexEntry.SetInPreparation(ETrue); - indexEntry.iMtm = KUidMsgTypeSMS; - indexEntry.iType = KUidMsvMessageEntry; - indexEntry.iServiceId = iSmsClientMtm->ServiceId(); - indexEntry.iDate.HomeTime(); - - //AddBody - QString body(TEST_MSG_BODY); - - HBufC* bodyText = XQConversions::qStringToS60Desc(body); - if (bodyText) - { - CleanupStack::PushL(bodyText); - // Set the Body of the message - CRichText & body = iSmsClientMtm->Body(); - body.Reset(); - body.InsertL(0, *bodyText); - - TBuf<32> buf; - buf.Copy(bodyText->Left(32)); - indexEntry.iDescription.Set(buf); - - CleanupStack::PopAndDestroy(bodyText); - } - - indexEntry.SetSendingState(KMsvSendStateWaiting); - messageId = indexEntry.Id(); - - indexEntry.SetAttachment(EFalse); - indexEntry.SetVisible(ETrue); - indexEntry.SetInPreparation(EFalse); - - indexEntry.SetComplete(ETrue); - iSmsClientMtm->Entry().ChangeL(indexEntry); - iSmsClientMtm->SaveMessageL(); - -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::testInboxMessage -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::testInboxMessage() -{ - createInboxSMS(); - - // Get the SMS data modelplugin - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); - - pluginInterface->setMessageId(messageId); - - int size = pluginInterface->messageSize(); - - QVERIFY(pluginInterface->timeStamp() == retTimeStamp); - - QString body; - pluginInterface->body(body); - QString origBody(TEST_MSG_BODY); - QVERIFY(origBody == body); - - ConvergedMessageAddressList recipientList; - pluginInterface->toRecipientList(recipientList); - - QString recipient(TEST_MSG_FROM1); - QString recipient2(TEST_MSG_FROM2); - QString origalias(TEST_MSG_ALIAS1); - - QVERIFY(recipientList.count() == 0); - - int size1 = pluginInterface->messageSize(); - - QString fromaddress; - pluginInterface->fromAddress(fromaddress); - QVERIFY(recipient == fromaddress); - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvGlobalInBoxIndexEntryId)); -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::testOutboxMessage -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::testOutboxMessage() -{ - createOutboxSMS(); - // Get the SMS data modelplugin - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); - - // Get the data for the first message in DRAFTS - pluginInterface->setMessageId(messageId); - int size = pluginInterface->messageSize(); - - QVERIFY(pluginInterface->timeStamp() == retTimeStamp); - - QString body; - pluginInterface->body(body); - QString origBody(TEST_MSG_BODY); - QVERIFY(origBody == body); - - ConvergedMessageAddressList recipientList; - pluginInterface->toRecipientList(recipientList); - - QString recipient(TEST_MSG_FROM1); - QString recipient2(TEST_MSG_FROM2); - QString origalias(TEST_MSG_ALIAS1); - - QVERIFY(recipientList.count() == 2); - QVERIFY(recipient == recipientList[0]->address() - && recipientList[0]->alias().isEmpty()); - - const QString& as = recipientList[1]->address(); - const QString& as1 = recipientList[1]->alias(); - QVERIFY(recipient2 == as); - - // ConvergedMessageAddress::alias return a QSting with a space - origalias.append(' '); - QVERIFY(origalias == as1); - - int size1 = pluginInterface->messageSize(); - - QString fromaddress; - pluginInterface->fromAddress(fromaddress); - QVERIFY(fromaddress.isEmpty()); - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId)); -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::testSentMessage -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::testSentMessage() -{ - createSentSMS(); - // Get the SMS data modelplugin - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); - - pluginInterface->setMessageId(messageId); - - int size = pluginInterface->messageSize(); - - QVERIFY(pluginInterface->timeStamp() == retTimeStamp); - - QString body; - pluginInterface->body(body); - QString origBody(TEST_MSG_BODY); - QVERIFY(origBody == body); - - ConvergedMessageAddressList recipientList; - pluginInterface->toRecipientList(recipientList); - - QString recipient(TEST_MSG_FROM1); - QString recipient2(TEST_MSG_FROM2); - QString origalias(TEST_MSG_ALIAS1); - - QVERIFY(recipientList.count() == 0); - - QString fromaddress; - pluginInterface->fromAddress(fromaddress); - QVERIFY(recipient == fromaddress); - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvSentEntryId)); -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::testDraftsMessage -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::testDraftsMessage() -{ - createDraftsSMS(); - // Get the SMS data modelplugin - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); - - // Get the data for the first message in DRAFTS - pluginInterface->setMessageId(messageId); - int size = pluginInterface->messageSize(); - - QVERIFY(pluginInterface->timeStamp() == retTimeStamp); - - QString body; - pluginInterface->body(body); - QString origBody(TEST_MSG_BODY); - QVERIFY(origBody == body); - - ConvergedMessageAddressList recipientList; - pluginInterface->toRecipientList(recipientList); - - QString recipient(TEST_MSG_FROM1); - - QVERIFY(recipientList.count() == 1); - QVERIFY(recipient == recipientList[0]->address() - && recipientList[0]->alias().isEmpty()); - - QString fromaddress; - pluginInterface->fromAddress(fromaddress); - QVERIFY(fromaddress.isEmpty()); - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvDraftEntryId)); -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::testDraftsMessageNoRecipient -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::testDraftsMessageNoRecipient() -{ - createDraftsSMSNoRecipient(); - // Get the SMS data modelplugin - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); - - // Get the data for the first message in DRAFTS - pluginInterface->setMessageId(messageId); - int size = pluginInterface->messageSize(); - - QString body; - pluginInterface->body(body); - QString origBody(TEST_MSG_BODY); - QVERIFY(origBody == body); - - ConvergedMessageAddressList recipientList; - pluginInterface->toRecipientList(recipientList); - - QVERIFY(recipientList.count() == 0); - - QString fromaddress; - pluginInterface->fromAddress(fromaddress); - QVERIFY(fromaddress.isEmpty()); - TRAPD(err, iSmsClientMtm->SwitchCurrentEntryL(KMsvDraftEntryId)); -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::testGetPluginWithoutLoading -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::testGetPluginWithoutLoading() -{ - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); - QVERIFY(pluginInterface == NULL); - - // Try to geta plugin for a differnt message type - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Mms); - QVERIFY(pluginInterface == NULL); -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::testUnusedAPIs -//--------------------------------------------------------------- - -void TestUniDataModelSMSPlugin::testUnusedAPIs() -{ - pluginInterface = pluginLoader->getDataModelPlugin(ConvergedMessage::Sms); - - QVERIFY(pluginInterface->hasAttachment() == false); - - UniMessageInfoList attachmentlist = pluginInterface->attachmentList(); - QVERIFY(attachmentlist.isEmpty()); - - QVERIFY(pluginInterface->objectCount() == 0); - - UniMessageInfoList objectlist = pluginInterface->objectList(); - QVERIFY(objectlist.isEmpty()); - - QVERIFY(pluginInterface->slideCount() == 0); - - UniMessageInfoList slidelist = pluginInterface->slideContent(0); - QVERIFY(slidelist.isEmpty()); - - ConvergedMessageAddressList recipientList; - - pluginInterface->ccRecipientList(recipientList); - QVERIFY(recipientList.count() == 0); - - pluginInterface->bccRecipientList(recipientList); - QVERIFY(recipientList.count() == 0); - - MsgPriority priority = pluginInterface->messagePriority(); - // Normal priority - qDebug() << "prority" << priority; - QVERIFY(priority == 1); - int count = pluginInterface->attachmentCount(); - QVERIFY(count == 0); - -} - -//--------------------------------------------------------------- -// TestUniDataModelSMSPlugin::HandleSessionEventL -//--------------------------------------------------------------- - -void TestObserver::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, - TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) -{ -} diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/unittest_unidatamodelsmsplugin/testunidatamodelsmsplugin.pro --- a/messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/unittest_unidatamodelsmsplugin/testunidatamodelsmsplugin.pro Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -QT += testlib -QT -= gui - -TEMPLATE = app -//TEMPLATE = lib -TARGET = test-unidatamodel-sms-plugin - - -CONFIG += hb -CONFIG += symbian_test - -INCLUDEPATH += inc -INCLUDEPATH += ../../../../../../inc -INCLUDEPATH += ../../../../../../../inc -INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - -DEFINES += BUILD_TEST_DLL - -SOURCES += \ - src/testunidatamodelsmsplugin.cpp - - - -# Input -HEADERS += \ - inc/testunidatamodelsmsplugin.h - - - -SYMBIAN_PLATFORMS = WINSCW ARMV5 - symbian { - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.EPOCSTACKSIZE = 0x8000 - TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 - TARGET.EPOCALLOWDLLDATA = 1 - BLD_INF_RULES.prj_exports += "data/Testunidatamodelsmsplugin.cfg c:/data/Testunidatamodelsmsplugin.cfg" - } - -defBlock = \ - "$${LITERAL_HASH}if defined(EABI)" \ - "DEFFILE ../eabi/test_unidatamodel_sms_plugin.def" \ - "$${LITERAL_HASH}else" \ - "DEFFILE ../bwins/test_unidatamodel_sms_plugin.def" \ - "$${LITERAL_HASH}endif" - -MMP_RULES += defBlock - - -packageheader = "$${LITERAL_HASH}{\"QTestLibCVsClientServerTest\"},(0xEa1ebe60),1,0,0,TYPE=SA" - -vendorinfo = \ - "; Localised Vendor name" \ - "%{\"Nokia\"}" \ - "; Unique Vendor name" \ - ":\"Nokia\"" - -dependencyinfo = \ - "; Default HW/platform dependencies" \ - "[0x101F7961],0,0,0,{\"S60ProductID\"}" \ - "[0x2001E61C],4,6,3,{"Qt"} - -default_deployment.pkg_prerules = packageheader \ - vendorinfo \ - dependencyinfo - - - - LIBS += -leuser \ - -lconvergedmessageutils\ - -lxqutils \ - -lmsgs \ - -lsmcm \ - -lgsmu \ - -letext \ - -lmsgs \ - -lunidatamodelloader\ - -lQtCore - - - -#Copy the dependent DLL -symbian: { - addCfg.sources = ./data/Testunidatamodelsmsplugin.cfg - addCfg.path = C:/data - DEPLOYMENT += addCfg - } - diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgpluginapp/mmstestbed/mmstestbed.pro --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgpluginapp/mmstestbed/mmstestbed.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgpluginapp/mmstestbed/mmstestbed.pro Tue Sep 07 13:28:39 2010 +0530 @@ -11,33 +11,40 @@ # # Contributors: # -# Description: Project file for mmstestbed +# Description: # -QT += testlib +#QT += testlib QT -= gui TEMPLATE = lib +CONFIG += hb +#CONFIG += qtestlib +CONFIG += symbian_test TARGET = mmstestbed INCLUDEPATH += . INCLUDEPATH += inc INCLUDEPATH += ../../../inc + +INCLUDEPATH += ../../../../../../mmsengine/inc +INCLUDEPATH += ../../../../../../mmsengine/mmsserver/inc +INCLUDEPATH += ../../../../../../mmsengine/mmsmessage/inc +INCLUDEPATH += ../../../../../../mmsengine/mmscodec/inc +INCLUDEPATH += ../../../../../../inc +INCLUDEPATH += ../../../../../../mmsengine/mmsengine/inc INCLUDEPATH += ../../../../../../../../mmsengine/inc INCLUDEPATH += ../../../../../../../../mmsengine/mmscodec/inc INCLUDEPATH += ../../../../../../../../mmsengine/mmshttptransport/inc INCLUDEPATH += ../../../../../../../../mmsengine/mmsmessage/inc INCLUDEPATH += ../../../../../../../../mmsengine/mmsconninit/inc +#INCLUDEPATH += ../../../../mmsengine/mmscodec/inc INCLUDEPATH += ../../../../../../../../mmsengine/mmsserver/inc INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE DEFINES += BUILD_MMSTESTBED_DLL -CONFIG += hb -CONFIG += symbian_test -CONFIG += qtestlib - SOURCES += src/mmstestbed.cpp \ src/mmsteststaticutils.cpp \ src/mmsreadfile.cpp \ @@ -51,23 +58,23 @@ SYMBIAN_PLATFORMS = WINSCW ARMV5 +defBlock = \ + "$${LITERAL_HASH}if defined(EABI)" \ + "DEFFILE eabi/mmstestbedu.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE bwins/mmstestbedu.def" \ + "$${LITERAL_HASH}endif" + + symbian { - TARGET.UID3 = 0xE5c588a1 + TARGET.UID3 = 0xE5c588a1 TARGET.CAPABILITY = CAP_GENERAL_DLL TARGET.EPOCSTACKSIZE = 0x8000 TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 - TARGET.EPOCALLOWDLLDATA = 1 + TARGET.EPOCALLOWDLLDATA = 1 VENDORID = VID_DEFAULT } -#Def File rules -defBlock = \ -"$${LITERAL_HASH}if defined(EABI)" \ -"DEFFILE eabi/mmstestbedu.def" \ -"$${LITERAL_HASH}else" \ -"DEFFILE bwins/mmstestbedu.def" \ -"$${LITERAL_HASH}endif" - # Build.inf rules BLD_INF_RULES.prj_exports += \ "$${LITERAL_HASH}include " diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgpluginapp/testmmsplugin/testmmsplugin.pro --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgpluginapp/testmmsplugin/testmmsplugin.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgpluginapp/testmmsplugin/testmmsplugin.pro Tue Sep 07 13:28:39 2010 +0530 @@ -51,7 +51,8 @@ SYMBIAN_PLATFORMS = WINSCW ARMV5 symbian { TARGET.UID3 = 0xE274bf60 - TARGET.CAPABILITY = All -TCB -DRM +# TARGET.CAPABILITY = All -TCB -DRM + TARGET.CAPABILITY = CAP_APPLICATION TARGET.EPOCSTACKSIZE = 0x8000 TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 VENDORID = VID_DEFAULT diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/bwins/test_sms_pluginu.def --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/bwins/test_sms_pluginu.def Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -EXPORTS - qt_plugin_instance @ 1 NONAME - qt_plugin_query_verification_data @ 2 NONAME - ?initTestCase@TestSmsPlugin@@AAEXXZ @ 3 NONAME ; void TestSmsPlugin::initTestCase(void) - ?qt_metacast@TestSmsPlugin@@UAEPAXPBD@Z @ 4 NONAME ; void * TestSmsPlugin::qt_metacast(char const *) - ?cleanupTestCase@TestSmsPlugin@@AAEXXZ @ 5 NONAME ; void TestSmsPlugin::cleanupTestCase(void) - ?qt_metacall@TestSmsPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6 NONAME ; int TestSmsPlugin::qt_metacall(enum QMetaObject::Call, int, void * *) - ?trUtf8@TestSmsPlugin@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString TestSmsPlugin::trUtf8(char const *, char const *, int) - ?trUtf8@TestSmsPlugin@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString TestSmsPlugin::trUtf8(char const *, char const *) - ?validateMsg@TestSmsPlugin@@AAEXABVConvergedMessage@@ABVQString@@@Z @ 9 NONAME ; void TestSmsPlugin::validateMsg(class ConvergedMessage const &, class QString const &) - ?staticMetaObject@TestSmsPlugin@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const TestSmsPlugin::staticMetaObject - ?testReceived@TestSmsPlugin@@AAEXH@Z @ 11 NONAME ; void TestSmsPlugin::testReceived(int) - ?createAndSend@TestSmsPlugin@@AAEXH@Z @ 12 NONAME ; void TestSmsPlugin::createAndSend(int) - ?init@TestSmsPlugin@@AAEXXZ @ 13 NONAME ; void TestSmsPlugin::init(void) - ?tr@TestSmsPlugin@@SA?AVQString@@PBD0H@Z @ 14 NONAME ; class QString TestSmsPlugin::tr(char const *, char const *, int) - ?testSendReceiveSMS@TestSmsPlugin@@AAEXXZ @ 15 NONAME ; void TestSmsPlugin::testSendReceiveSMS(void) - ?tr@TestSmsPlugin@@SA?AVQString@@PBD0@Z @ 16 NONAME ; class QString TestSmsPlugin::tr(char const *, char const *) - ?metaObject@TestSmsPlugin@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * TestSmsPlugin::metaObject(void) const - ?getStaticMetaObject@TestSmsPlugin@@SAABUQMetaObject@@XZ @ 18 NONAME ; struct QMetaObject const & TestSmsPlugin::getStaticMetaObject(void) - ?cleanup@TestSmsPlugin@@AAEXXZ @ 19 NONAME ; void TestSmsPlugin::cleanup(void) - diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/1000102C.txt Binary file messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/1000102C.txt has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/100058DB.txt Binary file messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/100058DB.txt has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/101FB0D5.txt Binary file messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/101FB0D5.txt has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/101FB0D9.txt Binary file messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/101FB0D9.txt has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/cccccc00.cre Binary file messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/cccccc00.cre has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/ced_simtsy.cfg --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/ced_simtsy.cfg Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2244 +0,0 @@ -############################################################ -## AUTO-GENERATED CONFIGURATION FILE -## CommsDat Database Dump Utility -## 1.0 -############################################################ - -############################################################ -## Network -## -[Network] -ADD_SECTION -# COMMDB_ID = 1 - Name=Intranet - FIELD_COUNT=1 -END_ADD - -ADD_SECTION -# COMMDB_ID = 2 - Name=mRouter - FIELD_COUNT=1 -END_ADD - - -############################################################ -## ModemBearer -## -[ModemBearer] -ADD_TEMPLATE - Name=Default Modem - IfName=PPP - PortName=COMM::0 - TSYName=SIM - CSYName=ECUART - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=0 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=AT - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=CSD.agt - FIELD_COUNT=69 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=Null Modem 115200bps - IfName=PPP - PortName=COMM::0 - TSYName=SIM - CSYName=ECUART - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=4 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=AT - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+385669988 - MessageValidityPeriod=3000 - MessageDeliveryReport=TRUE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=CSD.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 3 - Name=US Robotics Sportster - IfName=PPP - PortName=COMM::0 - TSYName=MM - CSYName=ECUART - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=57600 - Handshaking=244 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=AFTERDIALUNTILANSWER - SpeakerVolPref=QUIET - ModemInitString=AT&F1 - DataInitString=AT - FaxInitString=AT&d2 - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=CSD.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 4 - Name=Dacom Surfer - IfName=PPP - PortName=COMM::0 - TSYName=MM - CSYName=ECUART - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=57600 - Handshaking=244 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=AFTERDIALUNTILANSWER - SpeakerVolPref=QUIET - ModemInitString=AT&F - DataInitString=AT - FaxInitString=AT&d2 - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=CSD.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 5 - Name=GSM Mobile Phone via Infrared - IfName=PPP - PortName=IRCOMM::0 - TSYName=MM - CSYName=IRCOMM - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=196 - SpecialRate=0 - XonChar=17 - XoffChar=19 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=ATZ - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=CSD.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 6 - Name=GSM Mobile Phone via Serial - IfName=PPP - PortName=COMM::0 - TSYName=MM - CSYName=ECUART - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=19200 - Handshaking=196 - SpecialRate=0 - XonChar=17 - XoffChar=19 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=ATZ - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=CSD.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 7 - Name=GPRS Ericsson R520m via IR - IfName=PPP - PortName=IRCOMM::0 - TSYName=MM - CSYName=IRCOMM - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=4 - SpecialRate=0 - XonChar=17 - XoffChar=19 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=ATZ - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=PSD.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 8 - Name=GPRS Ericsson R520m/T68i via Serial - IfName=PPP - PortName=COMM::0 - TSYName=MM - CSYName=ECUART - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=19200 - Handshaking=4 - SpecialRate=0 - XonChar=17 - XoffChar=19 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=ATZ - DataInitString=AT - FaxInitString=AT - IspInitString=*99***1# - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=PSD.agt - FIELD_COUNT=70 -END_ADD - -ADD_SECTION -# COMMDB_ID = 9 - Name=GPRS Motorola Mobile Phone via Serial - IfName=PPP - PortName=COMM::0 - TSYName=MM - CSYName=ECUART - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=57600 - Handshaking=4 - SpecialRate=0 - XonChar=17 - XoffChar=19 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=ATZ - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=PSD.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 10 - Name=WinTunnel Modem - IfName=PPP - PortName=COMM::6 - TSYName=MM - CSYName=ECUART - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=4 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=AT - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=null.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 11 - Name=mRouterWinsBearer - IfName=PPP - PortName=WINS::0 - TSYName=MM - CSYName=WINSCSY - LastSocketActivityTimeout=9999 - LastSessionClosedTimeout=180 - LastSocketClosedTimeout=30 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=4 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=AT - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=mRouterAgent.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 12 - Name=mRouterRs232Bearer - IfName=PPP - PortName=COMM::0 - TSYName=MM - CSYName=ECUART - LastSocketActivityTimeout=9999 - LastSessionClosedTimeout=180 - LastSocketClosedTimeout=30 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=4 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=AT - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=mRouterAgent.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 13 - Name=mRouterIrBearer - IfName=PPP - PortName=IRCOMM::0 - TSYName=MM - CSYName=IRCOMM - LastSocketActivityTimeout=9999 - LastSessionClosedTimeout=180 - LastSocketClosedTimeout=30 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=4 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=AT - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=mRouterAgent.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 14 - Name=mRouterBtBearer - IfName=PPP - PortName=BTCOMM::0 - TSYName=MM - CSYName=BTCOMM - LastSocketActivityTimeout=9999 - LastSessionClosedTimeout=180 - LastSocketClosedTimeout=30 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=4 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=AT - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=mRouterAgent.agt - FIELD_COUNT=69 -END_ADD - -ADD_SECTION -# COMMDB_ID = 15 - Name=mRouterUsbBearer - IfName=PPP - PortName=ACM::0 - TSYName=MM - CSYName=ECACM - LastSocketActivityTimeout=9999 - LastSessionClosedTimeout=180 - LastSocketClosedTimeout=30 - DataBits=8 - StopBits=1 - Parity=NONE - Rate=115200 - Handshaking=4 - SpecialRate=0 - XonChar=0 - XoffChar=0 - FaxClassPref=AUTO - SpeakerPref=NEVER - SpeakerVolPref=QUIET - ModemInitString=AT - DataInitString=AT - FaxInitString=AT - DialPauseLength=S8= - SpeakerVolContorlLow=L0 - SpeakerVolControlMedium=L1 - SpeakerVolControlHigh=L2 - SpeakerAlwaysOff=M0 - SpeakerOnUntilCarrier=M1 - SpeakerAlwaysOn=M2 - SpeakerOnAfterUntilCarrier=M3 - DialToneWaitModifier=W - CallProgress1=X1 - CallProgress2=X2 - CallProgress3=X3 - CallProgress4=X4 - EchoOff=E0 - VerboseText=V1 - QuietOff=Q0 - QuietOn=Q1 - DialCommandStateModifier=; - OnLine=O - ResetConfiguration=Z - ReturnToFactoryDefs=&F - DCDOnDuringLink=&C1 - DTRHangUp=&D2 - DSRAlwaysOn=&S0 - RTSCTSHandshake=&K3 - XonXoffHandshake=&K4 - EscapeCharacter=+ - EscapeGuardPeriod=S12 - NoDialTone=NO DIAL TONE - Busy=BUSY - NoAnswer=NO ANSWER - Carrier=CARRIER - Connect=CONNECT - CompressionClass5=COMPRESSION:CLASS 5 - CompressionV42bis=COMPRESSION:V.42 bis - CompressionNone=COMPRESSION:NONE - ProtocolLAPD=PROTOCOL:LAPD - ProtocolALT=PROTOCOL:ALT - ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR - ProtocolNone=PROTOCOL:NONE - MessageCentreNumber=+44123456789 - MessageValidityPeriod=1440 - MessageDeliveryReport=FALSE - MinimumSignalLevel=9905 - CommRole=0 - SIRSettings=0 - Agent=mRouterAgent.agt - FIELD_COUNT=69 -END_ADD - - -############################################################ -## LANBearer -## -[LANBearer] -ADD_SECTION -# COMMDB_ID = 1 - Name=EKA1 Assabet on-board Ethernet - IfName=ethint - LDDFilename=ethercard - LDDName=EtherCard - PDDFilename=EtherSmc - PDDName=EtherCard.Smc - PacketDriverName=EtherPkt.drv - LastSocketActivityTimeout=-1 - LastSessionClosedTimeout=-1 - LastSocketClosedTimeout=-1 - Agent=nullagt.agt - FIELD_COUNT=11 -END_ADD - -ADD_SECTION -# COMMDB_ID = 2 - Name=EKA2 Assabet on-board Ethernet - IfName=ethint - LDDFilename=enet - LDDName=Ethernet - PDDFilename=ethernet - PDDName=Ethernet.Assabet - PacketDriverName=EtherPkt.drv - LastSocketActivityTimeout=-1 - LastSessionClosedTimeout=-1 - LastSocketClosedTimeout=-1 - Agent=nullagt.agt - FIELD_COUNT=11 -END_ADD - -ADD_SECTION -# COMMDB_ID = 3 - Name=EKA1 emulator Ethernet - IfName=ethint - LDDFilename=ethercard - LDDName=Ethercard - PDDFilename=etherwins - PDDName=Ethercard.wins - PacketDriverName=EtherPkt.drv - LastSocketActivityTimeout=-1 - LastSessionClosedTimeout=-1 - LastSocketClosedTimeout=-1 - Agent=nullagt.agt - FIELD_COUNT=11 -END_ADD - -ADD_SECTION -# COMMDB_ID = 4 - Name=EKA2 emulator Ethernet - IfName=ethint - LDDFilename=enet - LDDName=Ethernet - PDDFilename=ethernet - PDDName=Ethernet.Wins - PacketDriverName=EtherPkt.drv - LastSocketActivityTimeout=-1 - LastSessionClosedTimeout=-1 - LastSocketClosedTimeout=-1 - Agent=nullagt.agt - FIELD_COUNT=11 -END_ADD - - -############################################################ -## Location -## -[Location] -ADD_TEMPLATE - Name=Default Location - IntlPrefixCode=+ - NatPrefixCode=0 - NatCode=44 - Mobile=TRUE - UsePulseDial=FALSE - WaitForDialTone=FALSE - PauseAfterDialout=0 - FIELD_COUNT=8 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=Office - IntlPrefixCode=00 - NatPrefixCode=0 - NatCode=44 - AreaCode=171 - DialOutCode=9, - Mobile=FALSE - UsePulseDial=FALSE - WaitForDialTone=FALSE - PauseAfterDialout=0 - FIELD_COUNT=10 -END_ADD - -ADD_SECTION -# COMMDB_ID = 3 - Name=Office Direct Dial - IntlPrefixCode=00 - NatPrefixCode=0 - NatCode=44 - AreaCode=171 - Mobile=FALSE - UsePulseDial=FALSE - WaitForDialTone=FALSE - PauseAfterDialout=0 - FIELD_COUNT=9 -END_ADD - -ADD_SECTION -# COMMDB_ID = 4 - Name=Mobile - IntlPrefixCode=+ - NatPrefixCode=0 - NatCode=44 - Mobile=TRUE - UsePulseDial=FALSE - WaitForDialTone=FALSE - PauseAfterDialout=0 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 5 - Name=Home - IntlPrefixCode=00 - NatPrefixCode=0 - NatCode=44 - AreaCode=181 - Mobile=FALSE - UsePulseDial=TRUE - WaitForDialTone=TRUE - PauseAfterDialout=0 - FIELD_COUNT=9 -END_ADD - - -############################################################ -## Chargecard -## -[Chargecard] -ADD_SECTION -# COMMDB_ID = 1 - Name=Dummy BT Chargecard - AccountNumber=144,12345678 - Pin=0000 - LocalRule=HG - NatRule=HFG - IntlRule=HEFG - FIELD_COUNT=6 -END_ADD - -ADD_SECTION -# COMMDB_ID = 2 - Name=Dummy Mercury Chargecard - AccountNumber=0500800800,,12345678 - Pin=**** - LocalRule=HG - NatRule=J,K,0FG - IntlRule=HEFG - FIELD_COUNT=6 -END_ADD - - -############################################################ -## GlobalSettings -## -[GlobalSettings] -ADD_SECTION -# COMMDB_ID = 1 - Name=DefaultRecordName-1 - WAPAccessPoint=1 - ConnectionAttempts=2 - RedialAttempts=3 - SmsBearer=1 - SmsReceiveMode=2 - GPRSAttachMode=1 - AcceptIncomingGprs=1 - GPRSClassCBearer=GSM - ModemForDataAndFax=2 - ModemForPhoneServicesAndSMS=2 - LocationForDataAndFax=2 - LocationForPhoneServicesAndSMS=2 - MaxMBufHeap=2 - DefaultNetwork=1 - BearerAvailabilityCheckTSY=mm - FIELD_COUNT=16 -END_ADD - - -############################################################ -## DialOutISP -## -[DialOutISP] -ADD_TEMPLATE - Name=Default Dial Out ISP - DialResolution=TRUE - UseLoginScript=FALSE - PromptForLogin=TRUE - DisplayPCT=FALSE - IfPromptForAuth=TRUE - IfCallbackEnabled=FALSE - CallbackTimeout=0 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - BearerService=0 - BearerProtocol=UNSPECIFIED - RlpVersion=0 - IwfToMs=0 - MsToIwf=0 - AckTimer=0 - RetransmissionAttempts=0 - ResequencePeriod=0 - V42Compression=0 - V42Codewords=0 - V42MaxLength=0 - Asymmetry=0 - UserInitUpgrade=FALSE - UseEdge=FALSE - FIELD_COUNT=28 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=NT RAS - Description=Test - Type=INTERNETONLY - DialResolution=TRUE - UseLoginScript=TRUE - LoginScript=CHARMAP \[windows-1252\]\nLOOP 10\n{\nSEND "CLIENT"+<0x0d>\nWAIT 3\n{\n"SERVER" OK\n}\n}\nEXIT KErrNoAnswer$\n\nOK:\nEXIT\n - PromptForLogin=FALSE - DisplayPCT=FALSE - IfNetworks=ip - IfPromptForAuth=FALSE - IfAuthName=RasUser - IfAuthPass=pass - AuthRetries=0 - IfCallbackEnabled=FALSE - CallbackTimeout=0 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - BearerService=0 - BearerProtocol=UNSPECIFIED - RlpVersion=0 - IwfToMs=0 - MsToIwf=0 - AckTimer=0 - RetransmissionAttempts=0 - ResequencePeriod=0 - V42Compression=0 - V42Codewords=0 - V42MaxLength=0 - Asymmetry=0 - UserInitUpgrade=FALSE - UseEdge=FALSE - FIELD_COUNT=35 -END_ADD - -ADD_SECTION -# COMMDB_ID = 3 - Name=ISP01 - Description=PlaceHolder for ISP01 - Type=INTERNETONLY - DialResolution=TRUE - UseLoginScript=FALSE - PromptForLogin=FALSE - DisplayPCT=FALSE - IfNetworks=ip - IfPromptForAuth=TRUE - IfAuthName=xxx - IfAuthPass=yyy - AuthRetries=0 - IfCallbackEnabled=FALSE - CallbackTimeout=0 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - BearerService=0 - BearerProtocol=UNSPECIFIED - RlpVersion=0 - IwfToMs=0 - MsToIwf=0 - AckTimer=0 - RetransmissionAttempts=0 - ResequencePeriod=0 - V42Compression=0 - V42Codewords=0 - V42MaxLength=0 - Asymmetry=0 - UserInitUpgrade=FALSE - UseEdge=FALSE - FIELD_COUNT=34 -END_ADD - -ADD_SECTION -# COMMDB_ID = 4 - Name=ISP02 - Description=PlaceHolder for ISP02 - Type=INTERNETONLY - DialResolution=TRUE - UseLoginScript=FALSE - PromptForLogin=FALSE - DisplayPCT=FALSE - IfNetworks=ip - IfPromptForAuth=TRUE - IfAuthName=xxx - IfAuthPass=yyy - AuthRetries=0 - IfCallbackEnabled=FALSE - CallbackTimeout=0 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - BearerService=0 - BearerProtocol=UNSPECIFIED - RlpVersion=0 - IwfToMs=0 - MsToIwf=0 - AckTimer=0 - RetransmissionAttempts=0 - ResequencePeriod=0 - V42Compression=0 - V42Codewords=0 - V42MaxLength=0 - Asymmetry=0 - UserInitUpgrade=FALSE - UseEdge=FALSE - FIELD_COUNT=34 -END_ADD - -ADD_SECTION -# COMMDB_ID = 5 - Name=ISP03 - Description=PlaceHolder for ISP03 - Type=INTERNETONLY - DialResolution=TRUE - UseLoginScript=FALSE - PromptForLogin=FALSE - DisplayPCT=FALSE - IfNetworks=ip - IfPromptForAuth=TRUE - IfAuthName=xxx - IfAuthPass=yyy - AuthRetries=0 - IfCallbackEnabled=FALSE - CallbackTimeout=0 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - BearerService=0 - BearerProtocol=UNSPECIFIED - RlpVersion=0 - IwfToMs=0 - MsToIwf=0 - AckTimer=0 - RetransmissionAttempts=0 - ResequencePeriod=0 - V42Compression=0 - V42Codewords=0 - V42MaxLength=0 - Asymmetry=0 - UserInitUpgrade=FALSE - UseEdge=FALSE - FIELD_COUNT=34 -END_ADD - -ADD_SECTION -# COMMDB_ID = 6 - Name=ISP04 - Description=PlaceHolder for ISP04 - Type=INTERNETONLY - DialResolution=TRUE - UseLoginScript=FALSE - PromptForLogin=FALSE - DisplayPCT=FALSE - IfNetworks=ip - IfPromptForAuth=TRUE - IfAuthName=xxx - IfAuthPass=yyy - AuthRetries=0 - IfCallbackEnabled=FALSE - CallbackTimeout=0 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - BearerService=0 - BearerProtocol=UNSPECIFIED - RlpVersion=0 - IwfToMs=0 - MsToIwf=0 - AckTimer=0 - RetransmissionAttempts=0 - ResequencePeriod=0 - V42Compression=0 - V42Codewords=0 - V42MaxLength=0 - Asymmetry=0 - UserInitUpgrade=FALSE - UseEdge=FALSE - FIELD_COUNT=34 -END_ADD - -ADD_SECTION -# COMMDB_ID = 7 - Name=ISP05 - Description=PlaceHolder for ISP05 - Type=INTERNETONLY - DialResolution=TRUE - UseLoginScript=FALSE - PromptForLogin=FALSE - DisplayPCT=FALSE - IfNetworks=ip - IfPromptForAuth=TRUE - IfAuthName=xxx - IfAuthPass=yyy - AuthRetries=0 - IfCallbackEnabled=FALSE - CallbackTimeout=0 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - BearerService=0 - BearerProtocol=UNSPECIFIED - RlpVersion=0 - IwfToMs=0 - MsToIwf=0 - AckTimer=0 - RetransmissionAttempts=0 - ResequencePeriod=0 - V42Compression=0 - V42Codewords=0 - V42MaxLength=0 - Asymmetry=0 - UserInitUpgrade=FALSE - UseEdge=FALSE - FIELD_COUNT=34 -END_ADD - -ADD_SECTION -# COMMDB_ID = 8 - Name=mRouterDialOutIsp - Description=mRouterDialOutIsp - Type=INTERNETONLY - DialResolution=TRUE - UseLoginScript=FALSE - PromptForLogin=FALSE - DisplayPCT=FALSE - IfNetworks=ip - IfPromptForAuth=FALSE - IfAuthName=IfAuthPass= - IfAuthPass=AuthRetries=0 - AuthRetries=0 - IfCallbackEnabled=FALSE - CallbackTimeout=0 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - BearerService=0 - BearerProtocol=UNSPECIFIED - RlpVersion=0 - IwfToMs=0 - MsToIwf=0 - AckTimer=0 - RetransmissionAttempts=0 - ResequencePeriod=0 - V42Compression=0 - V42Codewords=0 - V42MaxLength=0 - Asymmetry=0 - UserInitUpgrade=FALSE - UseEdge=FALSE - FIELD_COUNT=34 -END_ADD - - -############################################################ -## DialInISP -## -[DialInISP] -ADD_TEMPLATE - Name=Default Dial In ISP - UseLoginScript=FALSE - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - UseEdge=FALSE - FIELD_COUNT=9 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=Dial In ISP01 - UseLoginScript=FALSE - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - EnableIPHeaderComp=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - EnableSWComp=FALSE - UseEdge=FALSE - FIELD_COUNT=9 -END_ADD - - -############################################################ -## OutgoingGPRS -## -[OutgoingGPRS] -ADD_SECTION -# COMMDB_ID = 1 - Name=GPRS01 - APN=gprs01APNPlaceHolder - PDPType=IPV4 - ReqPrecedence=0 - ReqDelay=0 - ReqReliability=0 - ReqPeakThroughput=0 - ReqMeanThroughput=0 - MinPrecedence=0 - MinDelay=0 - MinReliability=0 - MinPeakThroughput=0 - MinMeanThroughput=0 - DataCompression=FALSE - HeaderCompression=FALSE - GprsUseEdge=FALSE - AnonymousAccess=FALSE - IfNetworks=ip - IfPromptForAuth=FALSE - AuthRetries=1 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - GprsAccessPointType=0 - QosWarningTimeout=0 - FIELD_COUNT=26 -END_ADD - -ADD_SECTION -# COMMDB_ID = 2 - Name=GPRS02 - APN=gprs02APNPlaceHolder - PDPType=IPV4 - ReqPrecedence=0 - ReqDelay=0 - ReqReliability=0 - ReqPeakThroughput=0 - ReqMeanThroughput=0 - MinPrecedence=0 - MinDelay=0 - MinReliability=0 - MinPeakThroughput=0 - MinMeanThroughput=0 - DataCompression=FALSE - HeaderCompression=FALSE - GprsUseEdge=FALSE - AnonymousAccess=FALSE - IfNetworks=ip - IfPromptForAuth=FALSE - AuthRetries=1 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - GprsAccessPointType=0 - QosWarningTimeout=0 - FIELD_COUNT=26 -END_ADD - -ADD_SECTION -# COMMDB_ID = 3 - Name=GPRS03 - APN=gprs03APNPlaceHolder - PDPType=IPV4 - ReqPrecedence=0 - ReqDelay=0 - ReqReliability=0 - ReqPeakThroughput=0 - ReqMeanThroughput=0 - MinPrecedence=0 - MinDelay=0 - MinReliability=0 - MinPeakThroughput=0 - MinMeanThroughput=0 - DataCompression=FALSE - HeaderCompression=FALSE - GprsUseEdge=FALSE - AnonymousAccess=FALSE - IfNetworks=ip - IfPromptForAuth=FALSE - AuthRetries=1 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=FALSE - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - GprsAccessPointType=0 - QosWarningTimeout=0 - FIELD_COUNT=26 -END_ADD - - -############################################################ -## IncomingGPRS -## -[IncomingGPRS] -ADD_SECTION -# COMMDB_ID = 1 - Name=Incoming GPRS Settings PlaceHolder - APN=Test - PDPType=IPV4 - PDPAddress=0.0.0.0 - ReqPrecedence=1 - ReqDelay=1 - ReqReliability=1 - ReqPeakThroughput=1 - ReqMeanThroughput=1 - MinPrecedence=1 - MinDelay=1 - MinReliability=1 - MinPeakThroughput=1 - MinMeanThroughput=1 - DataCompression=FALSE - HeaderCompression=FALSE - GprsUseEdge=FALSE - AnonymousAccess=FALSE - IfNetworks=ip - IfPromptForAuth=FALSE - IfAuthName=RasUser - IfAuthPass=pass - AuthRetries=1 - IpAddrFromServer=TRUE - IpDNSAddrFromServer=TRUE - IpNameServer1=0.0.0.0 - IpNameServer2=0.0.0.0 - EnableLCPExtension=FALSE - DisablePlainTextAuth=FALSE - FIELD_COUNT=29 -END_ADD - - -############################################################ -## DefaultGPRS -## -[DefaultGPRS] -ADD_SECTION -# COMMDB_ID = 1 - Name=Dummy Default GPRS Settings - Usage=1 - APN=Access point name - PDPType=IPV6 - PDPAddress=www.wid.com - Precedence=1 - Delay=1 - Reliability=1 - PeakThroughput=1 - MeanThroughput=1 - MinPrecedence=1 - MinDelay=1 - MinReliability=1 - MinPeakThroughput=1 - MinMeanThroughput=1 - DataCompression=TRUE - HeaderCompression=TRUE - GprsUseEdge=FALSE - AnonymousAccess=TRUE - FIELD_COUNT=19 -END_ADD - - -############################################################ -## LANService -## -[LANService] -ADD_SECTION -# COMMDB_ID = 1 - Name=Ethernet - IfNetworks=ip,ip6 - IpNetMask=255.255.255.0 - IpGateway=194.72.6.1 - IpAddrFromServer=TRUE - IpAddr=192.168.0.100 - IpDNSAddrFromServer=FALSE - IpNameServer1=194.72.6.51 - IpNameServer2=194.72.6.52 - FIELD_COUNT=9 -END_ADD - - -############################################################ -## IAP -## -[IAP] -ADD_SECTION -# COMMDB_ID = 1 - Name=NT RAS with Null Modem - IAPServiceType=DialOutISP - IAPService=2 - IAPBearerType=ModemBearer - IAPBearer=2 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 2 - Name=CSD IAP PlaceHolder01 - IAPServiceType=DialOutISP - IAPService=3 - IAPBearerType=ModemBearer - IAPBearer=2 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 3 - Name=CSD IAP PlaceHolder02 - IAPServiceType=DialOutISP - IAPService=4 - IAPBearerType=ModemBearer - IAPBearer=2 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 4 - Name=GPRS IAP PlaceHolder01 - IAPServiceType=OutgoingGPRS - IAPService=1 - IAPBearerType=ModemBearer - IAPBearer=8 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=4 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 5 - Name=GPRS IAP PlaceHolder02 - IAPServiceType=OutgoingGPRS - IAPService=2 - IAPBearerType=ModemBearer - IAPBearer=8 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=4 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 6 - Name=mRouter Rs232 - IAPServiceType=DialOutISP - IAPService=8 - IAPBearerType=ModemBearer - IAPBearer=12 - IAPNetwork=2 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 7 - Name=mRouter Ir - IAPServiceType=DialOutISP - IAPService=8 - IAPBearerType=ModemBearer - IAPBearer=13 - IAPNetwork=2 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 8 - Name=mRouter BT - IAPServiceType=DialOutISP - IAPService=8 - IAPBearerType=ModemBearer - IAPBearer=14 - IAPNetwork=2 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 9 - Name=mRouter USB - IAPServiceType=DialOutISP - IAPService=8 - IAPBearerType=ModemBearer - IAPBearer=15 - IAPNetwork=2 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 10 - Name=mRouter Wins - IAPServiceType=DialOutISP - IAPService=8 - IAPBearerType=ModemBearer - IAPBearer=11 - IAPNetwork=2 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 11 - Name=VPN IAP - IAPServiceType=VpnService - IAPService=2 - IAPBearerType=VirtualBearer - IAPBearer=2 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 12 - Name=EKA1 Assabet on-board ethernet - IAPServiceType=LANService - IAPService=1 - IAPBearerType=LANBearer - IAPBearer=1 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 13 - Name=EKA2 Assabet on-board ethernet - IAPServiceType=LANService - IAPService=1 - IAPBearerType=LANBearer - IAPBearer=2 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 14 - Name=EKA1 emulator ethernet - IAPServiceType=LANService - IAPService=1 - IAPBearerType=LANBearer - IAPBearer=3 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - -ADD_SECTION -# COMMDB_ID = 15 - Name=EKA2 emulator ethernet - IAPServiceType=LANService - IAPService=1 - IAPBearerType=LANBearer - IAPBearer=4 - IAPNetwork=1 - IAPNetworkWeighting=0 - Location=2 - FIELD_COUNT=8 -END_ADD - - -############################################################ -## ConnectionPreferences -## -[ConnectionPreferences] -ADD_SECTION -# COMMDB_ID = 1 - Name=DefaultRecordName-1 - Ranking=0 - Direction=OUTGOING - BearerSet=CSD - DialogPref=PROMPT - IAP=1 - FIELD_COUNT=6 -END_ADD - -ADD_SECTION -# COMMDB_ID = 2 - Name=DefaultRecordName-2 - Ranking=1 - Direction=OUTGOING - BearerSet=CSD - DialogPref=PROMPT - IAP=1 - FIELD_COUNT=6 -END_ADD - - -############################################################ -## Proxies -## -[Proxies] -ADD_SECTION -# COMMDB_ID = 1 - Name=DefaultRecordName-1 - ISP=2 - ProxyServiceType=DialOutISP - UseProxyServer=TRUE - ProxyServerName=www.dummyproxy.com - ProtocolName=http - PortNumber=80 - Exceptions=www.dummyproxy.com/exception - FIELD_COUNT=8 -END_ADD - - -############################################################ -## WAPAccessPoint -## -[WAPAccessPoint] -ADD_TEMPLATE - Name=Default Dial In ISP - CurrentBearer=WAPIPBearer - FIELD_COUNT=2 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=Dummy WAP Settings - CurrentBearer=WAPIPBearer - StartPage=www.wapstart.com - FIELD_COUNT=3 -END_ADD - - -############################################################ -## WAPIPBearer -## -[WAPIPBearer] -ADD_TEMPLATE - Name=DefaultRecordName-1 - AccessPointId=0 - IAP=0 - WSPOption=CONNECTIONLESS - Security=FALSE - ProxyPortNumber=0 - FIELD_COUNT=6 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=DefaultRecordName-2 - AccessPointId=2 - GatewayAddress=www.wapgateway.com - IAP=2 - WSPOption=CONNECTIONORIENTED - Security=FALSE - ProxyPortNumber=1 - FIELD_COUNT=7 -END_ADD - - -############################################################ -## WAPSMSBearer -## -[WAPSMSBearer] -ADD_TEMPLATE - Name=DefaultRecordName-1 - AccessPointId=0 - WSPOption=CONNECTIONLESS - Security=FALSE - FIELD_COUNT=4 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=DefaultRecordName-2 - AccessPointId=2 - GatewayAddress=+4412345678901 - ServiceCentreAddress=+442071234567 - WSPOption=CONNECTIONORIENTED - Security=FALSE - FIELD_COUNT=6 -END_ADD - - -############################################################ -## SecureSocketTable -## -[SecureSocketTable] -ADD_SECTION -# COMMDB_ID = 1 - Name=DefaultRecordName-1 - ProtocolName=ssl3.0 - ProtoLibrary=ssladaptor.dll - FIELD_COUNT=3 -END_ADD - -ADD_SECTION -# COMMDB_ID = 2 - Name=DefaultRecordName-2 - ProtocolName=tls1.0 - ProtoLibrary=ssladaptor.dll - FIELD_COUNT=3 -END_ADD - - -############################################################ -## VirtualBearer -## -[VirtualBearer] -ADD_TEMPLATE - Name=Default VPN Bearer - IfName=VPN.nif - LastSocketActivityTimeout=180 - LastSessionClosedTimeout=30 - LastSocketClosedTimeout=60 - Agent=VPN.agt - FIELD_COUNT=6 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=VPN Bearer1 - IfName=ppp.nif - LastSocketActivityTimeout=-1 - LastSessionClosedTimeout=-1 - LastSocketClosedTimeout=-1 - Agent=ntras.agt - FIELD_COUNT=6 -END_ADD - - -############################################################ -## VpnService -## -[VpnService] -ADD_TEMPLATE - Name=Default VPN - Policy=DefaultVPNpolicy - HomeIAP=1 - HomeNetwork=0 - FIELD_COUNT=4 -END_TEMPLATE - -ADD_SECTION -# COMMDB_ID = 2 - Name=VPN1 - Policy=VPNpolicy1 - HomeIAP=2 - HomeNetwork=1 - FIELD_COUNT=4 -END_ADD - diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/sms.rsc Binary file messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/sms.rsc has changed diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testmsg.h --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testmsg.h Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,600 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - */ - -#ifndef TEST_MSG_H -#define TEST_MSG_H -//Headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include -#include // CRichText -#include // for Message type IDs -#include // for CMmsClientMtm -#include //Attachemt mimeheader -#include //Attachment manager -#include -#include //parse -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "testsmsplugin.ini" - -using namespace CommsDat; - -const TInt KMsvTestUidPhonePwrValue = 0x100052C5; -enum TMsvTestPhoneStatus - { - EMsvTestPhoneOff = 0, - EMsvTestPhoneOn - }; - -class TestMsg : public MMsvSessionObserver -{ -public: - - TestMsg(); - ~TestMsg(); - - void createSCSettings(); - - void createSMS(); - void createMMS(); - - void deleteMessage(int msgId); - - void initSimTsyL(); - -public: //MMsvSessionObserver - - void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, - TAny* aArg3); - -private: - - void initL(); - void createSMSL(TMsvId aFolderId, TBool aUnReadFlag); - void createMMSL(TMsvId aFolderId, TBool aUnReadFlag); - void initializeSimTsyL(TInt aTestNumber, HBufC* aTsyName); - -private: - - CMsvSession* iSession; - CClientMtmRegistry* iMtmRegistry; - CSmsClientMtm *smsClientMtm; -}; - -//--------------------------------------------------------------- -// TestMsg::TestMsg -//--------------------------------------------------------------- -TestMsg::TestMsg() -{ - int err; - TRAP(err,initL()); - #ifdef _DEBUG_TRACES_ -qDebug() << "Error in initialization:" << err; -#endif - -} - -//--------------------------------------------------------------- -// TestMsg::TestMsg -//--------------------------------------------------------------- -TestMsg::~TestMsg() -{ - if(smsClientMtm) - { - delete smsClientMtm; - smsClientMtm = NULL; - } - - if (iMtmRegistry) - { - delete iMtmRegistry; - iMtmRegistry = NULL; - } - - if (iSession) - { - delete iSession; - iSession = NULL; - } -} - -//--------------------------------------------------------------- -// TestMsg::createSCSettings -//--------------------------------------------------------------- -void TestMsg::createSCSettings() -{ - smsClientMtm = static_cast (iMtmRegistry->NewMtmL(KUidMsgTypeSMS)); - - TMsvSelectionOrdering ordering; - - CMsvEntry* root = CMsvEntry::NewL(smsClientMtm->Session(), - KMsvRootIndexEntryId, - ordering); - - CSmsAccount* smsAccount = CSmsAccount::NewLC(); - - CSmsSettings* settings = CSmsSettings::NewL(); - CleanupStack::PushL(settings); - smsAccount->LoadSettingsL(*settings); - - TMsvEntry entry; - entry.iMtm = KUidMsgTypeSMS; - entry.iType = KUidMsvServiceEntry; - entry.SetReadOnly(EFalse); - entry.SetVisible(EFalse); - entry.iDate.UniversalTime(); - entry.iDetails.Set(_L("Nokiatest")); - - root->SetEntryL(KMsvRootIndexEntryId); - root->CreateL(entry); - - QString serviceCenter01(SERVICE_CENTER_01); - QString serviceCenter02(SERVICE_CENTER_02); - HBufC* sC01 = XQConversions::qStringToS60Desc(serviceCenter01); - HBufC* sC02 = XQConversions::qStringToS60Desc(serviceCenter02); - CleanupStack::PushL(sC01); - CleanupStack::PushL(sC02); - settings->AddServiceCenterL(_L("Nokia"), *sC01); - settings->AddServiceCenterL(_L("Nokia"), *sC02); - CleanupStack::PopAndDestroy(sC02); - CleanupStack::PopAndDestroy(sC01); - settings->SetDefaultServiceCenter(1); - settings->SetValidityPeriod(ESmsVPWeek); - settings->SetReplyQuoted(ETrue); - settings->SetRejectDuplicate(ETrue); - settings->SetDelivery(ESmsDeliveryImmediately); - settings->SetDeliveryReport(EFalse); - settings->SetReplyPath(EFalse); - settings->SetMessageConversion(ESmsConvPIDNone); - settings->SetCanConcatenate(ETrue); - settings->SetCharacterSet(TSmsDataCodingScheme::ESmsAlphabet7Bit); - settings->SetValidityPeriodFormat(TSmsFirstOctet::ESmsVPFInteger); - settings->SetStatusReportHandling(CSmsSettings::EMoveReportToInboxVisible); - settings->SetSpecialMessageHandling(CSmsSettings::EMoveReportToInboxVisible); - settings->SetSmsBearer(CSmsSettings::ESmsBearerCircuitPreferred); - settings->SetCommDbAction(CSmsSettings::ENone); - settings->SetSmsBearerAction(CSmsSettings::ENone); - smsAccount->SaveSettingsL(*settings); - - CleanupStack::PopAndDestroy(settings); - CleanupStack::PopAndDestroy(smsAccount); -} - -//--------------------------------------------------------------- -// TestMsg::createSMS -//--------------------------------------------------------------- -void TestMsg::createSMS() -{ - int err; - TRAP(err,createSMSL(KMsvGlobalInBoxIndexEntryId,ETrue)); - #ifdef _DEBUG_TRACES_ -qDebug() << "Error in creating SMS:" << err; -#endif - -} - -//--------------------------------------------------------------- -// TestMsg::createMMS -//--------------------------------------------------------------- -void TestMsg::createMMS() -{ - int err; - TRAP(err,createMMSL(KMsvGlobalInBoxIndexEntryId,ETrue)); - #ifdef _DEBUG_TRACES_ -qDebug() << "Error in creating MMS:" << err; -#endif - -} - -//--------------------------------------------------------------- -// TestMsg::initL -//--------------------------------------------------------------- -void TestMsg::initL() -{ - iSession = CMsvSession::OpenSyncL(*this); - iMtmRegistry = CClientMtmRegistry::NewL(*iSession); -} - -//--------------------------------------------------------------- -// TestMsg::createSMSL -//--------------------------------------------------------------- -void TestMsg::createSMSL(TMsvId aFolderId, TBool aUnReadFlag) -{ - CSmsClientMtm *smsClientMtm = - static_cast (iMtmRegistry->NewMtmL(KUidMsgTypeSMS)); - CleanupStack::PushL(smsClientMtm); - //Create entry from this index entry - - smsClientMtm->SwitchCurrentEntryL(aFolderId); - smsClientMtm->CreateMessageL(KUidMsgTypeSMS.iUid); - TMsvEntry indexEntry = smsClientMtm->Entry().Entry(); - indexEntry.SetInPreparation(ETrue); - indexEntry.iMtm = KUidMsgTypeSMS; - indexEntry.iType = KUidMsvMessageEntry; - indexEntry.iServiceId = smsClientMtm->ServiceId(); - indexEntry.iDate.HomeTime(); - //AddBody - QString body(TEST_MSG_BODY); - - HBufC* bodyText = XQConversions::qStringToS60Desc(body); - if (bodyText) - { - CleanupStack::PushL(bodyText); - CRichText & body = smsClientMtm->Body(); - body.Reset(); - body.InsertL(0, *bodyText); - - TBuf<32> buf; - buf.Copy(bodyText->Left(32)); - indexEntry.iDescription.Set(buf); - - CleanupStack::PopAndDestroy(bodyText); - } - - // Add addressee - //Add Address - QString recipient(TEST_MSG_FROM1); - // convert from QString to HBufC - HBufC* addr = XQConversions::qStringToS60Desc(recipient); - if (addr) - { - CleanupStack::PushL(addr); - TBuf<32> name; - name.Copy(addr->Left(32)); - indexEntry.iDetails.Set(name); - - if (aFolderId == KMsvDraftEntryId || aFolderId - == KMsvGlobalOutBoxIndexEntryId) - { - smsClientMtm->AddAddresseeL(*addr, TPtrC()); - indexEntry.SetSendingState(KMsvSendStateWaiting); - } - else if (aFolderId == KMsvSentEntryId || aFolderId - == KMsvGlobalInBoxIndexEntryId) - { - CSmsHeader& smsHeader = smsClientMtm->SmsHeader(); - smsHeader.SetFromAddressL(*addr); - } - CleanupStack::PopAndDestroy(addr); - } - - // final fine tuning - indexEntry.SetAttachment(EFalse); - indexEntry.SetVisible(ETrue); - indexEntry.SetInPreparation(EFalse); - - if (aFolderId == KMsvGlobalInBoxIndexEntryId) - { - if (aUnReadFlag) - { - indexEntry.SetUnread(ETrue); - } - indexEntry.SetNew(ETrue); - } - indexEntry.SetComplete(ETrue); - smsClientMtm->Entry().ChangeL(indexEntry); - smsClientMtm->SaveMessageL(); - - CleanupStack::PopAndDestroy(smsClientMtm); -} - -//--------------------------------------------------------------- -// TestMsg::createMMSL -//--------------------------------------------------------------- -void TestMsg::createMMSL(TMsvId aFolderId, TBool aUnReadFlag) -{ - CMmsClientMtm - *mmsClientMtm = - static_cast - (iMtmRegistry->NewMtmL(KUidMsgTypeMultimedia)); - CleanupStack::PushL(mmsClientMtm); - //Create entry from this index entry - - mmsClientMtm->SwitchCurrentEntryL(aFolderId); - mmsClientMtm->CreateMessageL(mmsClientMtm->DefaultServiceL()); - - TMsvEntry indexEntry = mmsClientMtm->Entry().Entry(); - indexEntry.SetInPreparation(ETrue); - indexEntry.iMtm = KUidMsgTypeMultimedia; - indexEntry.iType = KUidMsvMessageEntry; - indexEntry.iServiceId = mmsClientMtm->DefaultServiceL(); - indexEntry.iDate.HomeTime(); - - //Subject - QString subject(TEST_MSG_SUBJECT); - - HBufC* sub = XQConversions::qStringToS60Desc(subject); - if (sub) - { - CleanupStack::PushL(sub); - - TBuf<32> buf; - buf.Copy(sub->Left(32)); - indexEntry.iDescription.Set(buf); - - mmsClientMtm->SetSubjectL(*sub); - CleanupStack::PopAndDestroy(sub); - } - - // Add addressee - //Add Address - QString recipient(TEST_MSG_FROM1); - // convert from QString to HBufC - HBufC* addr = XQConversions::qStringToS60Desc(recipient); - if (addr) - { - CleanupStack::PushL(addr); - TBuf<32> name; - name.Copy(addr->Left(32)); - indexEntry.iDetails.Set(name); - - if (aFolderId == KMsvDraftEntryId || aFolderId - == KMsvGlobalOutBoxIndexEntryId) - { - mmsClientMtm->AddAddresseeL(*addr); - indexEntry.SetSendingState(KMsvSendStateWaiting); - } - else if (aFolderId == KMsvSentEntryId || aFolderId - == KMsvGlobalInBoxIndexEntryId) - { - mmsClientMtm->SetSenderL(*addr); - mmsClientMtm->AddAddresseeL(*addr); - } - CleanupStack::PopAndDestroy(addr); - } - - // final fine tuning - indexEntry.SetVisible(ETrue); - indexEntry.SetInPreparation(EFalse); - - if (aFolderId == KMsvGlobalInBoxIndexEntryId) - { - if (aUnReadFlag) - { - indexEntry.SetUnread(ETrue); - } - indexEntry.SetNew(ETrue); - } - - //body text - QString bodyText(TEST_MSG_BODY); - HBufC* text = XQConversions::qStringToS60Desc(bodyText); - if (text) - { - CleanupStack::PushL(text); - - //we may need some conversion of text here - const TInt KMmsMaxBytesPerCharacter = 4; - HBufC8* buffer = HBufC8::NewL( text->Length() * KMmsMaxBytesPerCharacter ); - CleanupStack::PushL( buffer ); - TPtr8 buf8 = buffer->Des(); - - // get an access to the message store - CMsvStore* store = mmsClientMtm->Entry().EditStoreL(); - CleanupStack::PushL(store); - - CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL(); - CleanupStack::PushL( mimeHeaders ); - - CMsvAttachment* attaInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile); - CleanupStack::PushL( attaInfo ); - - TPtrC8 contentType; - contentType.Set( KMmsTextPlain ); - - TInt position = contentType.Find( KMmsSlash8 ); - mimeHeaders->SetContentTypeL( contentType.Left( position ) ); - mimeHeaders->SetContentSubTypeL( contentType.Mid( position + 1 ) ); - attaInfo->SetMimeTypeL( contentType ); - attaInfo->SetAttachmentNameL( _L("body.txt") ); - - mimeHeaders->SetMimeCharset( KMmsUtf8 ); - mimeHeaders->SetSuggestedFilenameL( _L("body.txt") ); - - // if conversion fails, something is really seriously wrong - TInt error = CnvUtfConverter::ConvertFromUnicodeToUtf8( buf8, *text ); - - attaInfo->SetSize( buf8.Length() ); - mimeHeaders->StoreL( *attaInfo ); // Mime headers are streamed into atta info - - MMsvAttachmentManagerSync& attaManSync = store->AttachmentManagerExtensionsL(); - RFile textFile; - - attaManSync.CreateAttachmentL( _L("body.txt"), textFile, attaInfo ); - CleanupStack::Pop( attaInfo ); //ownership was transferred. - - CleanupClosePushL( textFile ); - - //get attachement id, we need it incase of failure - TMsvAttachmentId attachmentId = attaInfo->Id(); - // Now our file handle is open for writing - if ( buf8.Length()> 0 ) - { - textFile.Write( buf8 ); - error = textFile.Flush(); - } - // we must always close - CleanupStack::PopAndDestroy( &textFile ); // close textFile - CleanupStack::PopAndDestroy( mimeHeaders ); - - store->CommitL(); - CleanupStack::PopAndDestroy(store); - CleanupStack::PopAndDestroy( buffer ); - CleanupStack::PopAndDestroy(text); - } - - indexEntry.SetComplete(ETrue); - mmsClientMtm->Entry().ChangeL(indexEntry); - mmsClientMtm->SaveMessageL(); - - // cleanup - CleanupStack::PopAndDestroy(mmsClientMtm); -} - -void TestMsg::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, - TAny* /*aArg2*/, TAny* /*aArg3*/) -{ -} - -void TestMsg::deleteMessage(int msgId) -{ - CMsvEntry* cEntry = iSession->GetEntryL(KMsvGlobalInBoxIndexEntryId); - CleanupStack::PushL(cEntry); - - CMsvEntry* entry = iSession->GetEntryL(msgId); - CleanupStack::PushL(entry); - - TMsvEntry tEntry = entry->Entry(); - tEntry.SetReadOnly(EFalse); - entry->ChangeL(tEntry); - - cEntry->DeleteL(msgId); - CleanupStack::PopAndDestroy(entry); - CleanupStack::PopAndDestroy(cEntry); - -} - -void TestMsg::initSimTsyL() -{ - _LIT(KDefaultTsyName, "SIM"); - TPtrC defaultTsyName(KDefaultTsyName); - HBufC* defaultTsyNameBuf = defaultTsyName.AllocLC(); - TInt testNumber = 0; - - initializeSimTsyL(testNumber, defaultTsyNameBuf); - - CMDBSession* dbSession = CMDBSession::NewL(CMDBSession::LatestVersion()); - CleanupStack::PushL(dbSession); - - CMDBRecordLink - *modemBearerRecordSet = new (ELeave) CMDBRecordLink< - CCDModemBearerRecord> (KCDTIdGlobalSettingsRecord - | KCDTIdModemPhoneServicesSMS); - CleanupStack::PushL(modemBearerRecordSet); - - modemBearerRecordSet->SetRecordId(1); - //Load field container with data from database - TRAPD(err, modemBearerRecordSet->LoadL(*dbSession)); - CCDModemBearerRecord - *modemRecord = - static_cast - (CCDRecordBase::RecordFactoryL(KCDTIdModemBearerRecord)); - CleanupStack::PushL(modemRecord); - - /*! - * Set the record ID to that previously read from - * CCDGlobalSettingsRecord.iModemForPhoneServicesAndSMS - */ - modemRecord->SetRecordId(*modemBearerRecordSet); - - //Load record container with data from database - modemRecord->LoadL(*dbSession); - - modemRecord->iTsyName.SetMaxLengthL(defaultTsyNameBuf->Des().Length()); - modemRecord->iTsyName = defaultTsyNameBuf->Des(); - modemRecord->ModifyL(*dbSession); - - CleanupStack::PopAndDestroy(4); -} - -void TestMsg::initializeSimTsyL(TInt aTestNumber, HBufC* aTsyName) -{ - //Initialize TSY using the System Agent - TInt testState; - if (KErrNone != RProperty::Get(KUidPSSimTsyCategory, - KPSSimTsyTestNumber, - testState)) - { - User::LeaveIfError(RProperty::Define(KUidPSSimTsyCategory, - KPSSimTsyTestNumber, - RProperty::EInt)); - } - - User::LeaveIfError(RProperty::Set(KUidPSSimTsyCategory, - KPSSimTsyTestNumber, - aTestNumber)); - if (KErrNone != RProperty::Get(KUidSystemCategory, - KMsvTestUidPhonePwrValue, - testState)) - { - User::LeaveIfError(RProperty::Define(KUidSystemCategory, - KMsvTestUidPhonePwrValue, - RProperty::EInt)); - } - User::LeaveIfError(RProperty::Set(KUidSystemCategory, - KMsvTestUidPhonePwrValue, - EMsvTestPhoneOn)); - - User::LeaveIfError(RProperty::Get(KUidPSSimTsyCategory, - KPSSimTsyTestNumber, - aTestNumber)); - - RTelServer etelServer; - TInt err = etelServer.Connect(); - - if (err != KErrNone) - { - return; - } - User::LeaveIfError(etelServer.LoadPhoneModule(aTsyName->Des())); - - /*! - * Find the phone corresponding to this TSY and open a number of - * handles on it - */ - TInt numPhones; - User::LeaveIfError(etelServer.EnumeratePhones(numPhones)); - TBool found = EFalse; - - RMobilePhone iPhone; - while (!found && numPhones--) - { - TName phoneTsy; - User::LeaveIfError(etelServer.GetTsyName(numPhones, phoneTsy)); - if (phoneTsy.CompareF(aTsyName->Des()) == KErrNone) - { - found = ETrue; - RTelServer::TPhoneInfo info; - User::LeaveIfError(etelServer.GetPhoneInfo(numPhones, info)); - CleanupClosePushL(iPhone); - User::LeaveIfError(iPhone.Open(etelServer, info.iName)); - User::LeaveIfError(iPhone.Initialise()); - CleanupStack::PopAndDestroy(&iPhone); - } - } -} - -#endif //TEST_MSG_H diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.cpp --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.cpp Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,249 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - */ - -#include "testsmsplugin.h" -#include -#include "debugtraces.h" - -#include -#include - -#include "convergedmessage.h" -#include "TestMsg.h" -#include "convergedmessageid.h" -#include "unieditorsmsplugin.h" -#include "messageserviceaction.h" -//--------------------------------------------------------------- -// TestSmsPlugin::initTestCase -//--------------------------------------------------------------- -void TestSmsPlugin::initTestCase() -{ - msgPlugin = new UniEditorSmsPlugin(); - testMsg = new TestMsg(); - // QVERIFY(msgPlugin != 0); - smsId = -1; - mmsId = -1; -} - -//--------------------------------------------------------------- -// TestSmsPlugin::cleanupTestCase -//--------------------------------------------------------------- -void TestSmsPlugin::cleanupTestCase() -{ - delete msgPlugin; - delete testMsg; -} - -//--------------------------------------------------------------- -// TestSmsPlugin::init -//--------------------------------------------------------------- - -void TestSmsPlugin::init() -{ -} - -//--------------------------------------------------------------- -// TestSmsPlugin::cleanup -//--------------------------------------------------------------- -void TestSmsPlugin::cleanup() -{ -} - -//--------------------------------------------------------------- -// TestSmsPlugin::testSendSMS -//--------------------------------------------------------------- -void TestSmsPlugin::testSendReceiveSMS() -{ - testMsg->createSCSettings(); - - testMsg->initSimTsyL(); - //TODO: Should uncomment the watcher code below while executing the test case in text shell mode. - //Also the watcher code should be commented while executing in UI mode. - /* RProcess watcherProcess; - _LIT(KWatcherExe, "z:\\system\\libs\\watcher.exe"); - User::LeaveIfError(watcherProcess.Create(KWatcherExe, KNullDesC)); - watcherProcess.Resume(); - QTest::qWait(5000);*/ - TBool result = msgPlugin->validateService(ETrue); - result = msgPlugin->validateService(EFalse); - result = msgPlugin->isServiceValid(); - createAndSend(msgPlugin->messageType()); - testReceived(msgPlugin->messageType()); -} - -//--------------------------------------------------------------- -// TestSmsPlugin::createAndSend -//--------------------------------------------------------------- -void TestSmsPlugin::createAndSend(int type) -{ - - ConvergedMessage message; - message.setMessageType((ConvergedMessage::MessageType) type); - message.setBodyText(QString(TEST_MSG_BODY)); - ConvergedMessageAddress address1; - address1.setAddress(QString(TEST_MSG_TO3)); - - message.addToRecipient(address1); - message.setPriority(ConvergedMessage::Normal); - if (type == ConvergedMessage::Mms) - { - ConvergedMessageAddress address2; - address2.setAddress(QString(TEST_MSG_FROM2)); - address2.setAlias(QString(TEST_MSG_ALIAS2)); - message.addCcRecipient(address2); - message.addBccRecipient(address2); - - message.setSubject(QString(TEST_MSG_SUBJECT)); - message.setPriority(ConvergedMessage::Normal); - } - - int ret = -1; - QBENCHMARK - { - long int id = msgPlugin->convertTo(&message); - msgPlugin->send(id); - } -} - -//--------------------------------------------------------------- -// TestSmsPlugin::testReceived -//--------------------------------------------------------------- -void TestSmsPlugin::testReceived(int type) -{ -MessageServiceAction* messageAction = new MessageServiceAction(this); - QVERIFY(messageAction != 0); - - //register user defined object to meta system. - qRegisterMetaType("ConvergedMessage*"); - - //signal spy. - //listen to added event - QSignalSpy spyAdd( messageAction, - SIGNAL(messageAdded(ConvergedMessage*, QString))); - //signal spy. - //listen to updated event - QSignalSpy spyUpdate( messageAction, - SIGNAL(messageUpdated(ConvergedMessage*, QString))); - //will force stub_clientmanager to emit messageUpdated. - messageAction->registerForNotification(); - //register user defined object to meta system. - - // wait for the response to come - QTest::qWait(5000); - - //check signals - int countAdd = -1; - countAdd = spyAdd.count(); - - ConvergedMessage* message = 0; - QString serviceId(""); - - if (countAdd) - { - //verify added event - void * temp = const_cast (spyAdd.at(0).at(0).data()); - message = *reinterpret_cast (temp); - serviceId = spyAdd.at(0).at(1).toString(); - QVERIFY(message != 0); - validateMsg(*message, serviceId); - } - - int countUpdate = -1; - countUpdate = spyUpdate.count(); - message = 0; - - for (int i = countUpdate; i > 0; --i) - { - //verify updated event - void * temp = const_cast (spyUpdate.at(i-1).at(0).data()); - message = *reinterpret_cast (temp); - if (ConvergedMessage::Inbox == message->location()) - { - serviceId = spyUpdate.at(i-1).at(1).toString(); - break; - } - } - if (message) - { - validateMsg(*message, serviceId); - } - delete message; -} - -//--------------------------------------------------------------- -// TestSmsPlugin::validateMsg -//--------------------------------------------------------------- -void TestSmsPlugin::validateMsg(const ConvergedMessage& message, - const QString& serviceId) -{ -#ifdef _DEBUG_TRACES_ - qDebug() << "....message received....."; -#endif - - //process incoming messages - if (message.location() == ConvergedMessage::Inbox) - { - int msgId; - if (message.id()) - { - msgId = message.id()->getId(); - } - ConvergedMessageAddressList array = message.toAddressList(); - if (array.count() > 0) - { - if (array[0]) - QCOMPARE(array[0]->address(),QString(TEST_MSG_FROM1)); - } - ConvergedMessageAddress *fromAddr = message.fromAddress(); - if (fromAddr) - { - QCOMPARE(fromAddr->address(),QString(TEST_MSG_FROM1)); - } - - QCOMPARE(serviceId,QString(TEST_SERVICE_ID)); - - if (message.messageType() == ConvergedMessage::Mms) - { - mmsId = msgId; - QCOMPARE(message.subject(), QString(TEST_MSG_SUBJECT)); - } - else if (message.messageType() == ConvergedMessage::Sms) - { - smsId = msgId; - QCOMPARE(message.bodyText(), QString(TEST_MSG_BODY)); - } - } - else if (message.location() == ConvergedMessage::Sent) - { - ConvergedMessageAddressList array = message.toAddressList(); - if (array.count() > 0) - { - if (array[0]) - QCOMPARE(array[0]->address(),QString(TEST_MSG_FROM1)); - } - - QCOMPARE(serviceId,QString(TEST_SERVICE_ID)); - - if (message.messageType() == ConvergedMessage::Mms) - { - QCOMPARE(message.subject(), QString(TEST_MSG_SUBJECT)); - } - else if (message.messageType() == ConvergedMessage::Sms) - { - QCOMPARE(message.bodyText(), QString(TEST_MSG_BODY)); - } - } -} diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.h --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.h Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - */ - -#ifndef TEST_SMS_PLUGIN_H -#define TEST_SMS_PLUGIN_H - -#ifdef BUILD_TEST_DLL -#define TEST_EXPORT Q_DECL_EXPORT -#else -#define TEST_EXPORT Q_DECL_IMPORT -#endif - -#include -#include - -class UniEditorSmsPlugin; -class ConvergedMessage; -class TestMsg; - -class TEST_EXPORT TestSmsPlugin: public QObject - { - Q_OBJECT - -private slots: - //called by frame work. - void initTestCase();//called before the first testfunction is executed. - void cleanupTestCase();//called after the last testfunction was executed. - void init();//called before each testfunction is executed. - void cleanup();//called after every testfunction. - - //test cases. - void testSendReceiveSMS(); //test sending & Receiveig of sms - -private: - void createAndSend(int type); - void testReceived(int type); - void validateMsg(const ConvergedMessage& message, const QString& serviceId); - -private: - UniEditorSmsPlugin* msgPlugin; - TestMsg *testMsg; - int smsId; - int mmsId; - }; -#endif //TEST_SMS_PLUGIN_H diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.ini --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.ini Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -//this file is used to provide predefined set of input data. - -//eg. -const char TEST_SERVICE_SMS[] = "SMS"; -const char TEST_SERVICE_ID[] = "messaging.mserver"; -const char TEST_SERVICE_SMS_ID[] = "messaging.mserver.sms"; -const char TEST_SERVICE_MMS_ID[] = "messaging.mserver.mms"; -const char TEST_SERVICE_MMS[] = "MMS"; -const char TEST_MSG_BODY[] = "TestTextE_1_2"; -const char TEST_MSG_RECIEPIENT[] = "Javaid Nabi<+919741596546>"; -const char TEST_MSG_FROM1[] = "+44111111111"; -const char SERVICE_CENTER_01[] = "+447802000332"; -const char SERVICE_CENTER_02[] = "+919845087001"; -const char TEST_MSG_ALIAS1[] = "Javaid Nabi"; -const char TEST_MSG_FROM2[] = "9797979797"; -const char TEST_MSG_ALIAS2[] = "Rajesh Batchu"; -const char TEST_MSG_SUBJECT[] = "Message Subject"; -const char TEST_SERVICE_NAME_MMS[] = "messaging.mserver.testservice.MMS"; -const char TEST_SENDER[] = "DummySender"; -const char TEST_ATTACHMENT[] = "c:/sample.txt"; -const char TEST_ATTACHMENT2[] = "c:/HelloWorld.smil"; -const char TEST_ATTACHMENT3[] = "c:/ImageFile.smil"; -const char TEST_ATTACHMENT4[] = "c:/SmileyFace.gif"; -const char TEST_ATTACHMENT5[] = "c:/testfile.txt"; -const char TEST_MSG_TO3[] = "SS<+44111111111>"; -const char TEST_CC[] = "DummyCCAddress"; -const char TEST_BCC[] = "DummyBCCAddress"; \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.pro --- a/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testsmsgplugin/testsmsplugin.pro Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -QT += testlib -QT -= gui - -TEMPLATE = lib -TARGET = test-sms-plugin - - -INCLUDEPATH += . -INCLUDEPATH += ../../../../../../inc -INCLUDEPATH += ../../../../unieditorutils/inc -INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - -DEFINES += BUILD_TEST_DLL - -SOURCES += \ - testsmsplugin.cpp \ - ../../src/unieditorsmsplugin.cpp \ - ../../src/unieditorsmsplugin_p.cpp - - -# Input -HEADERS += \ - testsmsplugin.h \ - testmsg.h \ - ../../inc/unieditorsmsplugin.h \ - ../../inc/unieditorsmsplugin_p.h - - -SYMBIAN_PLATFORMS = WINSCW ARMV5 - symbian { - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.EPOCSTACKSIZE = 0x8000 - TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 - TARGET.EPOCALLOWDLLDATA = 1 - } - -defBlock = \ - "$${LITERAL_HASH}if defined(EABI)" \ - "DEFFILE ../eabi/test_sms_plugin.def" \ - "$${LITERAL_HASH}else" \ - "DEFFILE ../bwins/test_sms_plugin.def" \ - "$${LITERAL_HASH}endif" - -MMP_RULES += defBlock - - LIBS += -leuser \ - -lconvergedmessageutils \ - -lxqutils \ - -lMsgMedia \ - -leditorgenutils \ - -lcone \ - -leikcoctl \ - -leikcore \ - -leikdlg \ - -lmsgs \ - -letext \ - -lgsmu \ - -lmmsgenutils \ - -lefsrv \ - -lestor \ - -lsmcm \ - -lCommonEngine \ - -lbafl \ - -lCdlEngine \ - -lFeatMgr \ - -lapmime \ - -lapgrfx \ - -lcharconv \ - -lInetProtUtil \ - -lsmildtd \ - -lxmldom \ - -lxmlparser \ - -lcone \ - -lQtCore \ - -letel \ - -lcommdb \ - -lcommsdat \ - -letelmm \ - -lgenericclient diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/data/TestUnieditorSMSPluginSample.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/data/TestUnieditorSMSPluginSample.txt Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,1 @@ +TestTextE_1_1 \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/data/TestUnieditorSMSPluginSample.vcf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/data/TestUnieditorSMSPluginSample.vcf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,33 @@ +BEGIN:VCARD +VERSION:2.1 +N;LANGUAGE=en-us:name;test +FN:test name +ORG:nokia +TITLE:sse +TEL;CELL;VOICE:98465465214 +X-MS-OL-DEFAULT-POSTAL-ADDRESS:0 +EMAIL;PREF;INTERNET:testname@nokia.com +X-MS-CARDPICTURE;TYPE=JPEG;ENCODING=BASE64: + /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQY + GBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYa + KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAAR + CACUACcDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA + AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK + FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG + h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl + 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA + AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk + NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE + hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk + 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD6UdwpAPU0oIwSTxVeQ7nOPoKRj2B4FAEk + k4/g59zREMgk9fWoFGSKsr8qc+maAIJPnmx6cUUkIy5aigBw4yfSkpT93680lABEMtUs52xk + evFJAOabcHkLQA1DsiJ70US8Kq0UAK3Xim0vagdfpQBYhHy5qufmm/GrJ+SP6Cq0PLE0AJMc + vj0opjNlyfeigCTtTohyKb2qaEfyxQAlw2EA9ajT5YyfWluDlwPQUFSVCryeM0AV6KmEaLy5 + 59KKAFHJxU0ZwoxyTzSBoz0Xn6UOSqEjigBDGN2X5J7CmSSEYCjbSRZLEnkgUyQgufSgBEG5 + vmNFNAycCigCzEPmH50s56D8adEvyk/hTJGXeeMkcc9BQAkQIXPvUeFX7xyfQVK5Pl4OBwBx + UFAAXPRcKPaimUUAaJ4TJ7VUA3MPerMxxGfeoI+pPoKACY8Adjk1FT5fv49OKZQAyiiigC3c + HkD0psXC89zSSHLNTjwn0H86AISckmkoPWigBlFFFAFoPuIBHWnOVI5xzTI+pPoKSTqB6CgA + 2Ken6GmGP3/MU09aAxHQkUABRscc/Q0Ubz3AP4UUATp9xvwpj/fb60UUARnrRRRQAyiiigD/ + 2Q== + +END:VCARD diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/data/TestUnieditorSMSPluginSample.vcs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/data/TestUnieditorSMSPluginSample.vcs Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,18 @@ +BEGIN:VCALENDAR +VERSION:1.0 +BEGIN:VEVENT +UID:3ECjzCAm4EI6h72lU94XL2 +SUMMARY:Nokia Meet +DESCRIPTION:Wow... +DTSTART:20100827T023000Z +DTEND:20100827T103000Z +X-EPOCAGENDAENTRYTYPE:APPOINTMENT +CLASS:PRIVATE +LOCATION:Nokia +SEQUENCE:0 +X-METHOD:NONE +LAST-MODIFIED:20100818T131951Z +PRIORITY:2 +X-SYMBIAN-LUID:6 +END:VEVENT +END:VCALENDAR diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/inc/testunieditorsmsplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/inc/testunieditorsmsplugin.h Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Main test class declaration for UnieditorSMSPlugin + */ + +#ifndef TEST_UNIEDITORSMS_PLUGIN_H +#define TEST_UNIEDITORSMS_PLUGIN_H + +#ifdef BUILD_TESTUNIEDITORSMSPLUGIN_DLL +#define TEST_EXPORT Q_DECL_EXPORT +#else +#define TEST_EXPORT Q_DECL_IMPORT +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // CRichText +#include // for Message type IDs +#include // for CMmsClientMtm +#include //Attachemt mimeheader +#include //Attachment manager +#include + +class CMsvSession; +class CClientMtmRegistry; +class CSmsClientMtm; +class UniEditorSmsPlugin; +class ConvergedMessage; + +//Main Tets Class Declaration +class TEST_EXPORT TestUnieditorSMSPlugin: public QObject, public MMsvSessionObserver + { + Q_OBJECT + +public: //MMsvSessionObserver + /** + * Handles the various events while sending SMS + **/ + virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + +private slots: + /** + * Initialises the whole Test + **/ + void initTestCase();//called before the first testfunction is executed. + + /** + * Initialises each Test Case + **/ + void init();//called before each testfunction is executed. + + /** + * Create a SMS + **/ + void CreateSMS(); + + /** + * Send and Test the created SMS + **/ + void SendAndTestSMS(); + + /** + * Create a SMS with Text Attachment + **/ + void CreateSMSWithTextAttachment(); + + /** + * Test the SMS with Text Attachment + **/ + void TestSMSWithTextAttachment(); + + /** + * Create a SMS with VCard Attachment + **/ + void CreateSMSWithVCardAttachment(); + + /** + * Test the SMS with VCard Attachment + **/ + void TestSMSWithVCardAttachment(); + + /** + * Create a SMS with VCal Attachment + **/ + void CreateSMSWithVCalAttachment(); + + /** + * Test the SMS with VCal Attachment + **/ + void TestSMSWithVCalAttachment(); + + /** + * Create an Email SMS + **/ + void CreateEmailSMS(); + + /** + * Test the Email SMS + **/ + void TestEmailSMS(); + + /** + * Create a SMS + **/ + void CreateSMSForExtraOptions(); + + /** + * Test the SMS + **/ + void TestSMSForExtraOptions(); + + /** + * Cleans up each Test Case + **/ + void cleanup();//called after every testfunction. + + /** + * Cleans up the whole Test Case + **/ + void cleanupTestCase();//called after the last testfunction was executed. + +private: + /** + * Creates the Service Center Settings + **/ + void createSCSettingsL(); + + /** + * Initialise the SMS MTM + **/ + void initL(); + + /** + * Create the SMS Service + **/ + TMsvId CreateSmsServiceL(); + + /** + * Returns SMS Service Id + **/ + TMsvId ServiceIdL(); + + /** + * Creates default SIMTSY Settings + **/ + void CreateDefaultSettingsL(TMsvId aServiceId); + + /** + * Reads the default SIMTSY Settings + **/ + void ReadDefaultSettingsFromSharedDataL(CSmsSettings* aServiceSettings); + +private: + /** + * iCenRepSession + **/ + CRepository* iCenRepSession; + + /** + * iSession - SMS MTM Session + **/ + CMsvSession* iSession; + + /** + * iMtmRegistry - SMS MTM Registry + **/ + CClientMtmRegistry* iMtmRegistry; + + /** + * iSmsClientMtm - SMS MTM + **/ + CSmsClientMtm* iSmsClientMtm; + + /** + * msgPlugin - SMS Unieditor Plugin + **/ + UniEditorSmsPlugin* msgPlugin; + + /** + * smsId - Id of the SMS + **/ + TMsvId smsId; + }; +#endif //TEST_UNIEDITORSMS_PLUGIN_H diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/inc/testunieditorsmsplugin.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/inc/testunieditorsmsplugin.ini Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Input data Set File for TestUnieditorSMSPlugin test cases + */ + +const char TEST_MSG_BODY[] = "TestTextE_1_1"; +const char TEST_MSG_FROM1[] = "+44111111111"; +const char SERVICE_CENTER_01[] = "+447802000332"; +const char SERVICE_CENTER_02[] = "+919845087001"; +const char TEST_MSG_ALIAS1[] = "Javaid Nabi"; +const char TEST_MSG_SUBJECT[] = "Message Subject"; +const char TEST_TEXT_ATTACHMENT[] = "c:\\data\\TestUnieditorSMSPluginSample.txt"; +const char TEST_VCAL_ATTACHMENT[] = "c:\\data\\TestUnieditorSMSPluginSample.vcs"; +const char TEST_VCARD_ATTACHMENT[] = "c:\\data\\TestUnieditorSMSPluginSample.vcf"; +const char TEST_MSG_TO1[] = "SS<+44111111111>"; +const char TEST_MSG_TO2[] = "+44111111111"; +const char TEST_MSG_TO3[] = "test@test.com"; + +const TInt KDefDeliveryReport = 1; +const TInt KDefValidityPeriod = 1440; +const TInt KDefMessageConversion = 0; +const TInt KDefPreferredConnection = 3; +const TInt KDefReplyViaSameCentre = 0; + +_LIT( KSmsService, "Sms Service" ); diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/src/testunieditorsmsplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/src/testunieditorsmsplugin.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,888 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Main test class definition for UnieditorSMSPlugin + */ + +#include +#include +#include +#include "debugtraces.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "convergedmessage.h" +#include "convergedmessageid.h" +#include "unieditorsmsplugin.h" +#include "testunieditorsmsplugin.h" +#include "testunieditorsmsplugin.ini" + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::HandleSessionEventL +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) +{ + +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::initTestCase +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::initTestCase() +{ + //Initialise SMS MTM + initL(); + + //Initialise Service Center Settings + createSCSettingsL(); + + //Instantiate Unieditor SMS plugin + msgPlugin = new UniEditorSmsPlugin; + QVERIFY2(msgPlugin != NULL, "SMS Unieditor Plugin Not created"); + + //Validate SMS services + QVERIFY(msgPlugin->validateService() != 0); + QVERIFY(msgPlugin->isServiceValid() != 0); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::init +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::init() +{ +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::CreateSMS +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::CreateSMS() +{ + //Setting Encoding settings for Unicode + msgPlugin->setEncodingSettings(EFalse, ESmsEncodingNone, -1); + + //Constructing a new SMS + ConvergedMessage message; + message.setBodyText(QString(TEST_MSG_BODY)); + + ConvergedMessageAddress address1; + address1.setAddress(QString(TEST_MSG_TO1)); + address1.setAlias(QString(TEST_MSG_ALIAS1)); + message.addToRecipient(address1); + + message.setPriority(ConvergedMessage::Normal); + + //Sending SMS to drafts folder + smsId = msgPlugin->convertTo(&message); + QVERIFY(smsId != -1); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::SendAndTestSMS +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::SendAndTestSMS() +{ + QTest::qWait(1000); + + //Checking SMS in drafts folder + CMsvEntry* rootentry = iSession->GetEntryL(KMsvDraftEntryId); + CMsvEntrySelection* messages = rootentry->ChildrenL(); + TInt count = rootentry->Count(); + + QVERIFY(count > 0); + + TMsvId draftMsgId = messages->At(count - 1); + QVERIFY2(draftMsgId == smsId, "SMS Not Sent to Drafts Folder"); + + ConvergedMessage* message = msgPlugin->convertFrom(draftMsgId); + QVERIFY(message != NULL); + QVERIFY(QString(TEST_MSG_TO1).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + QVERIFY(QString(TEST_MSG_ALIAS1).contains(message->fromAddress()->alias(), Qt::CaseInsensitive) == true); + QVERIFY(QString(TEST_MSG_BODY).compare(message->bodyText(), Qt::CaseInsensitive) == 0); + + TInt numOfRemainingChars; + TInt numOfPDUs; + TBool unicodeMode; + TSmsEncoding alternativeEncodingType; + + QString bodyMessage = message->bodyText(); + QVERIFY(msgPlugin->getNumPDUs(bodyMessage, numOfRemainingChars, numOfPDUs, unicodeMode, alternativeEncodingType) == true); + QVERIFY(numOfPDUs == 1); + QVERIFY(unicodeMode == 0); + QVERIFY(alternativeEncodingType == ESmsEncodingNone); + + delete message; + + QVERIFY(msgPlugin->send(smsId) == true); + + QTest::qWait(1000); + + //Checking SMS in outbox folder + rootentry = iSession->GetEntryL(KMsvGlobalOutBoxIndexEntryId); + messages = rootentry->ChildrenL(); + count = rootentry->Count(); + + QVERIFY(count > 0); + TMsvId outboxMsgId = messages->At(count - 1); + + QVERIFY2(outboxMsgId == smsId, "SMS Not Sent to Outbox Folder"); + message = msgPlugin->convertFrom(outboxMsgId); + QVERIFY(message != NULL); + qDebug("conversion OK"); + QVERIFY(QString(TEST_MSG_TO1).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + QVERIFY(QString(TEST_MSG_ALIAS1).contains(message->fromAddress()->alias(), Qt::CaseInsensitive) == true); + delete message; +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::CreateSMSWithTextAttachment +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::CreateSMSWithTextAttachment() +{ + msgPlugin->setEncodingSettings(ETrue, ESmsEncodingNone, -1); + + //Constructing SMS with text attachment + ConvergedMessage message; + + ConvergedMessageAddress address; + address.setAddress(QString(TEST_MSG_TO2)); + message.addToRecipient(address); + + message.setPriority(ConvergedMessage::Normal); + + ConvergedMessageAttachmentList attachmentList; + + //Add a text attachment to attachment list. + QString attachmentPath = TEST_TEXT_ATTACHMENT; + ConvergedMessageAttachment* attachment = + new ConvergedMessageAttachment(attachmentPath, ConvergedMessageAttachment::EAttachment); + + attachmentList.append(attachment); + //Add attachments' list + message.addAttachments(attachmentList); + + smsId = msgPlugin->convertTo(&message); + QVERIFY(smsId != -1); + + QVERIFY(msgPlugin->send(smsId) == true); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::TestSMSWithTextAttachment +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::TestSMSWithTextAttachment() +{ + QTest::qWait(1000); + + CMsvEntry* rootentry = iSession->GetEntryL(KMsvGlobalOutBoxIndexEntryId); + CMsvEntrySelection* messages = rootentry->ChildrenL(); + TInt count = rootentry->Count(); + + QVERIFY(count > 0); + TMsvId outboxMsgId = messages->At(count - 1); + + QVERIFY2(outboxMsgId == smsId, "SMS Not Sent to Outbox Folder"); + ConvergedMessage* message = msgPlugin->convertFrom(outboxMsgId); + QVERIFY(message != NULL); + QVERIFY(QString(TEST_MSG_TO2).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + delete message; + + qDebug("Text Attachment SMS Sending passed"); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::CreateSMSWithVCardAttachment +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::CreateSMSWithVCardAttachment() +{ + msgPlugin->setEncodingSettings(ETrue, ESmsEncodingNone, -1); + + //Constructing SMS with VCard attachment + ConvergedMessage message; + + ConvergedMessageAddress address; + address.setAddress(QString(TEST_MSG_TO2)); + message.addToRecipient(address); + + message.setPriority(ConvergedMessage::Normal); + + ConvergedMessageAttachmentList attachmentList; + + //Add a vcard attachment to attachment list. + QString attachmentPath = TEST_VCARD_ATTACHMENT; + ConvergedMessageAttachment* attachment = + new ConvergedMessageAttachment(attachmentPath, ConvergedMessageAttachment::EAttachment); + + attachmentList.append(attachment); + //Add attachments' list + message.addAttachments(attachmentList); + + smsId = msgPlugin->convertTo(&message); + QVERIFY(smsId != -1); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::TestSMSWithVCardAttachment +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::TestSMSWithVCardAttachment() +{ + QTest::qWait(1000); + + //Verifying a SMS with VCard attachment + CMsvEntry* rootentry = iSession->GetEntryL(KMsvDraftEntryId); + CMsvEntrySelection* messages = rootentry->ChildrenL(); + TInt count = rootentry->Count(); + + QVERIFY(count > 0); + + TMsvId draftMsgId = messages->At(count - 1); + QVERIFY2(draftMsgId == smsId, "SMS Not Sent to Drafts Folder"); + + ConvergedMessage* message = msgPlugin->convertFrom(draftMsgId); + QVERIFY(message != NULL); + QVERIFY(QString(TEST_MSG_TO2).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + QVERIFY(message->attachments().count() == 1); + QVERIFY(message->attachments()[0]->attachmentType() == ConvergedMessageAttachment::EAttachment); + QVERIFY(message->attachments()[0]->filePath().contains(QString(TEST_VCARD_ATTACHMENT).mid(QString(TEST_VCARD_ATTACHMENT).indexOf(QString("TestUnieditorSMSPluginSample.vcf"), 0, Qt::CaseInsensitive)), Qt::CaseInsensitive) == true); + delete message; + message = NULL; + qDebug("VCard Attachment SMS passed"); + + msgPlugin->deleteDraftsEntry(draftMsgId); + + message = msgPlugin->convertFrom(draftMsgId); + QVERIFY(message == NULL); + + qDebug("Draft SMS deleted Sucessfully"); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::CreateSMSWithVCalAttachment +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::CreateSMSWithVCalAttachment() +{ + msgPlugin->setEncodingSettings(EFalse, ESmsEncodingNone, -1); + + //Constructing SMS with VCal attachment + ConvergedMessage message; + + ConvergedMessageAddress address; + address.setAddress(QString(TEST_MSG_TO1)); + message.addToRecipient(address); + + message.setPriority(ConvergedMessage::Normal); + + ConvergedMessageAttachmentList attachmentList; + + //Add a vcal attachment to attachment list. + QString attachmentPath = TEST_VCAL_ATTACHMENT; + ConvergedMessageAttachment* attachment = + new ConvergedMessageAttachment(attachmentPath, ConvergedMessageAttachment::EAttachment); + + attachmentList.append(attachment); + //Add attachments' list + message.addAttachments(attachmentList); + + smsId = msgPlugin->convertTo(&message); + QVERIFY(smsId != -1); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::TestSMSWithVCalAttachment +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::TestSMSWithVCalAttachment() +{ + QTest::qWait(1000); + + //Verifying a SMS with VCal attachment + CMsvEntry* rootentry = iSession->GetEntryL(KMsvDraftEntryId); + CMsvEntrySelection* messages = rootentry->ChildrenL(); + TInt count = rootentry->Count(); + + QVERIFY(count > 0); + + TMsvId draftMsgId = messages->At(count - 1); + QVERIFY2(draftMsgId == smsId, "SMS Not Sent to Drafts Folder"); + + ConvergedMessage* message = msgPlugin->convertFrom(draftMsgId); + QVERIFY(message != NULL); + QVERIFY(QString(TEST_MSG_TO1).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + QVERIFY(message->attachments().count() == 1); + QVERIFY(message->attachments()[0]->attachmentType() == ConvergedMessageAttachment::EAttachment); + QVERIFY(message->attachments()[0]->filePath().contains(QString(TEST_VCAL_ATTACHMENT).mid(QString(TEST_VCAL_ATTACHMENT).indexOf(QString("TestUnieditorSMSPluginSample.vcs"), 0, Qt::CaseInsensitive)), Qt::CaseInsensitive) == true); + delete message; + message = NULL; + + qDebug("VCal Attachment SMS passed"); + + msgPlugin->deleteDraftsEntry(draftMsgId); + + message = msgPlugin->convertFrom(draftMsgId); + QVERIFY(message == NULL); + + qDebug("Draft SMS deleted Sucessfully"); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::CreateEmailSMS +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::CreateEmailSMS() +{ + //Constructing a SMS - Email + ConvergedMessage message; + + ConvergedMessageAddress address1; + address1.setAddress(QString(TEST_MSG_TO3)); + message.addToRecipient(address1); + + ConvergedMessageAddress address2; + address2.setAddress(QString(TEST_MSG_TO2)); + message.addToRecipient(address2); + + message.setPriority(ConvergedMessage::Normal); + + message.setSubject(QString(TEST_MSG_SUBJECT)); + + message.setBodyText(QString(TEST_MSG_BODY)); + + smsId = msgPlugin->convertTo(&message); + QVERIFY(smsId != -1); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::TestEmailSMS +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::TestEmailSMS() +{ + QTest::qWait(1000); + + //Verifying Email SMS + CMsvEntry* rootentry = iSession->GetEntryL(KMsvDraftEntryId); + CMsvEntrySelection* messages = rootentry->ChildrenL(); + TInt count = rootentry->Count(); + + QVERIFY(count > 0); + + TMsvId draftMsgId = messages->At(count - 1); + QVERIFY2(draftMsgId == smsId, "SMS Not Sent to Drafts Folder"); + + ConvergedMessage* message = msgPlugin->convertFrom(draftMsgId); + QVERIFY(message != NULL); + QVERIFY(QString(TEST_MSG_TO1).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + QVERIFY(QString(TEST_MSG_BODY).compare(message->bodyText(), Qt::CaseInsensitive) == 0); + QVERIFY(QString(TEST_MSG_SUBJECT).compare(message->subject(), Qt::CaseInsensitive) == 0); + delete message; + + qDebug("Creation EMail passed"); + + QVERIFY(msgPlugin->send(smsId) == true); + + QTest::qWait(1000); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::CreateSMSForExtraOptions +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::CreateSMSForExtraOptions() +{ + ConvergedMessage message; + message.setBodyText(QString(TEST_MSG_BODY)); + + ConvergedMessageAddress address1; + address1.setAddress(QString(TEST_MSG_TO2)); + message.addToRecipient(address1); + + ConvergedMessageAddress address2; + address2.setAddress(QString(TEST_MSG_TO1)); + message.addFromRecipient(address2); + + message.setPriority(ConvergedMessage::Normal); + + smsId = msgPlugin->convertTo(&message); + QVERIFY(smsId != -1); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::TestSMSForExtraOptions +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::TestSMSForExtraOptions() +{ + QTest::qWait(1000); + + CMsvEntry* rootentry = iSession->GetEntryL(KMsvDraftEntryId); + CMsvEntrySelection* messages = rootentry->ChildrenL(); + TInt count = rootentry->Count(); + + QVERIFY(count > 0); + + TMsvId draftMsgId = messages->At(count - 1); + QVERIFY2(draftMsgId == smsId, "SMS Not Sent to Drafts Folder"); + + QVERIFY(msgPlugin->messageType() == ConvergedMessage::Sms); + + //Verifying SMS for Forwarding + ConvergedMessage* message = msgPlugin->convertFrom(draftMsgId, UniEditorPluginInterface::Forward); + QVERIFY(message != NULL); + QVERIFY(QString(TEST_MSG_TO1).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + QVERIFY(message->toAddressList().count() == 1); + QVERIFY(message->toAddressList()[0]->address().contains(QString(TEST_MSG_TO2), Qt::CaseInsensitive) == true); + QVERIFY(QString(TEST_MSG_BODY).compare(message->bodyText(), Qt::CaseInsensitive) == 0); + delete message; + + qDebug("SMS for Forward Passed"); + + //Verifying SMS for Reply from Drafts + message = msgPlugin->convertFrom(draftMsgId, UniEditorPluginInterface::Reply); + QVERIFY(message != NULL); + QVERIFY(QString(TEST_MSG_TO1).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + QVERIFY(message->toAddressList().count() == 1); + QVERIFY(message->toAddressList()[0]->address().contains(QString(TEST_MSG_TO2), Qt::CaseInsensitive) == true); + QVERIFY(message->bodyText().contains(QString(TEST_MSG_BODY), Qt::CaseInsensitive) == true); + delete message; + + qDebug("SMS for Reply - ESmsSubmit Passed"); + + QVERIFY(msgPlugin->send(smsId) == true); + + QTest::qWait(1000); + + rootentry = iSession->GetEntryL(KMsvGlobalOutBoxIndexEntryId); + messages = rootentry->ChildrenL(); + count = rootentry->Count(); + + QVERIFY(count > 0); + TMsvId outboxMsgId = messages->At(count - 1); + + //Verifying SMS for Reply when SMS is sent + message = msgPlugin->convertFrom(outboxMsgId, UniEditorPluginInterface::Reply); + QVERIFY(message != NULL); + QVERIFY(QString(TEST_MSG_TO1).contains(message->fromAddress()->address(), Qt::CaseInsensitive) == true); + QVERIFY(message->toAddressList().count() == 1); + QVERIFY(message->toAddressList()[0]->address().contains(QString(TEST_MSG_TO2), Qt::CaseInsensitive) == true); + QVERIFY(message->bodyText().compare(QString(""), Qt::CaseInsensitive) == 0); + delete message; + + qDebug("SMS for Reply - ESmsDeliver Passed"); + + iSmsClientMtm->Entry().DeleteL(smsId); + QTest::qWait(1000); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::cleanup +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::cleanup() +{ + +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::cleanupTestCase +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::cleanupTestCase() +{ + //Cleanup + delete msgPlugin; + + if(iSmsClientMtm) + { + delete iSmsClientMtm; + iSmsClientMtm = NULL; + } + + if (iMtmRegistry) + { + delete iMtmRegistry; + iMtmRegistry = NULL; + } + + if (iSession) + { + delete iSession; + iSession = NULL; + } + + if (iCenRepSession) + { + delete iCenRepSession; + iCenRepSession = NULL; + } +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::createSCSettingsL +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::createSCSettingsL() +{ + qDebug("TestUnieditorSMSPlugin::createSCSettingsL enter"); + + TMsvSelectionOrdering ordering; + + CMsvEntry* root = CMsvEntry::NewL(iSmsClientMtm->Session(), + KMsvRootIndexEntryId, + ordering); + + CSmsAccount* smsAccount = CSmsAccount::NewLC(); + + CSmsSettings* settings = CSmsSettings::NewL(); + CleanupStack::PushL(settings); + smsAccount->LoadSettingsL(*settings); + + TMsvEntry entry; + entry.iMtm = KUidMsgTypeSMS; + entry.iType = KUidMsvServiceEntry; + entry.SetReadOnly(EFalse); + entry.SetVisible(EFalse); + entry.iDate.UniversalTime(); + entry.iDetails.Set(_L("Nokiatest")); + + root->SetEntryL(KMsvRootIndexEntryId); + root->CreateL(entry); + + QString serviceCenter01(SERVICE_CENTER_01); + QString serviceCenter02(SERVICE_CENTER_02); + HBufC* sC01 = XQConversions::qStringToS60Desc(serviceCenter01); + HBufC* sC02 = XQConversions::qStringToS60Desc(serviceCenter02); + CleanupStack::PushL(sC01); + CleanupStack::PushL(sC02); + settings->AddServiceCenterL(_L("Nokia"), *sC01); + settings->AddServiceCenterL(_L("Nokia"), *sC02); + CleanupStack::PopAndDestroy(sC02); + CleanupStack::PopAndDestroy(sC01); + settings->SetDefaultServiceCenter(1); + settings->SetValidityPeriod(ESmsVPWeek); + settings->SetReplyQuoted(ETrue); + settings->SetRejectDuplicate(ETrue); + settings->SetDelivery(ESmsDeliveryImmediately); + settings->SetDeliveryReport(EFalse); + settings->SetReplyPath(EFalse); + settings->SetMessageConversion(ESmsConvPIDNone); + settings->SetCanConcatenate(ETrue); + settings->SetCharacterSet(TSmsDataCodingScheme::ESmsAlphabet7Bit); + settings->SetValidityPeriodFormat(TSmsFirstOctet::ESmsVPFInteger); + settings->SetStatusReportHandling(CSmsSettings::EMoveReportToInboxVisible); + settings->SetSpecialMessageHandling(CSmsSettings::EMoveReportToInboxVisible); + settings->SetSmsBearer(CSmsSettings::ESmsBearerCircuitPreferred); + settings->SetCommDbAction(CSmsSettings::ENone); + settings->SetSmsBearerAction(CSmsSettings::ENone); + + // Save settings + CMsvStore* msvstore = root->EditStoreL(); + CleanupStack::PushL(msvstore); + + TInt maxTries(5); + TBool done(EFalse); + while (maxTries && !done) + { + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL b4"); + TRAPD( err, smsAccount->SaveSettingsL( *settings ) ); + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL after"); + if (err == KErrNone) + { + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL settings saved"); + + done = ETrue; + } + else if (err == KErrLocked) + { + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL KErrLocked"); + + // Wait a while and retry. + User::After(100000); // 0.1 seconds + maxTries--; + } + else + { + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL leaving - "); + qDebug() << err; + User::Leave(err); + } + } + + msvstore->CommitL(); + CleanupStack::PopAndDestroy(msvstore); + + CleanupStack::PopAndDestroy(settings); + CleanupStack::PopAndDestroy(smsAccount); + + qDebug("TestUnieditorSMSPlugin::createSCSettingsL exit"); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::initL +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::initL() +{ + iCenRepSession = CRepository::NewL(KCRUidSmum); + + // initialise + iSession = CMsvSession::OpenSyncL(*this); + + // Create the SMS Service + TMsvId serviceId = CreateSmsServiceL(); + + // Update the SMS cenrep with the default settings. + CreateDefaultSettingsL(serviceId); + + iMtmRegistry = CClientMtmRegistry::NewL(*iSession); + iSmsClientMtm = STATIC_CAST( CSmsClientMtm*, iMtmRegistry->NewMtmL( KUidMsgTypeSMS )); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::CreateSmsServiceL +//--------------------------------------------------------------- +TMsvId TestUnieditorSMSPlugin::CreateSmsServiceL() + { + qDebug("TestUnieditorSMSPlugin::CreateSmsServiceL enter"); + + TMsvId serviceEntryId = KMsvNullIndexEntryId; + TInt err = KErrNone; + TRAP( err, serviceEntryId = ServiceIdL()); + + // If no service, create one + if (err == KErrNotFound) + { + TMsvEntry entry; + entry.iMtm = KUidMsgTypeSMS; + entry.iType = KUidMsvServiceEntry; + entry.SetReadOnly(EFalse); + entry.SetVisible(EFalse); + entry.iDate.HomeTime(); + entry.iDetails.Set(KSmsService); + CMsvEntry* root = iSession->GetEntryL(KMsvRootIndexEntryId); + CleanupStack::PushL(root); + + // In case no root store, create one... + if (!root->HasStoreL()) + { + // --- The entry does not have a store. EditStoreL() will create one --- + CMsvStore* store = root->EditStoreL(); + CleanupStack::PushL(store); + store->CommitL(); + CleanupStack::PopAndDestroy(); // store + store = NULL; // destroyed + } + root->CreateL(entry); + CleanupStack::PopAndDestroy(); // root + serviceEntryId = entry.Id(); + + } + + qDebug("TestUnieditorSMSPlugin::CreateSmsServiceL exit"); + return serviceEntryId; + } + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::ServiceIdL +//--------------------------------------------------------------- +TMsvId TestUnieditorSMSPlugin::ServiceIdL() +{ + qDebug("TestUnieditorSMSPlugin::ServiceIdL enter"); + + TMsvId id = KMsvNullIndexEntryId; + CMsvEntry* root = iSession->GetEntryL(KMsvRootIndexEntryId); + CleanupStack::PushL(root); + TSmsUtilities::ServiceIdL(*root, id); + CleanupStack::PopAndDestroy(root); + + qDebug("TestUnieditorSMSPlugin::ServiceIdL exit"); + return id; +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::CreateDefaultSettingsL +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::CreateDefaultSettingsL(TMsvId aServiceId) +{ + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL enter"); + + CSmsSettings* serviceSettings = CSmsSettings::NewL(); + CleanupStack::PushL(serviceSettings); + CSmsAccount* smsAccount = CSmsAccount::NewLC(); + + // Read the RFS related settings from shared data. + TInt originalCount = 0; + smsAccount->LoadSettingsL(*serviceSettings); + originalCount = serviceSettings->ServiceCenterCount(); + + if (!originalCount) + { + qDebug("Original count = 0"); + + ReadDefaultSettingsFromSharedDataL(serviceSettings); + + // Rest of the sms settings, which are fixed. + serviceSettings->SetValidityPeriodFormat(TSmsFirstOctet::ESmsVPFInteger); //relative + serviceSettings->SetDelivery(ESmsDeliveryImmediately); + serviceSettings->SetCanConcatenate(ETrue); + serviceSettings->SetStatusReportHandling(CSmsSettings::EMoveReportToInboxInvisible); + serviceSettings->SetSpecialMessageHandling(CSmsSettings::EMoveReportToInboxVisible); + serviceSettings->SetRejectDuplicate(ETrue); + TInt descriptionLength = KSmsDescriptionLength; + + // Read the value for description length + CRepository* repository = CRepository::NewLC(KCRUidMuiuSettings); + if (KErrNone == repository->Get(KMuiuDescriptionLength, + descriptionLength)) + { + //Make sure value is not zero + descriptionLength = Max(descriptionLength, KSmsDescriptionLength); + } + CleanupStack::PopAndDestroy(); // repository + serviceSettings->SetDescriptionLength(descriptionLength); + + // Set saving to commsdb + serviceSettings->SetCommDbAction(CSmsSettings::EStoreToCommDb); + serviceSettings->SetSmsBearerAction(CSmsSettings::EStoreToCommDb); + + } + + // Save settings + CMsvEntry* service = iSession->GetEntryL(aServiceId); + CleanupStack::PushL(service); + CMsvStore* msvstore = service->EditStoreL(); + CleanupStack::PushL(msvstore); + + TInt maxTries(5); + TBool done(EFalse); + while (maxTries && !done) + { + TRAPD( err, smsAccount->SaveSettingsL( *serviceSettings ) ); + if (err == KErrNone) + { + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL settings saved"); + + done = ETrue; + } + else if (err == KErrLocked) + { + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL KErrLocked"); + + // Wait a while and retry. + User::After(100000); // 0.1 seconds + maxTries--; + } + else + { + User::Leave(err); + } + } + + msvstore->CommitL(); + CleanupStack::PopAndDestroy(2); // msvstore, service + CleanupStack::PopAndDestroy(2); // serviceSettings, smsAccount + + qDebug("TestUnieditorSMSPlugin::CreateDefaultSettingsL Exit"); +} + +//--------------------------------------------------------------- +// TestUnieditorSMSPlugin::ReadDefaultSettingsFromSharedDataL +//--------------------------------------------------------------- +void TestUnieditorSMSPlugin::ReadDefaultSettingsFromSharedDataL(CSmsSettings* aServiceSettings) + { + qDebug("TestUnieditorSMSPlugin::ReadDefaultSettingsFromSharedDataL Enter"); + + if ( iCenRepSession ) + { + TInt readedSetting; + + // Delivery report + if (iCenRepSession->Get(KSmumDeliveryReport, readedSetting) != KErrNone) + { + readedSetting = KDefDeliveryReport; + } + aServiceSettings->SetDeliveryReport(readedSetting); + + // Validity period + if (iCenRepSession->Get(KSmumValidityPeriod, readedSetting) != KErrNone) + { + readedSetting = KDefValidityPeriod; + } + aServiceSettings->SetValidityPeriod(readedSetting); + + // Message conversion + if (iCenRepSession->Get(KSmumMessageConversion, readedSetting) + != KErrNone) + { + readedSetting = KDefMessageConversion; + } + aServiceSettings->SetMessageConversion((TSmsPIDConversion) readedSetting); + + // Preferred connection + if (iCenRepSession->Get(KSmumPreferredConnection, readedSetting) + != KErrNone) + { + readedSetting = KDefPreferredConnection; + } + aServiceSettings->SetSmsBearer((CSmsSettings::TMobileSmsBearer) readedSetting); + + // Reply via same centre + if (iCenRepSession->Get(KSmumRemoveReplyViaSameCentre, readedSetting) + != KErrNone) + { + if (iCenRepSession->Get(KSmumReplyViaSameCentre, readedSetting) + != KErrNone) + { + readedSetting = KDefReplyViaSameCentre; + } + } + else + { + if (!readedSetting) + { + if (iCenRepSession->Get(KSmumReplyViaSameCentre, readedSetting) + != KErrNone) + { + readedSetting = KDefReplyViaSameCentre; + } + } + } + aServiceSettings->SetReplyPath(readedSetting); + } + + qDebug("TestUnieditorSMSPlugin::ReadDefaultSettingsFromSharedDataL Exit"); + } + +//--------------------------------------------------------------- +// main +// main entry point +//--------------------------------------------------------------- +int main(int argc, char *argv[]) + { + int ret = -1; + QCoreApplication app(argc, argv); + QObject* tc = new TestUnieditorSMSPlugin(); + +#ifdef __WINSCW__ + char *new_argv[3]; + QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; + QByteArray bytes = str.toAscii(); + char arg1[] = "-o"; + new_argv[0] = argv[0]; + new_argv[1] = arg1; + new_argv[2] = bytes.data(); + ret = QTest::qExec(tc, 3, new_argv); +#else + ret = QTest::qExec(tc, argc, argv); +#endif + + delete tc; + return ret; + } diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/testunieditorsmsplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/testunieditorsmsplugin/testunieditorsmsplugin.pro Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,126 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Test Case Project Definition for UnieditorSMSPlugin +# + +QT += testlib +QT -= gui + +TEMPLATE = app +TARGET = testunieditorsmsplugin + +CONFIG += hb +CONFIG += symbian_test +CONFIG += qtestlib + +INCLUDEPATH += ./inc +INCLUDEPATH += ../../../../../../../inc +INCLUDEPATH += ../../../../editorgenutils/inc +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + +DEFINES += BUILD_TESTUNIEDITORSMSPLUGIN_DLL + +SOURCES += \ + ./src/testunieditorsmsplugin.cpp \ + ../../src/unieditorsmsplugin.cpp \ + ../../src/unieditorsmsplugin_p.cpp + + +# Input +HEADERS += \ + ./inc/testunieditorsmsplugin.h \ + ../../inc/unieditorsmsplugin.h \ + ../../inc/unieditorsmsplugin_p.h + + +SYMBIAN_PLATFORMS = WINSCW ARMV5 + symbian { + TARGET.UID3 = 0xE2b6e30a + TARGET.CAPABILITY = All -TCB -DRM + TARGET.EPOCSTACKSIZE = 0x8000 + TARGET.EPOCHEAPSIZE = 0x1000 0x1F00000 + VENDORID = VID_DEFAULT + BLD_INF_RULES.prj_exports += "data/TestUnieditorSMSPluginSample.txt c:/data/TestUnieditorSMSPluginSample.txt" + BLD_INF_RULES.prj_exports += "data/TestUnieditorSMSPluginSample.vcf c:/data/TestUnieditorSMSPluginSample.vcf" + BLD_INF_RULES.prj_exports += "data/TestUnieditorSMSPluginSample.vcs c:/data/TestUnieditorSMSPluginSample.vcs" + } + +LIBS += -leuser \ + -lconvergedmessageutils \ + -lMsgMedia \ + -leditorgenutils \ + -lcone \ + -leikcoctl \ + -leikcore \ + -leikdlg \ + -lmsgs \ + -letext \ + -lgsmu \ + -lmmsgenutils \ + -lefsrv \ + -lestor \ + -lsmcm \ + -lCommonEngine \ + -lbafl \ + -lCdlEngine \ + -lFeatMgr \ + -lapmime \ + -lunidatamodelloader \ + -lxqutils \ + -lQtContacts \ + -lxqutils \ + -lapgrfx \ + -lcharconv \ + -lInetProtUtil \ + -lsmildtd \ + -lxmldom \ + -lxmlparser \ + -lcone \ + -lQtCore \ + -letel \ + -letelmm \ + -lcentralrepository + +packageheader = "$${LITERAL_HASH}{\"TestUnieditorSMSPlugin\"},(0xE2b6e30a),1,0,0,TYPE=SA" + +vendorinfo = \ + "; Localised Vendor name" \ + "%{\"Nokia\"}" \ + "; Unique Vendor name" \ + ":\"Nokia\"" + +dependencyinfo = \ + "; Default HW/platform dependencies" \ + "[0x101F7961],0,0,0,{\"S60ProductID\"}" \ + "[0x2001E61C],4,6,3,{"Qt"} + +default_deployment.pkg_prerules = packageheader \ + vendorinfo \ + dependencyinfo + +#Copy the dependent DLL +symbian: { + addFile1.sources = ./data/TestUnieditorSMSPluginSample.txt + addFile1.path = C:/data/ + DEPLOYMENT += addFile1 + + addFile2.sources = ./data/TestUnieditorSMSPluginSample.vcf + addFile2.path = C:/data/ + DEPLOYMENT += addFile2 + + addFile3.sources = ./data/TestUnieditorSMSPluginSample.vcs + addFile3.path = C:/data/ + DEPLOYMENT += addFile3 + } + \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/tsrc.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgutils/unieditorutils/unieditorplugins/unieditorsmsplugin/tsrc/tsrc.pro Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,21 @@ +# +# 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: Project file for testunieditorsmsplugin +# + +TEMPLATE = subdirs + +SUBDIRS += testunieditorsmsplugin + +CONFIG += ordered \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 messagingapp/shareui/shareui.pro --- a/messagingapp/shareui/shareui.pro Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/shareui/shareui.pro Tue Sep 07 13:28:39 2010 +0530 @@ -55,6 +55,8 @@ SOURCES += shareui.cpp \ shareuiprivate.cpp + +TRANSLATIONS = share.ts LIBS += -lxqservice \ -lxqserviceutil diff -r fcb676ca077d -r fdbe8253b596 messagingapp/shareui/src/shareui.cpp --- a/messagingapp/shareui/src/shareui.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/shareui/src/shareui.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -20,6 +20,9 @@ #include "shareuiprivate.h" #include +#include +#include +#include /** * Default Constructor. * @@ -27,6 +30,16 @@ ShareUi::ShareUi() : d_ptr(NULL) { + QString locale = QLocale::system().name(); + QString path = "z:/resource/qt/translations/"; + + mTranslator = new QTranslator(); + mTranslator_comm = new QTranslator(); + + bool result = mTranslator->load(path + QString("share_") + locale); + result = mTranslator_comm->load(path + QString("common_") + locale); + qApp->installTranslator(mTranslator); + qApp->installTranslator(mTranslator_comm); } @@ -39,7 +52,10 @@ if(d_ptr) { delete d_ptr; - } + } + delete mTranslator; + delete mTranslator_comm; + } /** diff -r fcb676ca077d -r fdbe8253b596 messagingapp/shareui/src/shareuiprivate.cpp --- a/messagingapp/shareui/src/shareuiprivate.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/messagingapp/shareui/src/shareuiprivate.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -39,20 +39,12 @@ // USER INCLUDES #include "shareuiprivate.h" -// Localized Constants -//#define LOC_SEND_SELECTED_ITEM hbTrId("txt_shareui_send_selected_item") -//#define LOC_BUTTON_CANCEL hbTrId("txt_shareui_button_cancel") -//#define LOC_NO_SERVICES hbTrId("txt_shareui_no_services") -//#define LOC_NO_FILES hbTrId("txt_shareui_no_files") -//#define LOC_SERVICE_ERROR hbTrId("txt_shareui_service_error") -//#define LOC_PROTECTED_CONTENT hbTrId("txt_shareui_protected_content") - -#define LOC_SEND_SELECTED_ITEM hbTrId("Send selected item") -#define LOC_BUTTON_CANCEL hbTrId("Cancel") -#define LOC_NO_SERVICES hbTrId("No services found.") -#define LOC_NO_FILES hbTrId("No files found.") -#define LOC_SERVICE_ERROR hbTrId("Service error.") -#define LOC_PROTECTED_CONTENT hbTrId("Protected content.") +#define LOC_TITLE_SHARING_METHODS hbTrId("txt_share_title_sharing_methods") +#define LOC_BUTTON_CANCEL hbTrId("txt_common_button_cancel") +#define LOC_NO_SERVICES hbTrId("txt_shareui_no_services ") +#define LOC_SERVICE_ERROR hbTrId("txt_shareui_service_error") +#define LOC_PROTECTED_CONTENT hbTrId("txt_shareui_protected_content") +#define LOC_NO_FILES hbTrId("txt_shareui_no_files") const QString LIST_ITEM_TITLE("qtc_list_item_title_normal"); @@ -205,7 +197,7 @@ mSharePopup = new HbDialog(); // make it delete itself on close mSharePopup->setAttribute( Qt::WA_DeleteOnClose, true ); - HbTextItem* heading = new HbTextItem(LOC_SEND_SELECTED_ITEM, mSharePopup); + HbTextItem* heading = new HbTextItem(LOC_TITLE_SHARING_METHODS, mSharePopup); QColor color = HbColorScheme::color( LIST_ITEM_TITLE ); heading->setTextColor( color ); heading->setAlignment(Qt::AlignCenter); diff -r fcb676ca077d -r fdbe8253b596 mmsengine/applicationadapter/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/applicationadapter/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,27 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmsapplicationadapter.mmp + diff -r fcb676ca077d -r fdbe8253b596 mmsengine/clientmtm/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/clientmtm/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,31 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmsclient.mmp + + +PRJ_EXPORTS + +../inc/mmsnotificationclient.h |../../../inc/mmsnotificationclient.h diff -r fcb676ca077d -r fdbe8253b596 mmsengine/conf/CI_mmsengine.confml Binary file mmsengine/conf/CI_mmsengine.confml has changed diff -r fcb676ca077d -r fdbe8253b596 mmsengine/genutils/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/genutils/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,26 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmsgenutils.mmp diff -r fcb676ca077d -r fdbe8253b596 mmsengine/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/group/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,42 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + + +PRJ_EXPORTS + +../rom/MmsEngine.iby CORE_APP_LAYER_IBY_EXPORT_PATH(MmsEngine.iby) +../inc/mmsgenutils.h |../../inc/mmsgenutils.h +../inc/mmsmsventry.h |../../inc/mmsmsventry.h +../inc/mmsmsventry.inl |../../inc/mmsmsventry.inl +../inc/mmsattachmentwaiter.h |../../inc/mmsattachmentwaiter.h +../inc/mmsattachmenthandler.h |../../inc/mmsattachmenthandler.h +../inc/mmscmds.h |../../inc/mmscmds.h +backup_registration.xml /epoc32/data/z/private/100058DB/backup_registration.xml +../loc/MmsUi.loc APP_LAYER_LOC_EXPORT_PATH(mmsui.loc) + + +../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) diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmscodec/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmscodec/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,25 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES +mmscodec.mmp diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmscodecclient/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmscodecclient/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,27 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmscodecclient.mmp + diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmsconninit/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmsconninit/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,27 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmsconninit.mmp + diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmshttptransport/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmshttptransport/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,27 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmstransport.mmp + diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmsmessage/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmsmessage/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,36 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmsmessage.mmp + + +PRJ_EXPORTS + +../inc/mmsheaders.h |../../../inc/mmsheaders.h +../inc/mmsheaders.inl |../../../inc/mmsheaders.inl +../inc/mmssendingchain.h |../../../inc/mmssendingchain.h +../inc/mmssendingchain.inl |../../../inc/mmssendingchain.inl +../inc/mmsdeleteresultarray.h |../../../inc/mmsdeleteresultarray.h +../inc/mmsdeleteresultarray.inl |../../../inc/mmsdeleteresultarray.inl \ No newline at end of file diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmsmessage/bld/mmsmessage.mmp --- a/mmsengine/mmsmessage/bld/mmsmessage.mmp Wed Sep 01 14:19:13 2010 +0530 +++ b/mmsengine/mmsmessage/bld/mmsmessage.mmp Tue Sep 07 13:28:39 2010 +0530 @@ -42,7 +42,6 @@ SOURCE mmscliententry.cpp SOURCE mmsserverentry.cpp SOURCE mmsdrm.cpp -//SOURCE mmsownnumber.cpp USERINCLUDE ../inc USERINCLUDE ../../inc @@ -63,8 +62,6 @@ LIBRARY mmsserversettings.lib LIBRARY charconv.lib LIBRARY centralrepository.lib -//LIBRARY VPbkEng.lib - LIBRARY caf.lib LIBRARY cafutils.lib LIBRARY drmrights.lib diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmsmessage/inc/mmsownnumber.h --- a/mmsengine/mmsmessage/inc/mmsownnumber.h Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -// End of File diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmsmessage/src/mmsmessageoperation.cpp --- a/mmsengine/mmsmessage/src/mmsmessageoperation.cpp Wed Sep 01 14:19:13 2010 +0530 +++ b/mmsengine/mmsmessage/src/mmsmessageoperation.cpp Tue Sep 07 13:28:39 2010 +0530 @@ -32,9 +32,7 @@ #include "mmssettings.h" #include "mmsheaders.h" #include "mmsgenutils.h" -#include "mmsownnumber.h" -// EXTERNAL DATA STRUCTURES // EXTERNAL FUNCTION PROTOTYPES extern void gPanic( TMmsPanic aPanic ); diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmsmessage/src/mmsownnumber.cpp --- a/mmsengine/mmsmessage/src/mmsownnumber.cpp Wed Sep 01 14:19:13 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,546 +0,0 @@ -/* -* Copyright (c) 2005 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: Check id any of given numbers is caller's own number -* -*/ - - - - -// INCLUDE FILES -#include "mmsownnumber.h" -#include "mmsgenutils.h" -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CMmsOwnNumber::CMmsOwnNumber -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CMmsOwnNumber::CMmsOwnNumber() - : CActive( EPriorityNormal ), - iIndex( KErrNotFound ) - { - CActiveScheduler::Add(this); - } - -// ----------------------------------------------------------------------------- -// CMmsOwnNumber::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CMmsOwnNumber::ConstructL( RFs* aFs ) - { - iFs = aFs; - - // The function is supposed to get a descriptor with packed URIs. - // As we only have one URI we assume it is packed enough - CVPbkContactStoreUriArray* storeArray = CVPbkContactStoreUriArray::NewLC(); - TVPbkContactStoreUriPtr uriPtr( VPbkContactStoreUris::SimGlobalOwnNumberUri() ); - storeArray->AppendL( uriPtr ); - - // TEST TRY ALSO DEFAULT DATABASE AS SIM DATABASE DOES NOT WORK IN WINS - -/* - TVPbkContactStoreUriPtr uriPtr2( VPbkContactStoreUris::DefaultCntDbUri() ); - storeArray->AppendL( uriPtr2 ); -*/ - // END OF TEST - - iNumberOfStores = storeArray->Count(); - iNumberOfOpenStores = iNumberOfStores; // otimistic - - // Open the database with the URI that specifies our own number - iContactManager = CVPbkContactManager::NewL( *storeArray, aFs ); - - CleanupStack::PopAndDestroy( storeArray ); - - iContactList = &(iContactManager->ContactStoresL()); - - //Let's find the number of digits to match - iDigitsToMatch = KMmsNumberOfDigitsToMatch ; - - CRepository* repository = NULL; - TInt error = KErrNone; - TRAP( error, repository = CRepository::NewL( KCRUidTelConfiguration )); - if ( error == KErrNone) - { - error = repository->Get( KTelMatchDigits, iDigitsToMatch ); - delete repository; - if( error != KErrNone ) - { - iDigitsToMatch=KMmsNumberOfDigitsToMatch; - } - } - } - -// ----------------------------------------------------------------------------- -// CMmsOwnNumber::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CMmsOwnNumber* CMmsOwnNumber::NewL( RFs* aFs ) - { - CMmsOwnNumber* self = new( ELeave ) CMmsOwnNumber; - - CleanupStack::PushL( self ); - self->ConstructL( aFs ); - CleanupStack::Pop( self ); - - return self; - } - - -// Destructor -CMmsOwnNumber::~CMmsOwnNumber() - { - Cancel(); - delete iContact; - delete iOperation; - delete iResultArray; - delete iContactManager; - } - -// --------------------------------------------------------- -// CMmsOwnNumber::DoCancel -// --------------------------------------------------------- -// -void CMmsOwnNumber::DoCancel() - { - delete iOperation; - iOperation = NULL; - TRequestStatus* s=&iStatus; - User::RequestComplete(s, KErrCancel); - } - -// --------------------------------------------------------- -// CMmsOwnNumber::RunL -// --------------------------------------------------------- -// -void CMmsOwnNumber::RunL() - { - - delete iOperation; - iOperation = NULL; - - if ( iStatus != KErrNone ) - { -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber: RunL status: %d "), iStatus.Int() ); -#endif - - // Exit current scheduler loop, resuming execution of the StartL() function - iActiveSchedulerWait.AsyncStop(); - return; - } - - switch ( iState ) - { - case EMmsOwnNumberOpening: - { - iState = EMmsOwnNumberSearching; - iMatch = EFalse; - SearchL(); - break; - } - case EMmsOwnNumberSearching: - { - iState = EMmsOwnNumberCheckingDuplicates; - CheckDuplicatesL(); - break; - } - case EMmsOwnNumberCheckingDuplicates: - { - iState = EMmsOwnNumberIdle; - iContactList->CloseAll( *this ); - break; - } - default: - { - break; - } - } - if ( !IsActive() ) - { - // Exit current scheduler loop, resuming execution of the StartL() function - delete iResultArray; - iResultArray = NULL; - iActiveSchedulerWait.AsyncStop(); - } - } - -// --------------------------------------------------------- -// CMmsOwnNumber::RunError -// --------------------------------------------------------- -// - -#ifdef _DEBUG -TInt CMmsOwnNumber::RunError( TInt aError ) -#else -TInt CMmsOwnNumber::RunError( TInt /* aError */ ) -#endif - { -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber: RunError: %d "), aError ); - TMmsGenUtils::Log( _L("OwnNumber: state: %d "), iState ); -#endif - delete iOperation; - iOperation = NULL; - delete iResultArray; - iResultArray = NULL; - iActiveSchedulerWait.AsyncStop(); //Exit current scheduler loop, resuming execution of the Start() function - return KErrNone; - } - -// --------------------------------------------------------- -// CMmsOwnNumber::FindCompleteL -// --------------------------------------------------------- -// -void CMmsOwnNumber::FindCompleteL( MVPbkContactLinkArray* aResults ) - { -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber::FindCompleteL ") ); -#endif - iResultArray = aResults; - iContactToMatch = iResultArray->Count(); // point beyound the array - iMatch = EFalse; - - // check the result array for matches and set our index accordingly - if ( iResultArray->Count() == 0 ) - { - // we are responsible for the results array if we did not leave. - delete iResultArray; - iResultArray = 0; - // no match found - this is not our own number - iNumberToMatch++; - if ( iNumberToMatch < iNumberList->MdcaCount() ) - { - // try the next one - iState = EMmsOwnNumberOpening; - } - } - else - { - // we found at least one match. - // What do we do now... - // Analyze the result in detail or just say "This is our own number"... - - // First approximation: Say this is our own. - // Actually exact match cases should be checked, too (short number) - // And possible email match, but that needs a different search function - - // save the match and return to RunL - // It will stop the active scheduler and allow the code to return to caller - iIndex = iNumberToMatch; - if ( iNumberList->MdcaPoint( iNumberToMatch ).Length() < iDigitsToMatch || - iResultArray->Count() > 1 ) - { - // need exact match, start from first item in the array - iContactToMatch = 0; - } - } - TRequestStatus* s=&iStatus; - User::RequestComplete( s, KErrNone ); - } - -// --------------------------------------------------------- -// CMmsOwnNumber::FindFailed -// --------------------------------------------------------- -// -void CMmsOwnNumber::FindFailed(TInt aError) - { -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber: FindFailed: %d "), aError ); -#endif - iIndex = aError; - TRequestStatus* s=&iStatus; - iNumberToMatch++; - if ( iNumberToMatch < iNumberList->MdcaCount() ) - { - // try the next one - iState = EMmsOwnNumberOpening; - } - User::RequestComplete( s, KErrNone ); - } - -// --------------------------------------------------------- -// CMmsOwnNumber::OpenComplete -// --------------------------------------------------------- -// -void CMmsOwnNumber::OpenComplete() - { - // if opening fails, StoreUnavailable is called -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber::OpenCompleteL") ); -#endif - TRequestStatus* s=&iStatus; - User::RequestComplete( s, KErrNone ); - } - -// --------------------------------------------------------- -// CMmsOwnNumber::StoreReady -// --------------------------------------------------------- -// -void CMmsOwnNumber::StoreReady(MVPbkContactStore& /*aContactStore*/) - { - // Nothing to do here -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber::StoreReady") ); -#endif - } - -// --------------------------------------------------------- -// CMmsOwnNumber::StoreUnavailable -// --------------------------------------------------------- -// -void CMmsOwnNumber::StoreUnavailable(MVPbkContactStore& /*aContactStore*/, TInt /*aReason*/) - { -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber::StoreUnavailable") ); -#endif - iNumberOfOpenStores--; - } - -// --------------------------------------------------------- -// CMmsOwnNumber::HandleStoreEventL -// --------------------------------------------------------- -// -void CMmsOwnNumber::HandleStoreEventL( - MVPbkContactStore& /*aContactStore*/, - TVPbkContactStoreEvent /*aStoreEvent*/) - { - - } - -// --------------------------------------------------------- -// CMmsOwnNumber::VPbkSingleContactOperationComplete -// --------------------------------------------------------- -// -void CMmsOwnNumber::VPbkSingleContactOperationComplete( - MVPbkContactOperationBase& /*aOperation*/, - MVPbkStoreContact* aContact) - { -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber::VPbkSingleContactOperationComplete") ); -#endif - iContact = aContact; - - MVPbkBaseContactFieldCollection& fields = iContact->Fields(); - - TInt fieldCount = fields.FieldCount(); - - TInt i; - -/* - const TInt maxMatchPriority = iContactManager->FieldTypes().MaxMatchPriority(); -*/ - for ( i = 0; i < fieldCount && !iMatch ; i++ ) - { - const MVPbkBaseContactField& field = fields.FieldAt( i ); -/* - const MVPbkFieldType* fieldType = field.MatchFieldType( maxMatchPriority ); -*/ - const MVPbkContactFieldData& fieldData = field.FieldData(); - - // I could not figure out how to check the actual field type - // (phone number or email or what), we must try all text fields - if ( fieldData.DataType() == EVPbkFieldStorageTypeText ) - { - const MVPbkContactFieldTextData& textData = MVPbkContactFieldTextData::Cast(fieldData); - // Now we finally have the data we can compare with our own data - if ( textData.Text().Compare( iNumberList->MdcaPoint( iNumberToMatch ) ) == 0 ) - { - // exact match. - iMatch = ETrue; - } - } - } - - delete iContact; - iContact = NULL; - - iContactToMatch++; - - if ( !iMatch && iContactToMatch < iResultArray->Count() ) - { - iState = EMmsOwnNumberSearching; - } - else if ( !iMatch ) - { - // This was not an exact match - iIndex = KErrNotFound; - delete iResultArray; - iResultArray = 0; - iNumberToMatch++; - if ( iNumberToMatch < iNumberList->MdcaCount() ) - { - // try the next one if any left - iState = EMmsOwnNumberOpening; - } - } - else - { - // keep LINT happy. - } - - TRequestStatus* s=&iStatus; - User::RequestComplete( s, KErrNone ); - } - -// --------------------------------------------------------- -// CMmsOwnNumber:: -// --------------------------------------------------------- -// -void CMmsOwnNumber::VPbkSingleContactOperationFailed( - MVPbkContactOperationBase& /*aOperation*/, -#ifdef _DEBUG - TInt aError) -#else - TInt /*aError*/) -#endif - { -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber: ContactOperationFailed: %d "), aError ); -#endif - // If not found iMatch stays false - iContactToMatch++; - - TRequestStatus* s=&iStatus; - User::RequestComplete( s, KErrNone ); - } - - -// --------------------------------------------------------- -// CMmsOwnNumber::StartL -// --------------------------------------------------------- -// -TInt CMmsOwnNumber::StartL( const CDesCArray& aNumberList ) - { - iIndex = KErrNotFound; - delete iOperation; - iOperation = NULL; - - if ( aNumberList.MdcaCount() <= 0) - { - return iIndex; // no contacts, not found - } - iNumberList = &aNumberList; - iNumberToMatch = 0; - iContactToMatch = 0; - - iContactList->OpenAllL( *this ); - - // We must set ourselves to pending because we don't give our status to anybody - // When search is complete, the functions call our callbacks, and we complete ourselves - iState = EMmsOwnNumberOpening; - iStatus = KRequestPending; - SetActive(); - iActiveSchedulerWait.Start(); //Re-enter the active scheduler--execution halts here until RunL is called - - // after iActiveSchedulerWait has been stopped execution continues here - - return iIndex; // return the possible index of caller's number - } - -// --------------------------------------------------------- -// CMmsOwnNumber::SearchL -// --------------------------------------------------------- -// -void CMmsOwnNumber::SearchL() - { -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber::SearchL") ); -#endif - // Try checking number of open stores to see if anything was opened - if ( iNumberOfOpenStores > 0 ) - { - iOperation = iContactManager->MatchPhoneNumberL( - iNumberList->MdcaPoint( iNumberToMatch ), iDigitsToMatch, *this ); - - // We must set ourselves to pending because we don't give our status to anybody - // When search is complete, the functions call our callbacks, and we complete ourselves - iStatus = KRequestPending; - SetActive(); - } - // If we do not become active, RunL stops ActiveSchedulerWait - } - -// --------------------------------------------------------- -// CMmsOwnNumber::CheckDuplicatesL -// --------------------------------------------------------- -// -void CMmsOwnNumber::CheckDuplicatesL() - { - // If more than one contact found or length of number is less than the - // match number length, check for exact match - - // The match array is in iResultArray - -#ifdef _DEBUG - TMmsGenUtils::Log( _L("OwnNumber::CheckDuplicatesL") ); -#endif - delete iContact; - iContact = NULL; - - TInt count = 0; - if ( iResultArray ) - { - count = iResultArray->Count(); - } - - if ( iContactToMatch < count ) - { - iMatch = EFalse; - iState = EMmsOwnNumberSearching; - iOperation = iContactManager->RetrieveContactL( - iResultArray->At( iContactToMatch ), - *this); - iStatus = KRequestPending; - SetActive(); - } - else - { - delete iResultArray; - iResultArray = NULL; - iStatus = KRequestPending; - SetActive(); - TRequestStatus* s=&iStatus; - User::RequestComplete( s, KErrNone ); - } - - } - - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmspushhandler/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmspushhandler/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,27 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmspushhandler.mmp + diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmsserver/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmsserver/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,25 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES +mmsserver.mmp diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmsserversettings/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmsserversettings/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,26 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmsserversettings.mmp diff -r fcb676ca077d -r fdbe8253b596 mmsengine/mmswatcher/bld/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsengine/mmswatcher/bld/bld.inf Tue Sep 07 13:28:39 2010 +0530 @@ -0,0 +1,26 @@ +/* +* 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: Build information file +* +*/ + +#include + +PRJ_PLATFORMS +WINSCW ARMV5 + + +PRJ_MMPFILES + +mmswatcher.mmp diff -r fcb676ca077d -r fdbe8253b596 msg_plat/shareui_api/inc/shareui.h --- a/msg_plat/shareui_api/inc/shareui.h Wed Sep 01 14:19:13 2010 +0530 +++ b/msg_plat/shareui_api/inc/shareui.h Tue Sep 07 13:28:39 2010 +0530 @@ -34,6 +34,7 @@ // FORWARD DECLARATIONS class ShareUiPrivate; +class QTranslator; /** * This class offers message creation and sending services. @@ -69,7 +70,21 @@ * Owned */ ShareUiPrivate* d_ptr; + + /** + * Translator member variable + * Owned + */ + QTranslator* mTranslator; + + /** + * Translator member variable + * Owned + */ + QTranslator* mTranslator_comm; + Q_DECLARE_PRIVATE_D(d_ptr,ShareUi) + };